Core & Common Types¶
- ccsds_ndm.from_str(data, format=None)¶
Parse a string containing KVN or XML.
- ccsds_ndm.from_file(path, format=None)¶
Parse from a file path (KVN or XML).
- ccsds_ndm.convert(data, to_format)¶
Convert any recognized NDM message between KVN and XML through the shared generation gate.
- ccsds_ndm.convert_file(source_path, destination_path, to_format)¶
Convert any recognized NDM file and atomically replace the destination on success.
- class ccsds_ndm.CombinedNdm(messages, id=None, comments=Ellipsis)¶
Combined Instantiation Navigation Data Message (NDM).
It is possible to create an XML instance that incorporates any number of NDM messages in a logical suite called an ‘NDM combined instantiation’. Such combined instantiations may be useful for some situations, for example: (1) a constellation of spacecraft in which ephemeris data for all of the spacecraft is combined in a single XML message; (2) a spacecraft attitude that depends upon a particular orbital state (an APM and its associated OPM could be conveniently conveyed in a single NDM); (3) an ephemeris message with the set of tracking data messages used in the orbit determination.
- static from_file(path, format=None)¶
Parse an XML combined NDM file. KVN has no combined representation.
- static from_str(data, format=None)¶
Parse an XML combined NDM. KVN has no combined representation.
- messages¶
List of contained navigation messages.
- to_file(path, format)¶
Atomically write this combined NDM as XML.
Requesting
format="kvn"raisesNdmUnsupportedNotationErrorand leaves the destination untouched.
- to_str(format)¶
Serialize to an XML string.
Requesting
format="kvn"raisesNdmUnsupportedNotationError.
- validate()¶
Validate the combined message against CCSDS rules.
- class ccsds_ndm.UserDefined(parameters=None, comment=None)¶
USER DEFINED PARAMETERS block (userDefinedType). User-defined parameters.
Allow for the exchange of any desired orbital data not already provided in the message.
- Parameters:
- commentlist[str], optional
Comments.
- comment¶
Comments (see 7.8 for formatting rules).
CCSDS Reference: 502.0-B-3, Section 6.2.9.
- class ccsds_ndm.OdmHeader(creation_date, originator, classification=None, message_id=None, comment=None)¶
Represents the odmHeader complex type.
- Parameters:
- classification¶
User-defined free-text message classification/caveats of this ODM. It is recommended that selected values be pre-coordinated between exchanging entities by mutual agreement.
Examples: SBU, ‘Operator-proprietary data; secondary distribution not permitted’
CCSDS Reference: 502.0-B-3, Section 3.2.2.
- Type:
Optional[str]
- comment¶
Comments (allowed in the ODM Header only immediately after the ODM version number). (See 7.8 for formatting rules.)
Examples: This is a comment
CCSDS Reference: 502.0-B-3, Section 3.2.2.
- creation_date¶
File creation date/time in UTC. (For format specification, see 7.5.10.)
Examples: 2001-11-06T11:17:33, 2002-204T15:56:23Z
CCSDS Reference: 502.0-B-3, Section 3.2.2.
- Type:
- message_id¶
ID that uniquely identifies a message from a given originator. The format and content of the message identifier value are at the discretion of the originator.
Examples: OPM_201113719185, ABC-12_34
CCSDS Reference: 502.0-B-3, Section 3.2.2.
- Type:
Optional[str]
- originator¶
Creating agency or operator. Select from the accepted set of values indicated in annex B, subsection B1 from the ‘Abbreviation’ column (when present), or the ‘Name’ column when an Abbreviation column is not populated. If desired organization is not listed there, follow procedures to request that originator be added to SANA registry.
Examples: CNES, ESOC, GSFC, GSOC, JPL, JAXA, INTELSAT, USAF, INMARSAT
CCSDS Reference: 502.0-B-3, Section 3.2.2.
- Type:
- class ccsds_ndm.StateVector(epoch, x, y, z, x_dot, y_dot, z_dot, comment=None)¶
State Vector Components in the Specified Coordinate System.
- Parameters:
epoch (str) – Epoch of the state vector.
x (float) – Position vector X-component (km).
y (float) – Position vector Y-component (km).
z (float) – Position vector Z-component (km).
x_dot (float) – Velocity vector X-component (km/s).
y_dot (float) – Velocity vector Y-component (km/s).
z_dot (float) – Velocity vector Z-component (km/s).
- comment¶
Comments (allowed at the beginning of the OPM Metadata). (See 7.8 for formatting rules.)
CCSDS Reference: 502.0-B-3, Section 3.2.4.
- epoch¶
Epoch of state vector & optional Keplerian elements (see 7.5.10 for formatting rules).
CCSDS Reference: 502.0-B-3, Section 3.2.4.
- Type:
- x_dot¶
Velocity vector X-component.
Units: km/s
CCSDS Reference: 502.0-B-3, Section 3.2.4.
- Type:
- y_dot¶
Velocity vector Y-component.
Units: km/s
CCSDS Reference: 502.0-B-3, Section 3.2.4.
- Type:
- class ccsds_ndm.StateVectorAcc(epoch, x, y, z, x_dot, y_dot, z_dot, x_ddot=None, y_ddot=None, z_ddot=None)¶
State Vector Components in the Specified Coordinate System.
- Parameters:
epoch (str) – Epoch of the state vector.
x (float) – Position vector X-component (km).
y (float) – Position vector Y-component (km).
z (float) – Position vector Z-component (km).
x_dot (float) – Velocity vector X-component (km/s).
y_dot (float) – Velocity vector Y-component (km/s).
z_dot (float) – Velocity vector Z-component (km/s).
x_ddot (float, optional) – Acceleration vector X-component (km/s²).
y_ddot (float, optional) – Acceleration vector Y-component (km/s²).
z_ddot (float, optional) – Acceleration vector Z-component (km/s²).
- epoch¶
Epoch of the ephemeris state vector (see 7.5.10 for formatting rules).
CCSDS Reference: 502.0-B-3, Section 5.2.4.
- Type:
- x_ddot¶
Acceleration vector X-component.
Units: km/s²
CCSDS Reference: 502.0-B-3, Section 5.2.4.
- Type:
Optional[float]
- x_dot¶
Velocity vector X-component.
Units: km/s
CCSDS Reference: 502.0-B-3, Section 5.2.4.
- Type:
- y_ddot¶
Acceleration vector Y-component.
Units: km/s²
CCSDS Reference: 502.0-B-3, Section 5.2.4.
- Type:
Optional[float]
- y_dot¶
Velocity vector Y-component.
Units: km/s
CCSDS Reference: 502.0-B-3, Section 5.2.4.
- Type:
Enums¶
Exceptions¶
- exception ccsds_ndm.NdmError¶
Generic CCSDS NDM error.
- exception ccsds_ndm.NdmFormatError¶
Error during parsing of NDM data (KVN or XML).
- exception ccsds_ndm.NdmKvnParseError¶
Error during KVN parsing.
- exception ccsds_ndm.NdmXmlError¶
Error during XML parsing or serialization.
- exception ccsds_ndm.NdmValidationError¶
Validation error against CCSDS rules.
- exception ccsds_ndm.NdmEpochError¶
Error parsing a CCSDS epoch string.
- exception ccsds_ndm.NdmIoError¶
I/O error during file operations.
- exception ccsds_ndm.NdmUnsupportedMessageError¶
Unsupported CCSDS message type.
- exception ccsds_ndm.NdmUnsupportedNotationError¶
The requested notation has no CCSDS-defined representation for this message family.