Skip to main content

Convert GMAT (and any canonical-schema) trajectories to CZML for browser-based 3D Cesium visualization.

Project description

gmat-czml

CI Docs PyPI Python versions License: MIT

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


Download files

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

Source Distribution

gmat_czml-0.1.0.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

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

gmat_czml-0.1.0-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

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

Hashes for gmat_czml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1cb04ac48650aa5521b3db81ace408bdfa4cdbd127017afcca081f4d8575077b
MD5 470b19219f09527ee20449647615c2c6
BLAKE2b-256 988ddd0aae0bc2a3338089b0e726e6c6c2203448e69f1157b6ba34d3a45bdb8c

See more details on using hashes here.

Provenance

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

Publisher: release.yml on astro-tools/gmat-czml

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

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

Hashes for gmat_czml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0c2525b7a3eb84c1eebe0a00657505faa10dac0f050d31bf73b154431c7a6e4
MD5 1314d1cb3012fb64fd8c154206a5d2f5
BLAKE2b-256 d4449a20b974dc3c5a66275f908e9163efe0ce38fad263efdd825c58e2ccceff

See more details on using hashes here.

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

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