ommHandling

Read CCSDS Orbit Mean-Elements Message (OMM) general perturbations data and convert it to osculating classical orbital elements in the Basilisk inertial (J2000/ICRF) frame.

OMM supports NORAD catalog numbers of up to nine digits, removing the classic numeric TLE field’s five-digit restriction. The U.S. Space Force (USSF) assigns catalog numbers; CelesTrak distributes the data. This reader supports IDs through 999999999 and preserves them in OmmData.noradID, independently of SGP4’s internal identifier. See CelesTrak’s GP format documentation.

All four CelesTrak encodings are accepted and auto-detected: XML, JSON, CSV and KVN. The mean elements are handed to SGP4 exactly as tleHandling does for a TLE, so both paths produce osculating elements through the same propagation and frame conversion. Only the Earth-centered, TEME, UTC, SGP4 profile is supported.

class ommHandling.OmmData(oe: ClassicElements, ommEpoch: datetime, satName: str = 'BSK-Sat-00', noradID: str = '00000', objectID: str = '0000-000A', classification: str = 'Unknown', revAtEpoch: int = 0, propagator: str = '0', elemSetNo: int = 999, meanMotion: float = 0.0, nDot: float = 0.0, nDotDot: float = 0.0, bStar: float = 0.0, centerName: str = 'EARTH', refFrame: str = 'TEME', meanElementTheory: str = 'SGP4', timeSystem: str = 'UTC')[source]

Bases: object

Hold the orbital elements and metadata of a single OMM record.

Mirrors Basilisk.utilities.tleHandling.TleData, with the OMM-only metadata added and the TLE-only line-format fields dropped.

ommHandling.satOmm2elem(omm_path: str) → list[source]

Convert the OMM records of a constellation to osculating orbital elements for each satellite.

The encoding (XML, JSON, CSV or KVN) is detected from the file contents. Catalog numbers, including nine-digit OMM IDs, are preserved in noradID without being constrained by SGP4’s internal identifier storage.

Calendar-date and day-of-year epochs accept arbitrary fractional-second digits. Digits beyond microsecond precision are truncated consistently for ommEpoch, SGP4 initialization and propagation, and frame conversion.

Only Earth-centered, TEME, UTC, SGP4 records with ephemeris type 0 (CelesTrak default) or 2 (SGP4) are supported. JSON and CSV records may omit CENTER_NAME, REF_FRAME, TIME_SYSTEM, and MEAN_ELEMENT_THEORY; CelesTrak’s EARTH/TEME/UTC/SGP4 defaults then apply. XML and KVN require these fields explicitly. Empty or incompatible declarations cause the record to be skipped with a warning before SGP4 is invoked.

Numeric XML/KVN unit declarations must match the CCSDS units used by SGP4: deg, rev/day, rev/day**2, rev/day**3, and inverse Earth radii (1/ER or 1/[Earth radii]) for BSTAR. Dimensionless fields must omit units. Unsupported declarations cause the record to be skipped; values are not converted between units. Omitted units use these same conventions.

CLASSIFICATION_TYPE accepts U, C, or S after trimming whitespace and normalizing case. Missing or blank values default to U; unsupported values cause the record to be skipped before SGP4 is invoked.

Parameters:

omm_path – path to an OMM file holding one or many satellites

Returns:

ommDataList: list of OmmData, one per satellite, each carrying the osculating orbital elements in oe plus the record’s metadata