INNER CODE UNIT · Python
d
ATTron/astroz · bindings/python/astroz/__init__.py:117
d = np.asarray(jd, dtype=np.float64) - 2451545.0
t = d / 36525.0
gmst = 280.46061837 + 360.98564736629 * d + 0.000387933 * t * t - t * t * t / 38710000.0
return np.deg2rad(np.mod(gmst, 360.0))
_EARTH_ROTATION_RATE = 7.2921150e-5 # rad/s, constants.earth.rotationRate
_WGS84_A = 6378.137
_WGS84_E2 = 6.69437999014e-3
def _teme_to_ecef_into(pos, vel, jd, sats):
"""Rotate pos[:, sats] (and vel) from TEME to ECEF in place. Velocity is
the derivative of the ECEF track (rotation minus omega x r), matching the
Zig writeOutput path."""
theta = _gmst_rad(jd)[:, None]
c, s = np.cos(theta), np.sin(theta)
p = pos[:, sats]