IRBEM includes the SGP4 (Simplified General Perturbation-4) orbit propagator for NORAD two-line element (TLE) sets. Two entry points are provided:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PRBEM/IRBEM/llms.txt
Use this file to discover all available pages before exploring further.
SGP4_TLE propagates TLE files obtained from external sources, while SGP4_ELE computes orbit coordinates directly from a set of orbital elements without requiring a TLE file. A utility routine RV2COE converts position/velocity state vectors to classical orbital elements.
Unlike the original SGP4 implementation, IRBEM’s version accepts start time, stop time, and time step in seconds rather than minutes. This was chosen for convenience.
SGP4_TLE
SGP4_TLE propagates NORAD two-line elements from a file and writes the resulting spacecraft position time series to an output file. TLE sets can be obtained from http://celestrak.com/.
Parameters
Controls the start and stop time source:
| Value | Behaviour |
|---|---|
0 | Start and stop times are read from the TLE file itself |
1 | Start and stop times are supplied by the user via startsfe and stopsfe |
Start time as seconds from the epoch of each TLE. May be negative. Ignored when
runtype = 0.Stop time as seconds from the epoch of each TLE. May be negative. Ignored when
runtype = 0.Propagation time step in seconds.
Path and filename of the input TLE file, encoded as a byte array.
Length of the
InFileByte string.Path and filename for the output file, encoded as a byte array.
Length of the
OutFileByte string.Output
The output file contains 6 space-delimited columns per propagated time step:| Column | Quantity | Format / Units |
|---|---|---|
| 1 | Date | dd/mm/yyyy |
| 2 | Time | hh:mm:ss |
| 3 | Decimal year | — |
| 4 | Altitude | km |
| 5 | Latitude | degrees |
| 6 | East longitude | degrees |
Call Sequences
The MATLAB wrapper automatically computes
runtype, strlenIn, OutFileByte, and strlenOut. By default it writes to a temporary file (onera_desp_lib_sgp4_tle.tmp), reads the results back into a MATLAB structure, and deletes the temporary file. To retain the output as a text file for very long TLE runs, call onera_desp_lib_sgp4_tle(InFile, OutFile).SGP4_ELE
SGP4_ELE propagates an orbit defined by orbital elements rather than a TLE file and returns the spacecraft positions as arrays in the user-selected output coordinate system.
Parameters
Key for the output coordinate system. See the coordinate systems reference.
Year of the start epoch.
Month of the start epoch.
Day of the start epoch.
Hour of the start epoch.
Minute of the start epoch.
Seconds of the start epoch.
Six orbital elements. Their meaning depends on the
options array:options(1) | Type | e1 | e2 | e3 | e4 | e5 | e6 |
|---|---|---|---|---|---|---|---|
1 | ONERA | inclination (deg) | perigee altitude (km) | apogee altitude (km) | RAAN (deg) | arg/lon of perigee (deg) | anomaly/latitude/longitude |
2 | Classical | semimajor axis (Re) | eccentricity | inclination (deg) | RAAN (deg) | arg/lon of perigee (deg) | anomaly |
3 | RV | xGEI (km) | yGEI (km) | zGEI (km) | VxGEI (km/s) | VyGEI (km/s) | VzGEI (km/s) |
4 | Solar | inclination (deg) | perigee altitude (km) | apogee altitude (km) | LT of apogee (h) | LT of max inclination (h) | anomaly |
5 | Mean | mean motion (rev/day) | eccentricity | inclination (deg) | RAAN (deg) | arg/lon of perigee (deg) | anomaly |
Element type specifiers:
options(1): orbital element set type (1–5, see table above)options(2):1= argument of perigee,2= longitude of perigee (for types 1, 2, 5)options(3):1= time since perigee passage (s),2= true anomaly (deg),3= argument of latitude (deg),4= true longitude (deg),5= mean anomaly (deg)
Start time from the provided epoch in seconds. May be negative.
Stop time from the provided epoch in seconds. May be negative.
Propagation step time in seconds.
Output
Year for each orbital position.
Day of year for each orbital position.
Time of day in seconds for each position.
First coordinate in
sysaxesOUT.Second coordinate in
sysaxesOUT.Third coordinate in
sysaxesOUT.Call Sequences
RV2COE — State Vector to Orbital Elements
RV2COE converts a position and velocity vector in GEI coordinates to the classical set of orbital elements. It is included in the IRBEM SGP4 distribution.
Parameters
Position vector in GEI (km).
Velocity vector in GEI (km/s).
Output
Semilatus rectum (km).
Semimajor axis (km).
Eccentricity.
Inclination (rad).
Longitude of ascending node (rad).
Argument of perigee (rad).
True anomaly (rad).
Mean anomaly (rad).
Argument of latitude (rad).
True longitude (rad).
Longitude of periapsis (rad).