Anfang triaxial

This commit is contained in:
2025-10-15 12:52:17 +02:00
parent 02c146ab97
commit a143cad0eb
4 changed files with 52 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import winkelumrechnungen as wu
import ausgaben as aus
class Ellipsoid:
class EllipsoidBiaxial:
def __init__(self, a: float, b: float):
self.a = a
self.b = b
@@ -81,3 +81,47 @@ class Ellipsoid:
for i in range(len(phii)):
print(f"P3[{i}]: {aus.gms('phi', phii[i], 5)}\th = {round(hi[i], 5)} m")
return phi, lamb, h
class EllipsoidTriaxial:
def __init__(self, ax: float, ay: float, b: float):
self.ax = ax
self.ay = ay
self.b = b
self.ex = np.sqrt(self.ax**2 - self.b**2)
self.ey = np.sqrt(self.ay**2 - self.b**2)
self.ee = np.sqrt(self.ax**2 - self.ay**2)
@classmethod
def init_name(cls, name: str):
if name == "BursaFialova1993":
ax = 6378171.36
ay = 6378101.61
b = 6356751.84
return cls(ax, ay, b)
elif name == "BursaSima1980":
ax = 6378172
ay = 6378102.7
b = 6356752.6
return cls(ax, ay, b)
elif name == "Eitschberger1978":
ax = 6378173.435
ay = 6378103.9
b = 6356754.4
return cls(ax, ay, b)
elif name == "Bursa1972":
ax = 6378173
ay = 6378104
b = 6356754
return cls(ax, ay, b)
elif name == "Bursa1970":
ax = 6378173
ay = 6378105
b = 6356754
return cls(ax, ay, b)
def ell2cart(self, beta, lamb, u):
s1 = u**2 - self.b**2
s2 = -self.ay**2 * np.sin(beta)**2 - self.b**2 * np.cos(beta)**2
s3 = -self.ax**2 * np.sin(lamb)**2 - self.ay**2 * np.cos(lamb)**2
x = np.sqrt(u**2 + self.ex**2) * np.sqrt(np.cos(beta)**2 + self.ee**2/self.ex**2 * np.sin(beta)**2)