Projekt aufgeräumt, gha1 getestet, Runge-Kutta angepasst (gha2_num sollte jetzt deutlich schneller sein)

This commit is contained in:
2026-01-09 17:49:49 +01:00
parent cf756e3d9a
commit 797afdfd6f
23 changed files with 832 additions and 868 deletions

21
GHA_biaxial/rk.py Normal file
View File

@@ -0,0 +1,21 @@
import runge_kutta as rk
from numpy import sin, cos, tan
import winkelumrechnungen as wu
from ellipsoide import EllipsoidBiaxial
import numpy as np
def gha1(re: EllipsoidBiaxial, x0, y0, z0, A0, s, num):
phi0, lamb0, h0 = re.cart2ell(0.001, wu.gms2rad([0, 0, 0.001]), x0, y0, z0)
def buildODE():
def ODE(s, v):
phi, lam, A = v
dphi = cos(A) * re.V(phi) ** 3 / re.c
dlam = sin(A) * re.V(phi) / (cos(phi) * re.c)
dA = tan(phi) * sin(A) * re.V(phi) / re.c
return np.array([dphi, dlam, dA])
return ODE
_, funktionswerte = rk.rk4(buildODE(), 0, np.array([phi0, lamb0, A0]), s, num)
coords = re.ell2cart(funktionswerte[-1][0], funktionswerte[-1][1], h0)
return coords