Koordinatenumrechnungen funktionieren inkl. Randfälle, GHA2_num funktioniert mit Standard Ellipsoid
This commit is contained in:
@@ -1,68 +1,9 @@
|
||||
import numpy as np
|
||||
#from ellipsoide import EllipsoidTriaxial
|
||||
from ellipsoide import EllipsoidTriaxial
|
||||
import Numerische_Integration.num_int_runge_kutta as rk
|
||||
|
||||
import ausgaben as aus
|
||||
|
||||
# Panou 2013
|
||||
|
||||
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.ax**2)
|
||||
self.ey = np.sqrt((self.ay**2 - self.b**2) / self.ay**2)
|
||||
self.ee = np.sqrt((self.ax**2 - self.ay**2) / self.ax**2)
|
||||
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):
|
||||
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 == "BursaSima1980round":
|
||||
# Panou 2013
|
||||
ax = 6378172
|
||||
ay = 6378103
|
||||
b = 6356753
|
||||
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)
|
||||
elif name == "Bessel-biaxial":
|
||||
ax = 6377397.15509
|
||||
ay = 6377397.15508
|
||||
b = 6356078.96290
|
||||
return cls(ax, ay, b)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def gha2_num(ell: EllipsoidTriaxial, beta_1, lamb_1, beta_2, lamb_2, n=16000, epsilon=10**-12, iter_max=30):
|
||||
"""
|
||||
|
||||
@@ -383,8 +324,8 @@ if __name__ == "__main__":
|
||||
beta2 = np.deg2rad(75)
|
||||
lamb2 = np.deg2rad(66)
|
||||
a1, a2, s = gha2_num(ell, beta1, lamb1, beta2, lamb2)
|
||||
print(np.rad2deg(a1))
|
||||
print(np.rad2deg(a2))
|
||||
print(aus.gms("a1", a1, 4))
|
||||
print(aus.gms("a2", a2, 4))
|
||||
print(s)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user