Orbit Mean-Elements Message (OMM)

class ccsds_ndm.Omm(header, segment)

Orbit Mean-Elements Message (OMM).

The OMM contains the orbital characteristics of a single object at a specified epoch, expressed in mean Keplerian elements: mean motion, eccentricity, inclination, right ascension of ascending node, argument of perigee, and mean anomaly.

These elements are adequate for providing the initial mean state of analytical and semi-analytical orbit models (e.g., SGP4). The OMM includes keywords and values that may be used to generate canonical NORAD Two Line Element (TLE) sets to accommodate the needs of heritage users.

Parameters:
static from_file(path, format=None)

Create an OMM 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 OMM object.

Return type:

Omm

static from_str(data, format=None)
static from_tle_lines(line1, line2, object_name=None, object_id=None, originator=None, message_id=None, creation_date=None)

Build a minimal OMM from NORAD TLE line 1 and line 2.

Parameters:
  • line1 (str) – TLE line 1 (69 chars including checksum, or 68 chars without checksum).

  • line2 (str) – TLE line 2 (69 chars including checksum, or 68 chars without checksum).

  • object_name (str, optional) – Metadata OBJECT_NAME override (default: “UNKNOWN”).

  • object_id (str, optional) – Metadata OBJECT_ID override (default: derived from TLE launch designator).

  • originator (str, optional) – Header ORIGINATOR override (default: “UNKNOWN”).

  • message_id (str, optional) – Header MESSAGE_ID override.

  • creation_date (str, optional) – Header CREATION_DATE override in CCSDS epoch format.

header

Orbit Mean-Elements Message (OMM).

The OMM contains the orbital characteristics of a single object at a specified epoch, expressed in mean Keplerian elements: mean motion, eccentricity, inclination, right ascension of ascending node, argument of perigee, and mean anomaly.

These elements are adequate for providing the initial mean state of analytical and semi-analytical orbit models (e.g., SGP4). The OMM includes keywords and values that may be used to generate canonical NORAD Two Line Element (TLE) sets to accommodate the needs of heritage users.

Type:

OdmHeader

id

The message identifier.

Type:

Optional[str]

segment

The data segment.

Type:

OmmSegment

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’). (Mandatory)

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

Returns:

The serialized string.

Return type:

str

to_tle_lines()

Generate canonical NORAD TLE lines (line 1 and line 2) from this OMM.

Returns:

(line1, line2) without a line 0.

Return type:

tuple[str, 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.OmmSegment(metadata, data)

Create a new OMM Segment.

Parameters:
data

Segment data.

Type:

OmmData

metadata

Segment metadata.

Type:

OmmMetadata

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

Metadata for the OMM.

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

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

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

  • ref_frame (str) – Reference frame in which the Keplerian element data are given.

  • time_system (str) – Time system used for Keplerian elements and covariance data.

  • mean_element_theory (str) – Description of the Mean Element Theory. Indicates the proper method to employ to propagate the state.

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

  • comment (list of str, optional) – Comments (allowed at the beginning of the OMM Metadata).

center_name

Origin of the OMM 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, MARS, MOON

Type:

str

comment

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

Examples: This is a comment

Type:

list[str]

mean_element_theory

Description of the Mean Element Theory. Indicates the proper method to employ to propagate the state.

Examples: SGP, SGP4, SGP4-XP, DSST, USM

Type:

str

object_id

Object identifier of the object for which mean element 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: 2005-046A, 2005-046B, 2003-022A, UNKNOWN

Type:

str

object_name

Spacecraft name for which mean element 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: Telkom 2, Spaceway 2, INMARSAT 4-F2, UNKNOWN

Type:

str

ref_frame

Reference frame in which the Keplerian element data are given. Use of values other than those in 3.2.3.3 should be documented in an ICD. NOTE—NORAD Two Line Element Sets and corresponding Simplified General Perturbations (SGP) orbit propagator ephemeris outputs are explicitly defined to be in the True Equator Mean Equinox of Date (TEME of Date) reference frame. Therefore, TEME of date shall be used for OMMs based on NORAD Two Line Element sets, rather than the almost imperceptibly different TEME of Epoch (see reference [H2] or [H3] for further details).

Examples: ICRF, ITRF2000, EME2000, 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 Keplerian elements and covariance data. Use of values other than those in 3.2.3.2 should be documented in an ICD.

Examples: UTC

Type:

str

class ccsds_ndm.OmmData(mean_elements, comments=None)

OMM Data section.

comment

Comments.

Type:

list[str]

covariance_matrix

Position/Velocity Covariance Matrix (6x6 Lower Triangular Form).

Type:

Optional[OpmCovarianceMatrix]

mean_elements

Mean Keplerian Elements in the Specified Reference Frame.

Type:

MeanElements

spacecraft_parameters

Spacecraft Parameters.

Type:

Optional[SpacecraftParameters]

tle_parameters

TLE Related Parameters (Only required if MEAN_ELEMENT_THEORY=SGP/SGP4).

Type:

Optional[TleParameters]

user_defined_parameters

User-Defined Parameters.

Type:

UserDefined | None

class ccsds_ndm.MeanElements(epoch, eccentricity, inclination, ra_of_asc_node, arg_of_pericenter, mean_anomaly, semi_major_axis=None, mean_motion=None, gm=None)

Mean Keplerian Elements in the Specified Reference Frame.

Parameters:
  • epoch (str) – Epoch of the mean elements.

  • eccentricity (float) – Eccentricity.

  • inclination (float) – Inclination (deg).

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

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

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

  • semi_major_axis (float, optional) – Semi-major axis in kilometers. Preferred over MEAN_MOTION.

  • mean_motion (float, optional) – Keplerian Mean motion in revolutions per day. Required if MEAN_ELEMENT_THEORY = SGP/SGP4.

  • gm (float, optional) – Gravitational Coefficient (Gravitational Constant × Central Mass) in km³/s².

arg_of_pericenter

Argument of pericenter

Examples: 270.0

Units: deg

Type:

float

comment

Comments (see 7.8 for formatting rules).

Type:

list[str]

eccentricity

Eccentricity

Examples: 0.7303

Units: n/a

Type:

float

epoch

Epoch of Mean Keplerian elements (see 7.5.10 for formatting rules)

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

Type:

str

gm

Gravitational Coefficient (Gravitational Constant × Central Mass)

Examples: 398600.44

Units: km³/s²

Type:

Optional[float]

inclination

Inclination

Examples: 63.4

Units: deg

Type:

float

mean_anomaly

Mean anomaly

Examples: 130.0

Units: deg

Type:

float

mean_motion

Semi-major axis in kilometers (preferred), or, if MEAN_ELEMENT_THEORY = SGP/SGP4, the Keplerian Mean motion in revolutions per day

Examples: 1.491325

Units: km or rev/day

Type:

Optional[float]

ra_of_asc_node

Right ascension of ascending node

Examples: 345.0

Units: deg

Type:

float

semi_major_axis

Semi-major axis in kilometers (preferred), or, if MEAN_ELEMENT_THEORY = SGP/SGP4, the Keplerian Mean motion in revolutions per day

Examples: 28594.4

Units: km or rev/day

Type:

Optional[float]