Convert GMAT (and any canonical-schema) trajectories to CZML for browser-based 3D Cesium visualization.
Project description
gmat-czml
Convert GMAT (and any canonical-schema) trajectories to CZML for browser-based 3D Cesium visualization.
What this is
gmat-czml takes an already-computed trajectory — a state history in the canonical state-series form — and turns it into a CZML document a Cesium client can animate: an orbit path, a ground track, a point and a label, on a clock synthesized from the trajectory's own time span. The input is not GMAT-specific — any producer that yields the canonical schema (a TLE propagation, a transfer, a read ephemeris) works through one call.
It does not propagate, integrate, or solve orbits, and it does not render: the producer is the source of geometric truth, and Cesium is the renderer. gmat-czml is the bridge between them.
Quick start
from gmat_czml import to_czml
czml = to_czml(trajectory, ground_track=True)
czml.save("orbit.czml") # load in any Cesium viewer
# czml.to_json() / czml.to_dict() # in-memory, no file needed
trajectory is a canonical state-series DataFrame, an orbit-formats Ephemeris, a file
orbit-formats can read (OEM, GMAT report, SP3, STK ephemeris, …), or an iterable of these for a
multi-object scene. See the gallery for
runnable examples.
The canonical input
A trajectory is one row per sample with the columns and DataFrame.attrs metadata below — the
shape orbit-formats emits and a headless GMAT run produces, so it flows in with no reshaping.
| Columns | Epoch (datetime), X Y Z (required); VX VY VZ (optional) |
|---|---|
| Metadata | object_name, central_body, coordinate_system, time_scale (required), units, interpolation, interpolation_degree |
The reference frame and time scale are required, never guessed; everything else has a sensible default. A malformed input raises a typed error naming exactly what is wrong. Full contract: the schema reference.
Supported Cesium clients
The output is a standard CZML document — any Cesium client renders it:
| Client | How |
|---|---|
| CesiumJS | Cesium.CzmlDataSource.load(czml) in the core library |
| Cesium ion | stream/host assets and imagery; load the document with the same call |
| Resium | the CesiumJS components for React |
No setup beyond a Cesium viewer is needed; for a zero-install look, drop a .czml onto
Cesium Sandcastle.
What this is not
- Not a propagation or astrodynamics library — it converts a trajectory, never computes one.
- Not a CZML renderer — it produces CZML; Cesium renders it.
- Not a format parser — reading trajectory files is delegated to the org's format-I/O library.
- Not a hosted service — viewing happens in your own Cesium client.
Installation
pip install gmat-czml
gmat-czml requires Python 3.10, 3.11, or 3.12.
Documentation
Full docs — getting started, the schema, per-entity conversion, the CLI, the gallery, and the API reference — at https://astro-tools.github.io/gmat-czml/. The design rationale lives in the design decisions.
Development
git clone https://github.com/astro-tools/gmat-czml.git
cd gmat-czml
uv sync --all-groups
See CONTRIBUTING.md for the branch / PR / test workflow.
Licence
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gmat_czml-0.1.0.tar.gz.
File metadata
- Download URL: gmat_czml-0.1.0.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cb04ac48650aa5521b3db81ace408bdfa4cdbd127017afcca081f4d8575077b
|
|
| MD5 |
470b19219f09527ee20449647615c2c6
|
|
| BLAKE2b-256 |
988ddd0aae0bc2a3338089b0e726e6c6c2203448e69f1157b6ba34d3a45bdb8c
|
Provenance
The following attestation bundles were made for gmat_czml-0.1.0.tar.gz:
Publisher:
release.yml on astro-tools/gmat-czml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmat_czml-0.1.0.tar.gz -
Subject digest:
1cb04ac48650aa5521b3db81ace408bdfa4cdbd127017afcca081f4d8575077b - Sigstore transparency entry: 1724373792
- Sigstore integration time:
-
Permalink:
astro-tools/gmat-czml@503cecaae61491c65aa989be72818c1e9e63bd90 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/astro-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@503cecaae61491c65aa989be72818c1e9e63bd90 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gmat_czml-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gmat_czml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0c2525b7a3eb84c1eebe0a00657505faa10dac0f050d31bf73b154431c7a6e4
|
|
| MD5 |
1314d1cb3012fb64fd8c154206a5d2f5
|
|
| BLAKE2b-256 |
d4449a20b974dc3c5a66275f908e9163efe0ce38fad263efdd825c58e2ccceff
|
Provenance
The following attestation bundles were made for gmat_czml-0.1.0-py3-none-any.whl:
Publisher:
release.yml on astro-tools/gmat-czml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmat_czml-0.1.0-py3-none-any.whl -
Subject digest:
e0c2525b7a3eb84c1eebe0a00657505faa10dac0f050d31bf73b154431c7a6e4 - Sigstore transparency entry: 1724374019
- Sigstore integration time:
-
Permalink:
astro-tools/gmat-czml@503cecaae61491c65aa989be72818c1e9e63bd90 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/astro-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@503cecaae61491c65aa989be72818c1e9e63bd90 -
Trigger Event:
push
-
Statement type: