Skip to main content

Parse CCSDS Data Message, including OEM, AEM and CDM, and convert them to a CZML scenario file.

Project description

oacmpy

Description

The object of oacmpy is currently two-fold:

  • to parse CCSDS Data Message files and,
  • to convert them to CZML file for cesium 3d mapping framework.

CCSDS is a standard for communicating satellite data between operators, but it is generally widely used for any flight dynamics software, and library orekit. (see also odmpy and orekit for python). Here, Data Messages include broadly the Navigation Data Messages but also Conjunction Data Message (CDM). Tracking Data Message (TDM) will not be implemented.

The idea behind oacmpy is to keep current tools interfaces. Rather than updating tools with specific CZML features, this module creates the files for Cesium, from your standardized output files. The generated CZML file is customizable and allow showing:

  • display trajectory (through OEM)
  • illustrating spacecraft attitude motion (through AEM)
  • showing close encounter (through CDM)

The approach is different than the use of TLE as no propagation is performed here. The propagation (and hence its accuracy and fidelity) is down to the tool used to generate the initial ephemeris file.

Usage

Extracting data from Data Messages

OEM

from oacmpy import ccsds

oem = ccsds.Oem.Oem("oem.xml", "xml")
oem.get_satellite_list()
oem.get_ephemeris("YOUR SATELLITE NAME")  # array list of epoch - position/velocity vectors

AEM (Attitude file)

aem = ccsds.Aem.Aem("aem.txt", "kvn")
aem.get_satellite_list()
aem.get_attitudes("YOUR SATELLITE NAME")  # array list of epoch - quaternions 

CDM (Conjunction file)

cdm = ccsds.Cdm.Cdm("cdm.xml", "xml") # conjunction event    
cdm.get_satellite_list()
cdm.get_tca()
cdm.get_miss_distance()
cdm.get_probability()

Generation of CZML

From Python Console

Create the CZML from OEM and AEM:

from oacmpy.czml import CdmToCzml, OemToCzml, ScenarioCzml 
oem1_czml = OemToCzml.OemAemToCzml(oem1, aem1)  # aem1 is optional

Add conjunction event with CDM:

cdm_czml = CdmToCzml.CdmToCzml(cdm)

Generate CZML file:

start = oem1.get_start_time("YOUR SATELLITE NAME")
end = oem1.get_stop_time("YOUR SATELLITE NAME")

scenario = ScenarioCzml.ScenarioCzml(start, end)
scenario.add_content(oem1_czml)
scenario.add_content(oem2_czml)
scenario.add_content(cdm_czml)
scenario.create_document("scenario.czml")

Plotting attributes are customizable, e.g., changing color, material, line with, etc.

Command line tool

If you have an OEM file and you do not bother about attitude, or configuring the graphics, you can simply run:

python -m aocmpy -i [your-oem-file] -o [output-file.czml]   

[your-oem-file] can include wildcard to process several OEM into a single CZML file. The file format (KVN or XML) of the OEM file will be guessed with the file extension.

Examples

Simple Orbit

Create a CZML with (we could as well do it directly in the Python script though ;)):

python -m oacmpy -i sample_object.oem -o one_sat.czml -v

simple orbit

Constellation

constellation

Conjunction simulation from CDM

conjunction between a satellite and a passive debris

Project details


Download files

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

Files for oacmpy, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size oacmpy-0.0.1-py3-none-any.whl (2.0 MB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page