sp3

This submodule reads SP3 precise-orbit files and exposes their states and metadata. It does not perform reference-frame or time-scale conversions. Use the SP3 factories in tudatpy.dynamics.environment_setup.ephemeris to create ephemeris settings and apply supported frame transformations.

SP3 precise-orbit file readers.

Functions

read_sp3_file(file_name[, reference_julian_day])

Read an SP3 precise-orbit file.

read_sp3_file(file_name: str, reference_julian_day: float = 2451545.0) → tudatpy.kernel.data_input.environment_data.sp3.Sp3FileContents

Read an SP3 precise-orbit file.

Epochs are expressed in seconds since reference_julian_day in the time scale declared by the file. Positions and velocities are converted to meters and meters per second, respectively. For position-only files, velocities are reconstructed with second-order three-point finite differences, which requires at least three epochs. SP3-a through SP3-d and the GPS, GLO, GAL, BDT, TAI, UTC, IRN, and QZS time-system tags are supported. Reference-frame and time-system tags are retained as metadata; the loader does not transform either one. Clock and covariance records are not read.

Parameters:
  • file_name (str) – Path to the SP3 file.

  • reference_julian_day (float, default=2451545.0) – Julian day relative to which the epochs are expressed. The default value is J2000.

Returns:

Contents and metadata of the SP3 file.

Return type:

Sp3FileContents

Classes

Sp3FileContents

Parsed contents and metadata of an SP3 precise-orbit file.

class Sp3FileContents

Bases: pybind11_object

Parsed contents and metadata of an SP3 precise-orbit file.

Object that stores the contents of an SP3 file, as created by read_sp3_file().

get_satellite_state_history(self: tudatpy.kernel.data_input.environment_data.sp3.Sp3FileContents, satellite_id: str) → dict[float, numpy.ndarray[numpy.float64[6, 1]]]

Return the state history for one satellite.

States are returned in the reference frame and time system declared by the SP3 file. No frame or time conversion is performed by the data-input module. An error is raised if the satellite is not in the file, or if one of its states contains a missing value.

Parameters:

satellite_id (str) – ID of the satellite, as written in the file without surrounding whitespace (for instance G01).

Returns:

State history of the satellite. Keys are epochs in seconds since reference_julian_day, in the time scale time_scale. Values are Cartesian states, with position in meters and velocity in meters per second, in the frame frame_name.

Return type:

dict[float, numpy.ndarray[numpy.float64[6, 1]]]

property analysis_center

read-only

Tag of the producer or analysis center declared in the file header. Empty if the file declares none.

Type:

str

property declared_epoch_interval

read-only

Interval between epochs declared in the file header, in seconds.

Type:

float

property declared_number_of_epochs

read-only

Number of epochs declared in the file header.

Type:

int

property declared_number_of_satellites

read-only

Number of satellites declared in the file header.

Type:

int

property format_version

read-only

SP3 format version declared in the file header (a, b, c or d).

Type:

str

property frame_name

read-only

Reference frame tag declared in the file header, as written in the file (for instance IGS14). Empty if the file declares no reference frame.

Type:

str

property has_velocity_records

read-only

Whether the file contains velocity records.

Type:

bool

property reference_julian_day

read-only

Julian day relative to which all epochs in this object are expressed.

Type:

float

property satellite_states

read-only

State history of each satellite, with the satellite ID (for instance G01) as the first key, and the epoch as the second key. Epochs are in seconds since reference_julian_day, in the time scale time_scale. Each state is a Cartesian state, with position in meters and velocity in meters per second, in the frame frame_name. Missing values are NaN.

Type:

dict[str, dict[float, numpy.ndarray[numpy.float64[6, 1]]]]

property start_epoch

read-only

Start epoch declared in the file header, in seconds since reference_julian_day, in the time scale time_scale.

Type:

float

property time_scale

read-only

Time-system tag declared in the file header (GPS, GLO, GAL, BDT, TAI, UTC, IRN or QZS). The legacy ccc tag is stored as GPS.

Type:

str

property velocities_were_derived

read-only

Whether the velocities in satellite_states were reconstructed from the positions, which is the case for a position-only file.

Type:

bool