INNER CODE UNIT · Python

_teme_to_ecef_into

ATTron/astroz · bindings/python/astroz/__init__.py:128

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]
    x, y = p[..., 0].copy(), p[..., 1].copy()
    p[..., 0] = c * x + s * y
    p[..., 1] = c * y - s * x
    if vel is not None:
        v = vel[:, sats]
        vx, vy = v[..., 0].copy(), v[..., 1].copy()
        v[..., 0] = c * vx + s * vy + _EARTH_ROTATION_RATE * p[..., 1]
        v[..., 1] = c * vy - s * vx - _EARTH_ROTATION_RATE * p[..., 0]


def _ecef_to_geodetic_into(pos, sats):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…