GHA triaxial nach Panou Korakitis 2019 läuft
bei ax=ay Fehler irgendwas bei gha1 biaxial noch falsch, evtl Umrechnung
This commit is contained in:
@@ -54,9 +54,9 @@ class EllipsoidBiaxial:
|
||||
|
||||
phi2p = lambda self, phi: self.N(phi) * np.cos(phi)
|
||||
|
||||
def ellipsoidische_Koords (self, Eh, Ephi, x, y, z):
|
||||
def cart2ell(self, Eh, Ephi, x, y, z):
|
||||
p = np.sqrt(x**2+y**2)
|
||||
print(f"p = {round(p, 5)} m")
|
||||
# print(f"p = {round(p, 5)} m")
|
||||
|
||||
lamb = np.arctan(y/x)
|
||||
|
||||
@@ -80,9 +80,18 @@ class EllipsoidBiaxial:
|
||||
if dphi < Ephi:
|
||||
break
|
||||
for i in range(len(phii)):
|
||||
print(f"P3[{i}]: {aus.gms('phi', phii[i], 5)}\th = {round(hi[i], 5)} m")
|
||||
# print(f"P3[{i}]: {aus.gms('phi', phii[i], 5)}\th = {round(hi[i], 5)} m")
|
||||
pass
|
||||
return phi, lamb, h
|
||||
|
||||
def ell2cart(self, phi, lamb, h):
|
||||
W = np.sqrt(1 - self.e**2 * np.sin(phi)**2)
|
||||
N = self.a / W
|
||||
x = (N+h) * np.cos(phi) * np.cos(lamb)
|
||||
y = (N+h) * np.cos(phi) * np.sin(lamb)
|
||||
z = (N * (1-self.e**2) + h) * np.sin(lamb)
|
||||
return x, y, z
|
||||
|
||||
class EllipsoidTriaxial:
|
||||
def __init__(self, ax: float, ay: float, b: float):
|
||||
self.ax = ax
|
||||
@@ -94,6 +103,9 @@ class EllipsoidTriaxial:
|
||||
self.ex_ = np.sqrt((self.ax**2 - self.b**2) / self.b**2)
|
||||
self.ey_ = np.sqrt((self.ay**2 - self.b**2) / self.b**2)
|
||||
self.ee_ = np.sqrt((self.ax**2 - self.ay**2) / self.ay**2)
|
||||
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):
|
||||
@@ -122,6 +134,11 @@ class EllipsoidTriaxial:
|
||||
ay = 6378105
|
||||
b = 6356754
|
||||
return cls(ax, ay, b)
|
||||
elif name == "Bessel-biaxial":
|
||||
ax = 6377397.155085
|
||||
ay = 6377397.15508
|
||||
b = 6356078.96290
|
||||
return cls(ax, ay, b)
|
||||
|
||||
def ell2cart(self, beta, lamb, u):
|
||||
"""
|
||||
@@ -233,9 +250,9 @@ if __name__ == "__main__":
|
||||
stellen = 20
|
||||
geod1 = ellips.cart2geod("ligas1", 5712200, 2663400, 1106000)
|
||||
print(aus.gms("phi", geod1[0], stellen), aus.gms("lambda", geod1[1], stellen), "h =", geod1[2])
|
||||
geod2 = ellips.cart2geod("ligas2", 5712216.95426783, 2663487.024865021, 1106098.8415910944)
|
||||
geod2 = ellips.cart2geod("ligas2", 5712200, 2663400, 1106000)
|
||||
print(aus.gms("phi", geod2[0], stellen), aus.gms("lambda", geod2[1], stellen), "h =", geod2[2])
|
||||
geod3 = ellips.cart2geod("ligas3", 5712216.95426783, 2663487.024865021, 1106098.8415910944)
|
||||
geod3 = ellips.cart2geod("ligas3", 5712200, 2663400, 1106000)
|
||||
print(aus.gms("phi", geod3[0], stellen), aus.gms("lambda", geod3[1], stellen), "h =", geod3[2])
|
||||
cart1 = ellips.geod2cart(geod1[0], geod1[1], geod1[2])
|
||||
print(aus.xyz(cart1[0], cart1[1], cart1[2], 10))
|
||||
@@ -243,4 +260,7 @@ if __name__ == "__main__":
|
||||
print(aus.xyz(cart2[0], cart2[1], cart2[2], 10))
|
||||
cart3 = ellips.geod2cart(geod3[0], geod3[1], geod3[2])
|
||||
print(aus.xyz(cart3[0], cart3[1], cart3[2], 10))
|
||||
|
||||
test_cart = ellips.geod2cart(0.175, 0.444, 100)
|
||||
print(aus.xyz(test_cart[0], test_cart[1], test_cart[2], 10))
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user