kleine Anpassungen
This commit is contained in:
@@ -151,10 +151,15 @@ class EllipsoidTriaxial:
|
||||
b = 6356078.96290
|
||||
return cls(ax, ay, b)
|
||||
elif name == "Fiction":
|
||||
ax = 5500000
|
||||
ay = 4500000
|
||||
ax = 6000000
|
||||
ay = 5000000
|
||||
b = 4000000
|
||||
return cls(ax, ay, b)
|
||||
elif name == "KarneyTest2024":
|
||||
ax = np.sqrt(2)
|
||||
ay = 1
|
||||
b = 1 / np.sqrt(2)
|
||||
return cls(ax, ay, b)
|
||||
|
||||
def point_on(self, point: np.ndarray) -> bool:
|
||||
"""
|
||||
@@ -171,7 +176,7 @@ class EllipsoidTriaxial:
|
||||
def ellu2cart(self, beta: float, lamb: float, u: float) -> np.ndarray:
|
||||
"""
|
||||
Panou 2014 12ff.
|
||||
Ellipsoidische Breite+Länge sind nicht gleich der geodätischen
|
||||
Elliptische Breite+Länge sind nicht gleich der geodätischen
|
||||
Verhältnisse des Ellipsoids bekannt, Größe verändern bis Punkt erreicht,
|
||||
dann ist u die Größe entlang der z-Achse
|
||||
:param beta: ellipsoidische Breite [rad]
|
||||
@@ -200,8 +205,8 @@ class EllipsoidTriaxial:
|
||||
def ell2cart(self, beta: float, lamb: float) -> np.ndarray:
|
||||
"""
|
||||
Panou, Korakitis 2019 2
|
||||
:param beta: ellipsoidische Breite [rad]
|
||||
:param lamb: ellipsoidische Länge [rad]
|
||||
:param beta: elliptische Breite [rad]
|
||||
:param lamb: elliptische Länge [rad]
|
||||
:return: Punkt in kartesischen Koordinaten
|
||||
"""
|
||||
if beta == -np.pi/2:
|
||||
@@ -228,7 +233,7 @@ class EllipsoidTriaxial:
|
||||
"""
|
||||
Panou 2014 15ff.
|
||||
:param point: Punkt in kartesischen Koordinaten
|
||||
:return: ellipsoidische Breite, ellipsoidische Länge, Größe entlang der z-Achse
|
||||
:return: elliptische Breite, elliptische Länge, Größe entlang der z-Achse
|
||||
"""
|
||||
x, y, z = point
|
||||
c2 = self.ax**2 + self.ay**2 + self.b**2 - x**2 - y**2 - z**2
|
||||
@@ -259,7 +264,7 @@ class EllipsoidTriaxial:
|
||||
"""
|
||||
Panou, Korakitis 2019 2f.
|
||||
:param point: Punkt in kartesischen Koordinaten
|
||||
:return: ellipsoidische Breite, ellipsoidische Länge
|
||||
:return: elliptische Breite, elliptische Länge
|
||||
"""
|
||||
x, y, z = point
|
||||
|
||||
@@ -316,7 +321,7 @@ class EllipsoidTriaxial:
|
||||
|
||||
return beta, lamb
|
||||
|
||||
def cart2geod(self, mode: str, point: np.ndarray, maxIter: int = 30, maxLoa: float = 0.005) -> tuple[float, float, float]:
|
||||
def cart2geod(self, point: np.ndarray, mode: str = "ligas3", maxIter: int = 30, maxLoa: float = 0.005) -> tuple[float, float, float]:
|
||||
"""
|
||||
Ligas 2012
|
||||
:param mode: ligas1, ligas2, oder ligas3
|
||||
@@ -405,7 +410,7 @@ class EllipsoidTriaxial:
|
||||
:param point: Punkt in kartesischen Koordinaten, der gelotet werden soll
|
||||
:return: Lotpunkt in kartesischen Koordinaten, geodätische Koordinaten des Punktes
|
||||
"""
|
||||
phi, lamb, h = self.cart2geod("ligas3", point)
|
||||
phi, lamb, h = self.cart2geod(point, "ligas3")
|
||||
x, y, z = self. geod2cart(phi, lamb, 0)
|
||||
return np.array([x, y, z]), phi, lamb, h
|
||||
|
||||
@@ -416,7 +421,7 @@ class EllipsoidTriaxial:
|
||||
:param h: Höhe über dem Ellipsoid
|
||||
:return: hochgeloteter Punkt
|
||||
"""
|
||||
phi, lamb, _ = self.cart2geod("ligas3", point)
|
||||
phi, lamb, _ = self.cart2geod(point, "ligas3")
|
||||
pointH = self. geod2cart(phi, lamb, h)
|
||||
return pointH
|
||||
|
||||
@@ -430,6 +435,7 @@ class EllipsoidTriaxial:
|
||||
x = self.ax * np.cos(u) * np.cos(v)
|
||||
y = self.ay * np.cos(u) * np.sin(v)
|
||||
z = self.b * np.sin(u)
|
||||
z = np.broadcast_to(z, np.shape(x))
|
||||
return np.array([x, y, z])
|
||||
|
||||
def cart2para(self, point: np.ndarray) -> tuple[float, float]:
|
||||
@@ -457,6 +463,26 @@ class EllipsoidTriaxial:
|
||||
|
||||
return u, v
|
||||
|
||||
def ell2para(self, beta, lamb) -> tuple[float, float]:
|
||||
cart = self.ell2cart(beta, lamb)
|
||||
return self.cart2para(cart)
|
||||
|
||||
def para2ell(self, u, v) -> tuple[float, float]:
|
||||
cart = self.para2cart(u, v)
|
||||
return self.cart2ell(cart)
|
||||
|
||||
def para2geod(self, u: float, v: float, mode: str = "ligas3", maxIter: int = 30, maxLoa: float = 0.005) -> tuple[float, float, float]:
|
||||
cart = self.para2cart(u, v)
|
||||
return self.cart2geod(cart, mode, maxIter, maxLoa)
|
||||
|
||||
def geod2para(self, phi, lamb, h) -> tuple[float, float]:
|
||||
cart = self.geod2cart(phi, lamb, h)
|
||||
return self.cart2para(cart)
|
||||
|
||||
def ell2geod(self, beta, lamb, mode: str = "ligas3", maxIter: int = 30, maxLoa: float = 0.005) -> tuple[float, float, float]:
|
||||
cart = self.ell2cart(beta, lamb)
|
||||
return self.cart2geod(cart, mode, maxIter, maxLoa)
|
||||
|
||||
def func_H(self, x, y, z):
|
||||
return x ** 2 + y ** 2 / (1 - self.ee ** 2) ** 2 + z ** 2 / (1 - self.ex ** 2) ** 2
|
||||
|
||||
@@ -523,19 +549,20 @@ if __name__ == "__main__":
|
||||
cart_para = ell.para2cart(para[0], para[1])
|
||||
diff_para = np.sum(np.abs(point-cart_para))
|
||||
|
||||
geod = ell.cart2geod("ligas1", point)
|
||||
cart_geod = ell.geod2cart(geod[0], geod[1], geod[2])
|
||||
diff_geod1 = np.sum(np.abs(point-cart_geod))
|
||||
# geod = ell.cart2geod(point, "ligas1")
|
||||
# cart_geod = ell.geod2cart(geod[0], geod[1], geod[2])
|
||||
# diff_geod1 = np.sum(np.abs(point-cart_geod))
|
||||
#
|
||||
# geod = ell.cart2geod(point, "ligas2")
|
||||
# cart_geod = ell.geod2cart(geod[0], geod[1], geod[2])
|
||||
# diff_geod2 = np.sum(np.abs(point-cart_geod))
|
||||
|
||||
geod = ell.cart2geod("ligas2", point)
|
||||
cart_geod = ell.geod2cart(geod[0], geod[1], geod[2])
|
||||
diff_geod2 = np.sum(np.abs(point-cart_geod))
|
||||
|
||||
geod = ell.cart2geod("ligas3", point)
|
||||
geod = ell.cart2geod(point, "ligas3")
|
||||
cart_geod = ell.geod2cart(geod[0], geod[1], geod[2])
|
||||
diff_geod3 = np.sum(np.abs(point-cart_geod))
|
||||
|
||||
diff_list.append([beta_deg, lamb_deg, diff_ell, diff_para, diff_geod1, diff_geod2, diff_geod3])
|
||||
diff_list.append([beta_deg, lamb_deg, diff_ell, diff_para, diff_geod3])
|
||||
diff_list.append([diff_ell])
|
||||
|
||||
diff_list = np.array(diff_list)
|
||||
pass
|
||||
Reference in New Issue
Block a user