OEM — Orbit Ephemeris Message¶
Parses and writes CCSDS Orbit Ephemeris Messages containing time-ordered state vectors with optional covariance data.
OEM ¶
Python wrapper for CCSDS Orbit Ephemeris Message (OEM).
OEM messages contain time-ordered sequences of state vectors (position and velocity), optionally with accelerations and covariance matrices.
Header-level fields are properties with getters and setters. Segment data is accessed via the segments property which supports indexing, iteration, and mutation.
Example
Initialize instance.
classification property ¶
classification: str
Classification of the message, or None.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | Classification string, or None |
segments property ¶
Segment collection, supporting len/indexing/iteration.
Returns:
| Name | Type | Description |
|---|---|---|
OEMSegments | OEMSegments | Collection of OEM segments |
add_segment method descriptor ¶
add_segment(object_name: str, object_id: str, center_name: str, ref_frame: str, time_system: str, start_time: Epoch, stop_time: Epoch, interpolation: str | None = None, interpolation_degree: int | None = None, trajectory: OrbitTrajectory | None = None) -> int
Add a new segment to the OEM.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_name | str | Spacecraft name | required |
object_id | str | International designator | required |
center_name | str | Central body name | required |
ref_frame | str | Reference frame name | required |
time_system | str | Time system name | required |
start_time | Epoch | Start time of ephemeris data | required |
stop_time | Epoch | Stop time of ephemeris data | required |
interpolation | str | None | Interpolation method | None |
interpolation_degree | int | None | Interpolation degree | None |
trajectory | OrbitTrajectory | None | Optional trajectory to populate states from | None |
Returns:
| Name | Type | Description |
|---|---|---|
int | int | Index of the new segment |
Example
from_file staticmethod ¶
from_str staticmethod ¶
remove_segment method descriptor ¶
Remove a segment by index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idx | int | Index of the segment to remove | required |
segment_to_trajectory method descriptor ¶
segment_to_trajectory(segment_idx: int) -> SOrbitTrajectory
Convert a single OEM segment to an OrbitTrajectory.
The trajectory contains Cartesian state vectors (position/velocity) in the reference frame specified by the segment metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
segment_idx | int | Index of the segment to convert (0-based) | required |
Returns:
| Name | Type | Description |
|---|---|---|
OrbitalTrajectory | SOrbitTrajectory | Trajectory containing the segment's state vectors |
Raises:
| Type | Description |
|---|---|
BraheError | If segment index is out of range or frame is unsupported |
state method descriptor ¶
Get a state vector from a segment by index (shortcut).
This is a convenience method equivalent to oem.segments[segment_idx].states[state_idx].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
segment_idx | int | Segment index (0-based) | required |
state_idx | int | State vector index (0-based) | required |
Returns:
| Name | Type | Description |
|---|---|---|
OEMStateVector | OEMStateVector | State vector proxy |
to_dict method descriptor ¶
to_dict() -> dict
Convert the OEM to a Python dictionary.
Epochs are serialized as CCSDS datetime strings for JSON/dict compatibility.
Returns:
| Name | Type | Description |
|---|---|---|
dict | dict | Dictionary representation of the OEM |
to_file method descriptor ¶
to_json_string method descriptor ¶
to_string method descriptor ¶
to_trajectories method descriptor ¶
to_trajectories() -> list[OrbitalTrajectory]
Convert all OEM segments to OrbitTrajectory objects.
Returns one trajectory per segment, each containing the segment's state vectors in its reference frame.
Returns:
| Type | Description |
|---|---|
list[OrbitalTrajectory] | list[OrbitalTrajectory]: One trajectory per segment |
Raises:
| Type | Description |
|---|---|
BraheError | If any segment's frame is unsupported |
See Also¶
- OEM Format Guide — Structure, usage, and conversion to brahe trajectories
- CCSDS Module — Module overview