import numpy as np def reihenentwicklung(es: float, c: float, phi: float) -> float: """ Berechnung der Strecke auf einer Ellipse. Reihenentwicklung. :param es: zweite numerische Exzentrizität :type es: float :param c: Polkrümmungshalbmesser :type c: float :param phi: ellipsoidisch geodästische Breite in Radiant :type phi: float :return: Strecke auf einer Ellipse vom Äquator aus :rtype: float """ Ass = 1 - 3/4*es**2 + 45/64*es**4 - 175/256*es**6 + 11025/16384*es**8 Bss = - 3/4*es**2 + 15/16*es**4 - 525/512*es**6 + 2205/2048*es**8 Css = 15/64*es**4 - 105/256*es**6 + 2205/4096*es**8 Dss = - 35/512*es**6 + 315/2048*es**8 print(f"A'' = {round(Ass, 10):.10f}\nB'' = {round(Bss, 10):.10f}\nC'' = {round(Css, 10):.10f}\nD'' = {round(Dss, 10):.10f}") s = c * (Ass*phi + 1/2*Bss * np.sin(2*phi) + 1/4*Css * np.sin(4*phi) + 1/6*Dss * np.sin(6*phi)) return s def polyapp_tscheby_hayford(phi: float) -> float: """ Berechnung der Strecke auf einer Ellipse. Polynomapproximation mittels Tschebyscheff-Polynomen. Auf dem Hayford-Ellipsoid. :param phi: ellipsoidisch geodästische Breite in Radiant :type phi: float :return: Strecke auf einer Ellipse vom Äquator aus :rtype: float """ c1s = 0.00829376218 c2s = -0.00398963425 c3s = 0.00084200710 c4s = -0.0000648906 c5s = -0.00001075680 c6s = 0.00000396474 c7s = -0.00000046347 alpha = 9951793.0123 xi = 2 / np.pi * phi xis = xi ^ 2 s = alpha * xi * (1 + c1s * xis + c2s * xis**2 + c3s * xis**3 + c4s * xis**4 + c5s * xis**5 + c6s * xis**6 + c7s * xis**7) return s def polyapp_tscheby_bessel(phi: float) -> float: """ Berechnung der Strecke auf einer Ellipse. Polynomapproximation mittels Tschebyscheff-Polynomen. Auf dem Bessel-Ellipsoid. :param phi: ellipsoidisch geodästische Breite in Radiant :type phi: float :return: Strecke auf einer Ellipse vom Äquator aus :rtype: float """ c1s = 0.00823417717 c2s = -0.00396170744 c3s = 0.00083680249 c4s = -0.00006488462 c5s = -0.00001053242 c6s = 0.00000390854 c7s = -0.00000045768 alpha = 9950730.8876 xi = 2 / np.pi * phi xis = xi ** 2 s = alpha * xi * (1 + c1s * xis + c2s * xis**2 + c3s * xis**3 + c4s * xis**4 + c5s * xis**5 + c6s * xis**6 + c7s * xis**7) return s