Orbit Parameter Message (OPM)

class ccsds_ndm.Opm(header, segment)

Orbit Parameter Message (OPM).

Orbit information may be exchanged between two participants by sending a state vector (see reference [H1]) for a specified epoch using an OPM. The message recipient must have an orbit propagator available that is able to propagate the OPM state vector to compute the orbit at other desired epochs. For this propagation, additional ancillary information (spacecraft properties such as mass, area, and maneuver planning data, if applicable) may be included with the message.

Parameters:
static from_file(path, format=None)

Create an OPM message from a file.

Parameters:
  • path (str) – Path to the input file.

  • format (str, optional) – Format (‘kvn’ or ‘xml’). Auto-detected if None.

Returns:

The parsed OPM object.

Return type:

Opm

static from_str(data, format=None)

Create an OPM message from a string.

header

Orbit Parameter Message (OPM).

Orbit information may be exchanged between two participants by sending a state vector (see reference [H1]) for a specified epoch using an OPM. The message recipient must have an orbit propagator available that is able to propagate the OPM state vector to compute the orbit at other desired epochs. For this propagation, additional ancillary information (spacecraft properties such as mass, area, and maneuver planning data, if applicable) may be included with the message.

Type:

OdmHeader

id

The message identifier.

Type:

Optional[str]

segment

The data segment.

Type:

OpmSegment

to_file(path, format, validate=True)

Write to file.

Parameters:
  • path (str) – Output file path.

  • format (str) – Output format (‘kvn’ or ‘xml’).

  • validate (bool, optional) – Whether to validate the message before writing (default: True).

to_str(format, validate=True)

Serialize to string.

Parameters:
  • format (str) – Output format (‘kvn’ or ‘xml’).

  • validate (bool, optional) – Whether to validate the message before writing (default: True).

Returns:

The serialized string.

Return type:

str

validate(strict=True)

Validate the message against CCSDS rules.

Parameters:

strict (bool, optional) – If True (default), raises ValueError on the first error found. If False, returns a list of validation error messages (or None if valid).

version

The message version.

Type:

str

class ccsds_ndm.OpmSegment(metadata, data)

A single segment of the OPM.

Contains metadata and data sections.

Parameters:
data

Segment data.

Type:

OpmData

metadata

A single segment of the OPM.

Contains metadata and data sections.

Type:

OpmMetadata

class ccsds_ndm.OpmMetadata(object_name, object_id, center_name=Ellipsis, ref_frame=None, time_system=None, ref_frame_epoch=None, comment=None)

OPM Metadata Section.

Parameters:
  • object_name (str) – Spacecraft name for which orbit state data is provided.

  • object_id (str) – Object identifier of the object for which orbit state data is provided.

  • center_name (str) – Origin of the reference frame.

  • ref_frame (str) – Reference frame in which state vector data is given.

  • time_system (str) – Time system used for state vector, maneuver, and covariance data.

  • ref_frame_epoch (str, optional) – Epoch of the reference frame, if not intrinsic to the definition (ISO 8601).

  • comment (list[str], optional) – Comments.

center_name

Origin of the OPM reference frame, which shall be a natural solar system body (planets, asteroids, comets, and natural satellites), including any planet barycenter or the solar system barycenter. Natural bodies shall be selected from the accepted set of values indicated in annex B, subsection B2.

Examples: EARTH EARTH BARYCENTER MOON SOLAR SYSTEM BARYCENTER SUN JUPITER BARYCENTER STS 106 EROS

Type:

str

comment

Comments (allowed at the beginning of the OPM Metadata). (See 7.8 for formatting rules.)

Examples: This is a comment

Type:

list[str]

object_id

Object identifier of the object for which orbit state data is provided. While there is no CCSDS-based restriction on the value for this keyword, it is recommended to use the international spacecraft designator as published in the UN Office of Outer Space Affairs designator index (reference [3]). Recommended values have the format YYYY-NNNP{PP}, where: YYYY = Year of launch. NNN = Three-digit serial number of launch in year YYYY (with leading zeros). P{PP} = At least one capital letter for the identification of the part brought into space by the launch. If the asset is not listed in reference [3], the UN Office of Outer Space Affairs designator index format is not used, or the content is either unknown or cannot be disclosed, the value should be set to UNKNOWN.

Examples: 2000-052A 1996-068A 2000-053A 1996-008A UNKNOWN

Type:

str

object_name

Spacecraft name for which orbit state data is provided. While there is no CCSDS-based restriction on the value for this keyword, it is recommended to use names from the UN Office of Outer Space Affairs designator index (reference [3], which include Object name and international designator of the participant). If OBJECT_NAME is not listed in reference [3] or the content is either unknown or cannot be disclosed, the value should be set to UNKNOWN.

