Skip to main content

Lossless round-trip across orbital state-vector and ephemeris formats.

Project description

orbit-formats

CI Docs PyPI Python versions License: MIT

Lossless round-trip across orbital state-vector and ephemeris formats.

Status: orbit-formats reads TLE, CCSDS OEM (KVN), and GMAT report files, writes CCSDS OEM, and round-trips OEM losslessly. More formats (the rest of the CCSDS NDM family, SP3, STK, SPK, RINEX) and a real frame-rotation layer land in later versions. See the changelog for released functionality.

What this is

orbit-formats reads any supported orbital state or ephemeris format into a single canonical in-memory representation, writes it back to any supported target, and round-trips losslessly when the two formats can express the same information. When a conversion cannot preserve information — covariance a target cannot hold, the mean-element semantics of a TLE, a value truncated to a format's field width — it emits an explicit, structured warning naming what was lost, never a silent drop.

It consolidates the format-I/O layer that astro-tools projects keep re-implementing into one permissively-licensed (MIT) library that anything in the org — or outside it — can depend on as the single source of format truth.

Quick start

from orbit_formats import read, write

# read auto-detects the format; an OEM becomes a canonical Ephemeris
eph = read("orbit.oem")

# the canonical DataFrame downstream consumers adopt: Epoch, X, Y, Z, VX, VY, VZ
df = eph.to_dataframe()
df.attrs["coordinate_system"], df.attrs["time_scale"]

# round-trip a file byte-for-byte by retaining the source
write(read("orbit.oem", retain_source=True), "copy.oem")

A conversion that cannot carry every field across warns (naming what was lost) rather than dropping data silently; one that cannot be done without modelling — a TLE's mean elements to an ephemeris — is refused, not faked. See the lossy-conversion contract and the conversion-capability matrix.

Supported formats

Format Read Write Canonical form
TLE / 3LE mean-element set
CCSDS OEM (KVN) ephemeris
GMAT report ephemeris / state

The canonical representation — a small typed dataclass family unified by a metadata spine — is the format-agnostic form everything reads into and writes from.

What this is not

  • Not a propagator, integrator, or analysis toolkit — it does only the conversion the formats themselves require.
  • Not a general frame-transformation engine — it performs the time-scale and frame transforms cross-format conversion needs and defers arbitrary transforms to astropy or SPICE.
  • Not a way to turn a TLE's mean elements into an osculating state — that is a propagation, not a format conversion.

Installation

pip install orbit-formats

SPICE SPK support is kept behind an optional extra (heavier binary-kernel dependency):

pip install orbit-formats[spk]

orbit-formats requires Python 3.10, 3.11, or 3.12.

Documentation

Full docs at https://astro-tools.github.io/orbit-formats/.

Development

git clone https://github.com/astro-tools/orbit-formats.git
cd orbit-formats
uv sync --all-groups

See CONTRIBUTING.md for the full branch / PR / test workflow.

Licence

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orbit_formats-0.1.0.tar.gz (196.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orbit_formats-0.1.0-py3-none-any.whl (65.0 kB view details)

Uploaded Python 3

File details

Details for the file orbit_formats-0.1.0.tar.gz.

File metadata

  • Download URL: orbit_formats-0.1.0.tar.gz
  • Upload date:
  • Size: 196.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orbit_formats-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a61673707a5d33249b4efdfcd1528c54dacfd597f1664b14ca5ec161df466dfd
MD5 7446be9be1e23fedf32b8d92a43f959c
BLAKE2b-256 d26d025f682498c1c746171e2499bb2596d487f20f6d40b549181ae4c5095269

See more details on using hashes here.

Provenance

The following attestation bundles were made for orbit_formats-0.1.0.tar.gz:

Publisher: release.yml on astro-tools/orbit-formats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orbit_formats-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: orbit_formats-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 65.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orbit_formats-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd8f8048e8a988e92be89a2b27d6fa845f8e39a8fc556270ba38fadec656a26
MD5 cf011520b4e3d6997c54d541e75a67a3
BLAKE2b-256 d754b1c727f25dfe5b5299e8e1afd0c26fb960dcf01f430a142c1518b09c8658

See more details on using hashes here.

Provenance

The following attestation bundles were made for orbit_formats-0.1.0-py3-none-any.whl:

Publisher: release.yml on astro-tools/orbit-formats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page