Command-line tools for processing, converting, propagating, comparing, and visualizing OEM, OPM, OMM, and TLE ephemeris data with TudatPy and Tudat.
This project provides a practical toolkit for working with ephemerides and related astrodynamics data. Built on top of TudatPy and Tudat, it includes a focused set of command-line tools for ingesting, transforming, comparing, propagating, and plotting CCSDS OEM, OPM, OMM, and TLE data.
The toolkit supports workflows for working with ephemeris products: parse OEM, OMM, and TLE inputs, fit or convert mean elements, propagate trajectories, compare results, and visualize dependent variables and orbit differences.
The propagation commands cover numerical Cartesian propagation (propagate-orbit), two-body Kepler propagation from OPM elements (propagate-kepler), and model-selected mean-element propagation (propagate-omm and propagate-tle).
flowchart LR
fmt_oem{{"OEM / State Vectors <br/> (CCSDS OEM or simple format: epoch x y z vx vy vz)"}}
fmt_opm{{"OPM (.opm) <br/> Cartesian-only or Cartesian + osculating Keplerian elements"}}
fmt_omm{{"OMM (.omm)"}}
fmt_tle{{"TLE (.tle)"}}
fmt_dep_vars_csv{{"Dependent Variables CSV"}}
fmt_plots{{"Plots / Animations <br/> (Matplotlib figures)"}}
fmt_raw_states{{"Raw Cartesian state lines <br/> (epoch x y z vx vy vz)"}}
fmt_aer{{"AER text <br/> (stdout)"}}
oem_to_omm(["oem-to-omm"])
oem_to_tle(["oem-to-tle"])
oem_to_opm(["oem-to-opm"])
propagate_sat(["propagate-orbit"])
propagate_kepler(["propagate-kepler"])
propagate_omm(["propagate-omm"])
plot_oem(["plot-oem"])
plot_oem_diff(["plot-oem-diff"])
plot_dep_vars(["plot-dependent-variables"])
diff_oem(["diff-oem"])
slice_oem(["slice-oem"])
xform_oem(["xform-oem"])
fmt_oem --> oem_to_omm
oem_to_omm --> fmt_omm
fmt_oem --> oem_to_tle
oem_to_tle -->|"SGP4 TLE (via intermediate OMM)"| fmt_tle
fmt_oem --> oem_to_opm
oem_to_opm --> fmt_opm
fmt_opm -->|"Cartesian initial state"| propagate_sat
propagate_sat -->|"state history"| fmt_oem
propagate_sat -->|"--dep-vars (optional)"| fmt_dep_vars_csv
fmt_opm -->|"complete osculating Keplerian element set"| propagate_kepler
propagate_kepler --> fmt_oem
fmt_omm -->|"OMM input"| propagate_omm
propagate_omm --> fmt_oem
fmt_oem -->|"two files: reference + comparison"| diff_oem
fmt_oem --> plot_oem
fmt_oem -->|"reference + optional comparisons"| plot_oem_diff
plot_oem --> fmt_plots
plot_oem_diff --> fmt_plots
fmt_dep_vars_csv --> plot_dep_vars
plot_dep_vars --> fmt_plots
fmt_oem --> slice_oem
slice_oem -->|"OEM output"| fmt_oem
slice_oem -->|"--data-only"| fmt_raw_states
slice_oem -->|"Cartesian-only single-state OPM"| fmt_opm
fmt_oem -->|"source frame + target frame"| xform_oem
xform_oem -->|"converted OEM"| fmt_oem
xform_oem -->|"AER text"| fmt_aer
flowchart LR
fmt_tle{{"TLE (.tle)"}}
fmt_opm{{"OPM (.opm) <br/> Cartesian-only or Cartesian + osculating Keplerian elements"}}
fmt_omm{{"OMM (.omm)"}}
fmt_oem{{"OEM / State Vectors <br/> (CCSDS OEM or simple format: epoch x y z vx vy vz)"}}
download_tle(["download-tle"])
omm_to_tle(["omm-to-tle"])
tle_to_omm(["tle-to-omm"])
tle_info(["tle-info"])
oem_to_omm(["oem-to-omm"])
oem_to_tle(["oem-to-tle"])
oem_to_opm(["oem-to-opm"])
omm_to_opm(["omm-to-opm"])
tle_to_opm(["tle-to-opm"])
fmt_text_report{{"TLE summary / fitting report <br/> (stdout or file)"}}
propagate_tle(["propagate-tle"])
propagate_omm(["propagate-omm"])
propagate_kepler(["propagate-kepler"])
fmt_tle --> tle_to_omm
tle_to_omm --> fmt_omm
fmt_omm --> omm_to_tle
omm_to_tle --> fmt_tle
fmt_tle --> tle_info
tle_info -->|"epoch, state, osculating elements"| fmt_text_report
fmt_oem --> oem_to_omm
oem_to_omm --> fmt_omm
fmt_oem -->|"Cartesian state history"| oem_to_tle
oem_to_tle -->|"SGP4 TLE via intermediate OMM"| fmt_tle
fmt_oem -->|"Cartesian state history"| oem_to_opm
oem_to_opm --> fmt_opm
fmt_tle --> propagate_tle
propagate_tle --> fmt_oem
fmt_omm --> propagate_omm
propagate_omm --> fmt_oem
fmt_omm -->|"declared mean-element model"| omm_to_opm
omm_to_opm -->|"reference arc propagation + numerical fit"| fmt_opm
fmt_tle -->|"SGP4 reference arc"| tle_to_opm
tle_to_opm -->|"reference arc propagation + numerical fit"| fmt_opm
fmt_opm -->|"complete osculating Keplerian element set"| propagate_kepler
propagate_kepler --> fmt_oem
download_tle -->|"default format: TLE"| fmt_tle
download_tle -->|"--format omm"| fmt_omm
| Workflow | Command |
|---|---|
| OEM comparison | diff-oem |
| OEM slicing | slice-oem |
| OEM frame/coordinate transformation | xform-oem |
| OEM to OPM fitting | oem-to-opm |
| OEM to OMM fitting | oem-to-omm |
| OEM to TLE fitting | oem-to-tle |
| Workflow | Command |
|---|---|
| Numerical orbit propagation | propagate-orbit |
| Mean Keplerian orbit propagation | propagate-omm |
| DSST semi-analytical propagation | propagate-omm (via MEAN_ELEMENT_THEORY = DSST) |
| Kepler propagation | propagate-kepler |
| TLE propagation | propagate-tle |
| Workflow | Command |
|---|---|
| TLE download | download-tle |
| OMM to TLE | omm-to-tle |
| TLE inspection | tle-info |
| TLE to OMM | tle-to-omm |
| OMM to OPM fitting | omm-to-opm |
| TLE to OPM fitting | tle-to-opm |
| Workflow | Command |
|---|---|
| Orbit plotting | plot-oem |
| Orbit-delta plotting | plot-oem-diff |
| Dependent-variable plotting | plot-dependent-variables |
TudatPy-dependent workflows require TudatPy and its transitive dependencies through an external installation method.
diff-oem— compare corresponding states from two OEM files with optional rotation fitting and time-shift correction.slice-oem— slice OEM files by index or time range (with optional interpolation).xform-oem— transform OEM state vectors between supported reference frames and convert ECEF positions to AER coordinates.
propagate-orbit— numerical orbit propagation with configurable perturbations and Cartesian state integrationpropagate-omm— propagate OMM elements to OEM output using SGP4 or DSST where supported; other non-TLE theories use a labeled two-body Kepler fallbackpropagate-kepler— two-body Kepler propagationpropagate-tle— SGP4 TLE propagation
Supports CCSDS OEM export, data-only state-vector output, dependent-variable CSV export, and OEM metadata headers.
Fits OEM Cartesian state histories to mean-element models and writes a CCSDS OMM. Supported fit models are Brouwer, DSST, and SGP4. Use oem-to-tle for TLE output; it fits through an intermediate OMM and then formats the TLE.
Fits an OEM arc and writes an OPM using either a two-body osculating fit or a numerical fit. Both modes write a Cartesian state; the two-body mode also writes fitted Keplerian elements.
download-tle— download CelesTrak GP data in a selected format, including TLE and OMMomm-to-tle— convert OMM → TLEtle-to-omm— convert TLE → OMMtle-info— inspect TLE informationomm-to-opm— propagate OMM elements and numerically fit an OPM statetle-to-opm— propagate a TLE with SGP4 and numerically fit an OPM state
plot-oem— visualize orbit trajectories and output state historiesplot-oem-diff— plot and compare multiple orbitsplot-dependent-variables— plot dependent variables from propagation output
Reusable Python modules providing foundational astrodynamics functionality. These are imported by the application modules and CLI tools.
Key modules:
- Interpolation — Hermite, Chebyshev, and Lagrange polynomial interpolators with configurable degree
- CCSDS — OEM, OPM, OMM, and ODM parsers and writers
- Time utilities — ISO 8601, duration parsing, time conversions
- Orbital elements — Cartesian ↔ Keplerian conversions, anomaly calculations
- Coordinate transformations — Frame conversions, WGS-84, AER coordinates
- TLE utilities — TLE parsing, validation, and conversions
See CORE_LIBRARY_SUMMARY.md for an overview of all available modules and functions.
src/
├── ephem_toolkit/
│ ├── core/ Shared astrodynamics and time utilities
│ │ ├── ccsds/ CCSDS ODM, OEM, OPM, and OMM models and parsers
│ │ ├── interpolator/ Lagrange, Hermite, and Chebyshev interpolation
│ │ ├── propagator/ Kepler, Brouwer, DSST, numerical, and SGP4 models
│ │ └── ... Coordinate, time, and orbital-element modules
│ ├── diff_oem/ OEM comparison
│ ├── download_tle/ CelesTrak GP data download
│ ├── oem_to_omm/ OEM mean-element fitting
│ ├── oem_to_opm/ OEM-to-OPM two-body and numerical fitting
│ ├── oem_to_tle/ OEM-to-TLE fitting wrapper
│ ├── omm_to_opm/ OMM-to-OPM numerical fitting wrapper
│ ├── omm_to_tle/ OMM-to-TLE conversion
│ ├── plot_dep_vars/ Dependent-variable plotting
│ ├── plot_oem/ Orbit visualization
│ ├── plot_oem_diff/ Orbit-difference plotting
│ ├── propagate_kepler/ Two-body Kepler propagation
│ ├── propagate_omm/ OMM and TLE propagation
│ ├── propagate_orbit/ Numerical Cartesian propagation
│ ├── propagate_tle/ TLE propagation wrapper
│ ├── slice_oem/ OEM slicing
│ ├── tle_info/ TLE inspection
│ ├── tle_to_omm/ TLE-to-OMM conversion
│ ├── tle_to_opm/ TLE-to-OPM numerical fitting wrapper
│ └── xform_oem/ OEM frame transformation
└── ... Other project source modules
tests/ Unit tests and sample data files
docs/
├── core/ Core library guides and API notes
├── formats/ CCSDS format references
├── tools/ Flat set of command-line tool guides
├── architecture/ Dependency and data-flow diagrams
└── development/ Style guide and project to-do list
README.md Project overview and usage guide
pyproject.toml Project configuration and dependencies
- Python 3.9 or newer
- The package's required dependencies are installed with the project: Astropy, Astroquery, Colorama, NumPy, Pandas, and Tabulate.
- Install the optional
plottingextra to use the plotting commands, which requires Matplotlib:pip install ".[plotting]" - Numerical propagation and some orbit-fitting workflows require TudatPy, which is not installed as a package dependency and must be installed separately using the TudatPy installation instructions.
To install the package without the plotting extra:
pip install .