Examples: EUTELSAT W1 MARS PATHFINDER STS 106 NEAR UNKNOWN

Type:

str

ref_frame

Reference frame in which the state vector and optional Keplerian element data are given. Use of values other than those in 3.2.3.3 should be documented in an ICD.

Examples: ICRF EME2000 ITRF2000 TEME

Type:

str

ref_frame_epoch

Epoch of reference frame, if not intrinsic to the definition of the reference frame. (See 7.5.10 for formatting rules.)

Examples: 2001-11-06T11:17:33 2002-204T15:56:23Z

Type:

Optional[str]

time_system

Time system used for state vector, maneuver, and covariance data. Use of values other than those in 3.2.3.2 should be documented in an ICD.

Examples: UTC, TAI, TT, GPS, TDB, TCB

Type:

str

class ccsds_ndm.OpmData(state_vector, comment=None)

OPM Data Section.

Parameters:

state_vector (StateVector) – State vector.

comment

Comments (see 7.8 for formatting rules).

Type:

list[str]

covariance_matrix

Covariance matrix.

Type:

Optional[OpmCovarianceMatrix]

keplerian_elements

Keplerian elements.

Type:

Optional[KeplerianElements]

maneuver_parameters

Maneuver parameters.

Type:

list[ManeuverParameters]

spacecraft_parameters

Spacecraft parameters.

Type:

Optional[SpacecraftParameters]

state_vector

State vector components (position and velocity).

Type:

StateVector

user_defined_parameters

User defined parameters.

Type:

UserDefined | None

class ccsds_ndm.OpmCovarianceMatrix(cx_x=None, cy_x=None, cy_y=None, cz_x=None, cz_y=None, cz_z=None, cx_dot_x=None, cx_dot_y=None, cx_dot_z=None, cy_dot_x=None, cy_dot_y=None, cy_dot_z=None, cz_dot_x=None, cz_dot_y=None, cz_dot_z=None, cx_dot_x_dot=None, cy_dot_x_dot=None, cy_dot_y_dot=None, cz_dot_x_dot=None, cz_dot_y_dot=None, cz_dot_z_dot=None, cov_ref_frame=None, comments=None)

Position/Velocity Covariance Matrix (6x6 Lower Triangular Form. None or all parameters of the matrix must be given. COV_REF_FRAME may be omitted if it is the same as REF_FRAME.)

Parameters:
  • cx_x (float, optional) – Position X covariance [1,1]. Units: km².

  • cy_x (float, optional) – Position X-Y covariance [2,1]. Units: km².

  • cy_y (float, optional) – Position Y covariance [2,2]. Units: km².

  • cz_x (float, optional) – Position X-Z covariance [3,1]. Units: km².

  • cz_y (float, optional) – Position Y-Z covariance [3,2]. Units: km².

  • cz_z (float, optional) – Position Z covariance [3,3]. Units: km².

  • cx_dot_x (float, optional) – Velocity X / Position X covariance [4,1]. Units: km²/s.

  • cx_dot_y (float, optional) – Velocity X / Position Y covariance [4,2]. Units: km²/s.

  • cx_dot_z (float, optional) – Velocity X / Position Z covariance [4,3]. Units: km²/s.

  • cx_dot_x_dot (float, optional) – Velocity X covariance [4,4]. Units: km²/s².

  • cy_dot_x (float, optional) – Velocity Y / Position X covariance [5,1]. Units: km²/s.

  • cy_dot_y (float, optional) – Velocity Y / Position Y covariance [5,2]. Units: km²/s.

  • cy_dot_z (float, optional) – Velocity Y / Position Z covariance [5,3]. Units: km²/s.

  • cy_dot_x_dot (float, optional) – Velocity Y / Velocity X covariance [5,4]. Units: km²/s².

  • cy_dot_y_dot (float, optional) – Velocity Y covariance [5,5]. Units: km²/s².

  • cz_dot_x (float, optional) – Velocity Z / Position X covariance [6,1]. Units: km²/s.

  • cz_dot_y (float, optional) – Velocity Z / Position Y covariance [6,2]. Units: km²/s.

  • cz_dot_z (float, optional) – Velocity Z / Position Z covariance [6,3]. Units: km²/s.

  • cz_dot_x_dot (float, optional) – Velocity Z / Velocity X covariance [6,4]. Units: km²/s².

  • cz_dot_y_dot (float, optional) – Velocity Z / Velocity Y covariance [6,5]. Units: km²/s².

  • cz_dot_z_dot (float, optional) – Velocity Z covariance [6,6]. Units: km²/s².

  • cov_ref_frame (str, optional) – Reference frame for the covariance matrix. comments : list[str], optional Comments.

