Main Content

ommread

Read data from orbit mean-elements message (OMM) file

Since R2024a

    Description

    ommStruct = ommread(ommFile) reads the data from an orbit mean-elements message (OMM) file, ommFile. The function outputs a vector of structures containing data from the input OMM file in tleStruct. You can then use the propagateOrbit function to calculate the position and velocity using ommStruct.

    If the OMM file contains multiple entries for the same catalog number, the function outputs only the data corresponding to the latest epoch, which is defined for each OMM set.

    example

    Examples

    collapse all

    Read data from the OMM file 'eccentricOrbitSatellite.xml' and calculate the position and velocity of the satellite at 12:00:00 on May 10, 2020.

    Read the data from the OMM file 'eccentricOrbitSatellite.xml', which is on the MATLAB® path. The file is provided with Aerospace Toolbox.

    ommStruct = ommread('eccentricOrbitSatellite.xml')
    ommStruct = 
      struct with fields:
    
                                 Name: "Satellite 41"
               SatelliteCatalogNumber: 20041
                                Epoch: 05-May-2020 13:51:55
                                BStar: 0
        RightAscensionOfAscendingNode: 30
                         Eccentricity: 0.7415
                          Inclination: 60
                  ArgumentOfPeriapsis: 280
                          MeanAnomaly: 289.4697
                           MeanMotion: 0.0083

    Calculate the position and velocity corresponding to the input time using the OMM data defined in ommStruct.

    [r,v] = propagateOrbit(datetime(2020, 5, 10, 12, 0, 0),ommStruct);

    Input Arguments

    collapse all

    OMM file, specified as a character vector or a string scalar. The file must exist in the current folder or in a folder on the MATLAB path, or the argument must include a full or relative path to a file. You can then use the propagateOrbit function to calculate the position and velocity of one or more spacecraft over time using the orbits defined in ommStruct. This function supports the .xml and .json OMM file formats. For more information on OMM files, see Orbit Mean-Elements Message (OMM) File.

    Example: 'eccentricOrbitSatellite.xml'

    Data Types: char | string

    Output Arguments

    collapse all

    OMM structures extracted from ommFile, returned as a vector of structures. To calculate the position and velocity of one or more spacecraft over time using Orbit Mean-Elements Message (OMM) data, use this vector of structures as an input to the propagateOrbit function.

    For more information on OMM file structures, see Orbit Mean-Elements Message (OMM) File. If the OMM file contains multiple entries for the same catalog number, the function outputs only the data corresponding to the latest epoch, which is defined for each OMM set.

    Field NameDescriptionUnit

    Name

    Name of the satellite.

    N/A

    SatelliteCatalogNumber

    Unique satellite identifier

    N/A

    Epoch

    Reference time of the orbital elements

    datetime

    BStar

    Drag term

    1/(Earth radii)

    RightAscensionOfAscendingNode

    Longitude of ascending node

    degrees

    Eccentricity

    Orbital eccentricity

    N/A

    Inclination

    Orbital inclination

    degrees

    ArgumentOfPeriapsis

    Argument of periapsis

    degrees

    MeanAnomaly

    Mean anomaly

    degrees/second

    MeanMotion

    Mean motion

    degrees/second

    Version History

    Introduced in R2024a