Skip to content

OMM — Orbit Mean-elements Message

Parses CCSDS Orbit Mean-elements Messages containing mean Keplerian elements and TLE-related parameters for SGP4/SDP4 propagation.


OMM

OMM(originator: Any, object_name: Any, object_id: Any, center_name: Any, ref_frame: Any, time_system: Any, mean_element_theory: Any, epoch: Any, eccentricity: Any, inclination: Any, ra_of_asc_node: Any, arg_of_pericenter: Any, mean_anomaly: Any, mean_motion: Any = None, gm: Any = None)

Python wrapper for CCSDS Orbit Mean-elements Message (OMM).

OMM is flat (no segments), so all fields are exposed as properties with getters and setters.

Example
1
2
3
4
5
6
from brahe.ccsds import OMM

omm = OMM.from_file("gp_data.omm")
print(omm.object_name)
omm.object_name = "ISS"
print(omm.eccentricity)

Initialize instance.

arg_of_pericenter property

arg_of_pericenter: float

Argument of pericenter in degrees.

Returns:

Name Type Description
float float

Argument of pericenter (degrees)

bstar property

bstar: float

BSTAR drag term, or None.

Returns:

Name Type Description
float float

BSTAR, or None

center_name property

center_name: str

Center body name.

Returns:

Name Type Description
str str

Center name

classification_type property

classification_type: str

Classification type character, or None.

Returns:

Name Type Description
str str

Classification type, or None

creation_date property

creation_date: Epoch

Creation date of the message.

Returns:

Name Type Description
Epoch Epoch

Creation date

eccentricity property

eccentricity: float

Eccentricity.

Returns:

Name Type Description
float float

Eccentricity

element_set_no property

element_set_no: int

Element set number, or None.

Returns:

Name Type Description
int int

Element set number, or None

ephemeris_type property

ephemeris_type: int

Ephemeris type, or None.

Returns:

Name Type Description
int int

Ephemeris type, or None

epoch property

epoch: Epoch

Epoch of the mean elements.

Returns:

Name Type Description
Epoch Epoch

Epoch of mean elements

format_version property

format_version: float

CCSDS format version.

Returns:

Name Type Description
float float

Format version

gm property

gm: float

Gravitational parameter in m^3/s^2, or None.

Returns:

Name Type Description
float float

GM, or None

inclination property

inclination: float

Inclination in degrees.

Returns:

Name Type Description
float float

Inclination (degrees)

mean_anomaly property

mean_anomaly: float

Mean anomaly in degrees.

Returns:

Name Type Description
float float

Mean anomaly (degrees)

mean_element_theory property

mean_element_theory: str

Mean element theory (e.g., "SGP/SGP4").

Returns:

Name Type Description
str str

Mean element theory

mean_motion property

mean_motion: float

Mean motion in rev/day, or None if not set.

Returns:

Name Type Description
float float

Mean motion, or None

mean_motion_ddot property

mean_motion_ddot: float

Second derivative of mean motion (rev/day^3), or None.

Returns:

Name Type Description
float float

Mean motion double-dot, or None

mean_motion_dot property

mean_motion_dot: float

First derivative of mean motion (rev/day^2), or None.

Returns:

Name Type Description
float float

Mean motion dot, or None

norad_cat_id property

norad_cat_id: int

NORAD catalog ID, or None.

Returns:

Name Type Description
int int

NORAD catalog ID, or None

object_id property

object_id: str

Object ID (international designator).

Returns:

Name Type Description
str str

Object ID

object_name property

object_name: str

Object name.

Returns:

Name Type Description
str str

Object name

originator property

originator: str

Originator of the message.

Returns:

Name Type Description
str str

Originator string

ra_of_asc_node property

ra_of_asc_node: float

Right ascension of ascending node in degrees.

Returns:

Name Type Description
float float

RAAN (degrees)

ref_frame property

ref_frame: str

Reference frame name.

Returns:

Name Type Description
str str

Reference frame

rev_at_epoch property

rev_at_epoch: int

Revolution number at epoch, or None.

Returns:

Name Type Description
int int

Rev at epoch, or None

time_system property

time_system: str

Time system name.

Returns:

Name Type Description
str str

Time system

from_file staticmethod

from_file(path: str) -> OMM

Parse an OMM from a file, auto-detecting the format.

Parameters:

Name Type Description Default
path str

Path to the OMM file

required

Returns:

Name Type Description
OMM OMM

Parsed OMM message

from_gp_record staticmethod

from_gp_record(gp: GPRecord) -> OMM

Create an OMM from a GPRecord.

Validates that required orbital element fields are present (epoch, eccentricity, inclination, ra_of_asc_node, arg_of_pericenter, mean_anomaly) and builds an OMM with defaults for missing metadata.

Parameters:

Name Type Description Default
gp GPRecord

GP record to convert.

required

Returns:

Name Type Description
OMM OMM

CCSDS OMM message constructed from the GP record.

Raises:

Type Description
BraheError

If required orbital element fields are missing.

Example
1
2
3
4
5
6
import brahe as bh
from brahe.ccsds import OMM

record = bh.GPRecord.from_json('{"OBJECT_NAME": "ISS", "EPOCH": "2024-01-15T12:00:00.000", "ECCENTRICITY": 0.0001, "INCLINATION": 51.64, "RA_OF_ASC_NODE": 200.0, "ARG_OF_PERICENTER": 100.0, "MEAN_ANOMALY": 260.0}')
omm = OMM.from_gp_record(record)
print(omm.object_name)

from_str staticmethod

from_str(content: str) -> OMM

Parse an OMM from a string, auto-detecting the format.

Parameters:

Name Type Description Default
content str

String content of the OMM message

required

Returns:

Name Type Description
OMM OMM

Parsed OMM message

to_dict method descriptor

to_dict() -> dict

Convert the OMM to a Python dictionary.

Returns:

Name Type Description
dict dict

Dictionary representation of the OMM

to_file method descriptor

to_file(path: str, format: str) -> Any

Write the OMM to a file in the specified format.

Parameters:

Name Type Description Default
path str

Output file path

required
format str

Output format - "KVN", "XML", or "JSON"

required

to_gp_record method descriptor

to_gp_record() -> GPRecord

Convert this OMM to a GPRecord.

Maps all OMM fields back to the GPRecord format. This conversion is infallible since all GPRecord fields are optional.

Returns:

Name Type Description
GPRecord GPRecord

GP record with fields populated from this OMM.

Example
1
2
3
4
5
from brahe.ccsds import OMM

omm = OMM.from_file("test_assets/ccsds/omm/OMMExample1.txt")
gp = omm.to_gp_record()
print(gp.object_name)

to_json_string method descriptor

to_json_string(uppercase_keys: bool = False) -> str

Write the OMM to JSON with explicit key case control.

Parameters:

Name Type Description Default
uppercase_keys bool

If True, use uppercase CCSDS keywords. Default: False.

False

Returns:

Name Type Description
str str

Serialized JSON string

to_string method descriptor

to_string(format: str) -> str

Write the OMM to a string in the specified format.

Parameters:

Name Type Description Default
format str

Output format - "KVN", "XML", or "JSON"

required

Returns:

Name Type Description
str str

Serialized OMM string


See Also