Variables:

cx_x (float) – Position X covariance [1,1]. Units: km². … (see Parameters for full list of attributes with units)

comment

Comments (see 7.8 for formatting rules).

Type:

list[str]

cov_ref_frame

Reference frame in which the covariance data are given. Select from the accepted set of values indicated in 3.2.4.11.

Type:

Optional[str]

cx_dot_x

Covariance matrix [4,1]

Units: km²/s

Type:

float

cx_dot_x_dot

Covariance matrix [4,4]

Units: km²/s²

Type:

float

cx_dot_y

Covariance matrix [4,2]

Units: km²/s

Type:

float

cx_dot_z

Covariance matrix [4,3]

Units: km²/s

Type:

float

cx_x

Covariance matrix [1,1]

Units: km²

Type:

float

cy_dot_x

Covariance matrix [5,1]

Units: km²/s

Type:

float

cy_dot_x_dot

Covariance matrix [5,4]

Units: km²/s²

Type:

float

cy_dot_y

Covariance matrix [5,2]

Units: km²/s

Type:

float

cy_dot_y_dot

Covariance matrix [5,5]

Units: km²/s²

Type:

float

cy_dot_z

Covariance matrix [5,3]

Units: km²/s

Type:

float

cy_x

Covariance matrix [2,1]

Units: km²

Type:

float

cy_y

Covariance matrix [2,2]

Units: km²

Type:

float

cz_dot_x

Covariance matrix [6,1]

Units: km²/s

Type:

float

cz_dot_x_dot

Covariance matrix [6,4]

Units: km²/s²

Type:

float

cz_dot_y

Covariance matrix [6,2]

Units: km²/s

Type:

float

cz_dot_y_dot

Covariance matrix [6,5]

Units: km²/s²

Type:

float

cz_dot_z

Covariance matrix [6,3]

Units: km²/s

Type:

float

cz_dot_z_dot

Covariance matrix [6,6]

Units: km²/s²

Type:

float

cz_x

Covariance matrix [3,1]

Units: km²

Type:

float

cz_y

Covariance matrix [3,2]

Units: km²

Type:

float

cz_z

Covariance matrix [3,3]

Units: km²

Type:

float

class ccsds_ndm.KeplerianElements(semi_major_axis, eccentricity, inclination, ra_of_asc_node, arg_of_pericenter, gm, true_anomaly=None, mean_anomaly=None)

Osculating Keplerian Elements in the Specified Reference Frame (none or all parameters of this block must be given).

References: - CCSDS 502.0-B-3, Section 3.2.4 (OPM Data Section)

Parameters:
  • semi_major_axis (float) – Semi-major axis (km).

  • eccentricity (float) – Eccentricity (dimensionless).

  • inclination (float) – Inclination (deg).

  • ra_of_asc_node (float) – Right ascension of the ascending node (deg).

  • arg_of_pericenter (float) – Argument of pericenter (deg).

  • gm (float) – Gravitational coefficient (km³/s²).

  • true_anomaly (float, optional) – True anomaly (deg).

  • mean_anomaly (float, optional) – Mean anomaly (deg).

Variables:
  • semi_major_axis (float) – Semi-major axis. Units: km.

  • eccentricity (float) – Eccentricity. Units: dimensionless.

  • inclination (float) – Inclination. Units: deg.

  • ra_of_asc_node (float) – Right ascension of the ascending node. Units: deg.

  • arg_of_pericenter (float) – Argument of pericenter. Units: deg.

  • gm (float) – Gravitational coefficient (GM). Units: km³/s².

  • true_anomaly (float or None) – True anomaly. Units: deg.

  • mean_anomaly (float or None) – Mean anomaly. Units: deg.

arg_of_pericenter

Argument of pericenter

Units: deg

Type:

float

comment

Comments (see 7.8 for formatting rules).

Type:

list[str]

eccentricity

Eccentricity

Units: n/a

Type:

float

gm

Gravitational Coefficient (Gravitational Constant × Central Mass)

Units: km³/s²

Type:

float

inclination

Inclination

Units: deg

Type:

float

mean_anomaly

True anomaly or mean anomaly

Units: deg

Type:

Optional[float]

ra_of_asc_node

Right ascension of ascending node

Units: deg

Type:

float

semi_major_axis

Semi-major axis

Units: km

Type:

float

true_anomaly

True anomaly or mean anomaly

Units: deg

Type:

Optional[float]