Skip to main content

Crate sgp

Crate sgp 

Source
Expand description

A small Rust port of the MATLAB SGP8 routine found in refs/SGP8/sgp8.m.

The public function sgp8/sgp4 implements the orbital propagator and returns position (km) and velocity (km/min) vectors.

Structs§

SatData
Satellite input parameters required by the SGP ports.
Vector3
A simple 3-vector of f64 used for position/velocity results.

Functions§

actan
days2mdh
Convert fractional day-of-year into month, day, hour, minute and second.
ecef2tod
Convert TEME state vectors to ECEF (Earth-fixed) coordinates.
fmod2p
Parse a TLE pair (line1, line2) and return SatData.
mjday
Parse TLE epoch (yyddd.dddddd) from line 1 and return MJD (UTC)
parse_tle_lines
Create SatData from typical TLE numeric fields.
read_eop_for_mjd
Convert ECEF state vectors to True-Of-Date (TOD) frame.
satdata_from_tle
sgp4
Port of the MATLAB sgp4 routine (refs/SGP4/sgp4.m).
sgp8
Port of the MATLAB sgp8 routine. Returns (position_km, velocity_km_per_min)
teme2ecef
Convert a state from TEME to an ECI-like frame (precession+nutation applied).
teme2eci
Compute the sidereal rotation matrix and its time derivative.
timediff
Compute several time-scale differences used by the transforms.
tle_epoch_mjd
Wrap angle into the range [0, 2*pi).