Expand description
CCSDS Conjunction Data Message (CDM) KVN and XML format reader and writer.
CDM (CCSDS 508.0-B-1) describes a predicted close approach between two space objects: the time of closest approach, miss geometry, collision probability, the per-object metadata block, and per-object state vectors with RTN position-and-velocity covariance. This module owns the language-independent grammar for both serializations:
- KVN (Keyword=Value Notation): line tokenization, the
KEY = VALUE [unit]split, trailing-unit stripping, theCOMMENT HBR =convention, object-block segmentation, the leading-float value parser, the state/covariance extraction, and the KVN line layout used on encode. - XML: a real DOM parse via the
roxmltreecrate (which correctly handles the<?xml?>declaration, comments, namespaces, entity escaping, and encoding), then name-based leaf-element lookup over the document and the two<segment>subtrees for the same state/covariance extraction. Encoding emits the CCSDS document layout through a controlled serializer (seeencode_xml).
Both run identically regardless of the calling language, so they live in the core.
Date/time fields cross this boundary as raw strings: resolving TCA /
CREATION_DATE to a concrete instant (and formatting one back) is the host’s
job using its native date/time type, exactly as the TLE epoch is handled. This
module deliberately does not depend on the time-scale machinery, and applies
no calendar validation; it only carries the textual value through.
Structs§
- CdmKvn
- A two-object conjunction parsed from a CDM message (KVN or XML). Date/time fields are the raw textual values; the host resolves them to its own instant type.
- CdmObject
- One object’s CCSDS metadata block, state vector, and RTN covariance. Every
metadata field is the verbatim textual value (CCSDS enum fields such as
OBJECT_TYPEandMANEUVERABLEare carried as strings); absent fields areNoneand are not emitted on encode.
Enums§
- CdmError
- Failure modes of
parse_kvn. The message strings are the historical public contract surfaced by the Elixir binding. - CdmInput
Error Kind - CDM boundary-validation failure category.
Functions§
- encode_
kvn - Encode a
CdmKvnback to KVN text. - encode_
xml - Encode a
CdmKvnto a CCSDS 508.0-B-1 CDM XML document. - parse_
kvn - Parse a CDM in KVN format.
- parse_
xml - Parse a CDM in XML format.