Expand description
mako-sgp4: parse and propagate general perturbation element sets with SGP4/SDP4.
§Examples
use mako_sgp4::{from_tle_lines, sgp4_prop_delta};
// Parse a TLE and propagate to epoch
let line0 = "ISS (ZARYA)";
let line1 = "1 25544U 98067A 08264.51782528 -.00002182 -00100-2 -11606-4 0 2921";
let line2 = "2 25544 51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537";
let sgp4 = from_tle_lines(line1, line2, Some(line0)).unwrap();
let state = sgp4_prop_delta(&sgp4, 0.0).unwrap();
assert_eq!(sgp4.gp.satellite_catalog_number, 25544);
assert!(state.r_x.is_finite());Modules§
- common
- Module to handle common constants, coordinate types, and utility functions shared across GP parsing and SGP4 propagation.
- gp
- Module to handle the input and processing of GP (General Perturbation) elements. Element sets can be parsed from TLE (including Alpha-5 catalog numbers) and OMM formats, and written back to TLE and OMM KVN, XML, JSON, and CSV.
- sgp4
- Module for propagating GP element sets with SGP4
- time
- Module for datetime representation and calendar conversions used by GP parsing and SGP4 propagation (UTC Julian / Modified Julian dates).
Structs§
- Date
Time - A datetime structure
- GenPerturb
Element Set - General Perturbation Element Set for an Earth-orbiting satellite.
- Sgp4
- Simplified General Perturbations 4 (SGP4) parameters
- State
Vector - Satellite state vector
- Wgs
- World Geodetic System (WGS) parameters
Enums§
- Coordinate
Frame - Coordinate frames
- Date
Error - Date conversion errors
- GpError
- GP errors
- Sgp4
Error - SGP4 errors
- Timezone
- Timezone options for datetime representation
Constants§
Functions§
- calc_
period - Calculate the orbital period from semi-major axis and gravitational parameter
- calc_
theta_ g - Calculate Greenwich mean sidereal time (GMST) / longitude of Greenwich at a Julian date.
- dayofyr2utc
- Convert a year and day of year to a UTC datetime
- deg2rad
- Convert an angle from degrees to radians
- from_
omm_ csv_ file - Builds a vector of
Sgp4structs from a file containing Orbit Mean-Elements Message (OMM) sets in CSV format. - from_
omm_ csv_ string - Builds a vector of
Sgp4structs from a string containing Orbit Mean-Elements Message (OMM) sets in CSV format. - from_
omm_ json_ file - Builds a vector of
Sgp4structs from a file containing Orbit Mean-Elements Message (OMM) sets in JSON format. - from_
omm_ json_ string - Builds a vector of
Sgp4structs from a string containing Orbit Mean-Elements Message (OMM) sets in JSON format. - from_
omm_ kvn_ file - Builds a vector of
Sgp4structs from a file containing Orbit Mean-Elements Message (OMM) sets in CCSDS KVN format. - from_
omm_ kvn_ lines - Builds a
Sgp4struct from the lines of a single OMM KVN record. - from_
omm_ kvn_ string - Builds a vector of
Sgp4structs from a string containing Orbit Mean-Elements Message (OMM) sets in CCSDS KVN (key-value notation) format. - from_
omm_ xml_ file - Builds a vector of
Sgp4structs from a file containing Orbit Mean-Elements Message (OMM) sets in CCSDS XML format. - from_
omm_ xml_ string - Builds a vector of
Sgp4structs from a string containing Orbit Mean-Elements Message (OMM) sets in CCSDS XML format. - from_
tle_ file - Builds a vector of
Sgp4structs from a file containing Two-Line Element (TLE) sets. - from_
tle_ lines - Builds a
Sgp4struct from the lines of a Two-Line Element (TLE) set. - from_
tle_ string - Builds a vector of
Sgp4structs from a string containing Two-Line Element (TLE) sets. - init_
sgp4 - Build an
Sgp4struct for state propagation from aGenPerturbElementSetstruct - sgp4_
prop_ datetime - Propagate an initialized
Sgp4model to a UTCDateTime. - sgp4_
prop_ delta - Propagate an initialized
Sgp4model bydelta_tminutes from the TLE epoch. - to_
omm_ csv_ file - Writes a Celestrak-style CSV OMM file from a slice of
Sgp4structs. - to_
omm_ csv_ string - Builds a Celestrak-style CSV OMM string from a slice of
Sgp4structs. - to_
omm_ json_ file - Writes a Celestrak-style JSON OMM file from a slice of
Sgp4structs. - to_
omm_ json_ string - Builds a Celestrak-style JSON OMM string from a slice of
Sgp4structs. - to_
omm_ kvn_ file - Writes a CCSDS KVN OMM file from a slice of
Sgp4structs. - to_
omm_ kvn_ string - Builds a CCSDS KVN OMM string from a slice of
Sgp4structs. - to_
omm_ xml_ file - Writes a CCSDS XML OMM file from a slice of
Sgp4structs. - to_
omm_ xml_ string - Builds a CCSDS XML OMM string from a slice of
Sgp4structs. - to_
tle_ file - Writes a Two-Line Element (TLE) file from a slice of
Sgp4structs. - to_
tle_ string - Builds a Two-Line Element (TLE) string from a slice of
Sgp4structs. - utc2jday
- Convert a datetime in UTC to Julian date (JD) format.
- utc2mjday
- Convert a datetime in UTC to Modified Julian date (MJD) format.
- validate_
datetime - Validate the calendar and clock fields of a datetime