Skip to main content

CCSDS-NDM

Project description

CCSDS-NDM CircleCI Status CCSDS-NDM Codecov Status Documentation Status

Description

The Consultative Committee for Space Data Systems (CCSDS) develops communications and data systems standards for spaceflight. CCSDS Navigation Data Messages (NDM) is the set of file standards to define common data types such as trajectory, orbit, attitude and conjunction events. These data types are routinely generated and exchanged within and between spacecraft operators, space agencies, researchers, amateurs and commercial companies. As such, accurate definition and common interpretation of the data is crucial (and sometimes mission-critical).

The standard description for each data type is encapsulated in an XML Schema file. This project ccsds-ndm aims to be the reference open-source Python implementation to read and write the NDM XML files, through an object tree API, auto-generated by these schema files.

The source code is on Github and the documentation is on Readthedocs.

Usage and Examples

There are two use cases:

  • The ccsds-ndm library reads the NDM file, fills an object tree and offers it to the users. The users will then have to fill their own attitude, orbit or trajectory objects used in their libraries.

  • The user fills an object tree from their own attitude, orbit or trajectory object. The ccsds-ndm library writes the NDM file using this object tree.

For the first use case, reading an OEM file from xml_read_path is as simple as (file type is inferred automatically):

>>> cdm = NdmIo().from_path(xml_read_path)

The output cdm is the object tree for a Conjunction Data Message (CDM). The contents can then be reached going deeper in the object tree. This example shows how to reach the orbit normal position component of the relative state vector:

>>> print(cdm.body.relative_metadata_data.relative_state_vector.relative_position_n)

Filling the objects with data properly requires some care. As the standard is understandably strict, the object tree derived from the XSD files are also rather exacting in how they accept data. The recommended way to fill the objects is with value and unit information:

>>> # This is the proper way to write data into the object
>>> cdm.body.relative_metadata_data.relative_state_vector.relative_position_t = LengthType(Decimal(800), LengthUnits.M)

Finally, once filled with the relevant data, the cdm object can be written to xml_write_path with:

>>> NdmIo().to_file(cdm, xml_write_path)

The ndm object trees are not very user friendly and most probably will have to be filled by the users’ own equivalent objects (trajectory, orbit, attitude etc.).

Installing ccsds-ndm

The ccsds-ndm package is on PyPI and you can install it simply by running:

pip install ccsds_ndm

You can also install it via conda-forge:

conda install -c conda-forge ccsds_ndm

Do not install ccsds-ndm using sudo.

More Information Regarding the CCSDS-NDM

The top-level description of the standard is given in the Navigation Data — Definitions and Conventions Green Book and Navigation Data Messages Overview Green Book. Individual data types are defined in their individual definitions (e.g. Conjunction Data Message and Orbit Data Message). The centre for all the standards are CCSDS Mission Operations and Information Management Services Area.

The Schema files are found in the SANA Registry.

Design and Limitations

The object tree is created by xsdata library, which also handles parsing and writing of the XML data. As such, there is no documentation generated for this object tree.

Currently the published standards are at version 1.0, but version 2.0 will be out soon. They will be integrated into the code once they are made official.

Requirements

  • xsData is used to read and write XML files (and also to generate the object tree)

License

This project is Copyright (c) Egemen Imre and licensed under the terms of the GNU GPL v3+ 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

ccsds_ndm-1.1.tar.gz (51.4 kB view details)

Uploaded Source

Built Distribution

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

ccsds_ndm-1.1-py2.py3-none-any.whl (51.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ccsds_ndm-1.1.tar.gz.

File metadata

  • Download URL: ccsds_ndm-1.1.tar.gz
  • Upload date:
  • Size: 51.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.0

File hashes

Hashes for ccsds_ndm-1.1.tar.gz
Algorithm Hash digest
SHA256 3d6a09ac19b263a0b79ea6f00b0b0d8d1a8722648d444eb06269ade82fb17551
MD5 8f69f254ef7e1a3b650502c9ffd281e3
BLAKE2b-256 dc7e7291351c5f66057cf03f3eca5f17e84642af439fff71c354a6d7e63c13a8

See more details on using hashes here.

File details

Details for the file ccsds_ndm-1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: ccsds_ndm-1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 51.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.0

File hashes

Hashes for ccsds_ndm-1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fa932904fc1bc6749e606624b8a9978b749dfc6d498b2f71ac739ab150666cb9
MD5 94b1a6d189508a0d92d5eb57031f4ca7
BLAKE2b-256 d5dcd77861513039537e76c47632f7511a279dbfcbc0113ca49d3ecc5172fa21

See more details on using hashes here.

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