Shared Types¶
Types and functions shared by both the CelesTrak and Space-Track ephemeris clients.
GPRecord¶
GPRecord ¶
General Perturbations (OMM) record from the GP request class.
Contains orbital elements and metadata for a single satellite. All fields are optional strings since Space-Track may omit fields.
Attributes:
| Name | Type | Description |
|---|---|---|
ccsds_omm_vers | str | None | CCSDS OMM version |
comment | str | None | Comment field |
creation_date | str | None | Record creation date |
originator | str | None | Data originator |
object_name | str | None | Satellite common name |
object_id | str | None | International designator |
center_name | str | None | Center name |
ref_frame | str | None | Reference frame |
time_system | str | None | Time system |
mean_element_theory | str | None | Mean element theory |
epoch | str | None | Epoch of orbital elements |
mean_motion | float | None | Mean motion (rev/day) |
eccentricity | float | None | Eccentricity |
inclination | float | None | Inclination (degrees) |
ra_of_asc_node | float | None | RAAN (degrees) |
arg_of_pericenter | float | None | Argument of pericenter (degrees) |
mean_anomaly | float | None | Mean anomaly (degrees) |
ephemeris_type | int | None | Ephemeris type |
classification_type | str | None | Classification type |
norad_cat_id | int | None | NORAD catalog ID |
element_set_no | int | None | Element set number |
rev_at_epoch | int | None | Revolution number at epoch |
bstar | float | None | BSTAR drag coefficient |
mean_motion_dot | float | None | First derivative of mean motion |
mean_motion_ddot | float | None | Second derivative of mean motion |
semimajor_axis | float | None | Semi-major axis (km) |
period | float | None | Orbital period (minutes) |
apoapsis | float | None | Apoapsis altitude (km) |
periapsis | float | None | Periapsis altitude (km) |
object_type | str | None | Object type |
rcs_size | str | None | RCS size category |
country_code | str | None | Country code |
launch_date | str | None | Launch date |
site | str | None | Launch site |
decay_date | str | None | Decay date |
file | int | None | File number |
gp_id | int | None | GP record ID |
tle_line0 | str | None | TLE line 0 |
tle_line1 | str | None | TLE line 1 |
tle_line2 | str | None | TLE line 2 |
Example
Initialize instance.
from_json builtin ¶
Construct a GPRecord from a JSON string.
Accepts both SpaceTrack format (all strings) and Celestrak format (native numbers). The JSON should represent a single GP record object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_str | str | JSON string representing a single GP record. | required |
Returns:
| Name | Type | Description |
|---|---|---|
GPRecord | GPRecord | Parsed GP record. |
Raises:
| Type | Description |
|---|---|
BraheError | If the JSON is malformed or cannot be parsed. |
to_numerical_orbit_propagator method descriptor ¶
to_numerical_orbit_propagator(force_config: ForceModelConfig, propagation_config: NumericalPropagationConfig | None = None, params: ndarray | None = None) -> NumericalOrbitPropagator
Create a NumericalOrbitPropagator from this GP record.
Internally creates an SGP4 propagator from the OMM elements, computes the ECI state at epoch, then initializes a numerical propagator with the specified force model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force_config | ForceModelConfig | Force model configuration (required). | required |
propagation_config | NumericalPropagationConfig | None | Integrator config. Default: NumericalPropagationConfig default. | None |
params | ndarray | None | Parameter vector [mass, drag_area, Cd, srp_area, Cr, ...]. Required when force_config includes drag or SRP. | None |
Returns:
| Name | Type | Description |
|---|---|---|
NumericalOrbitPropagator | NumericalOrbitPropagator | Initialized numerical propagator at the record's epoch. |
Raises:
| Type | Description |
|---|---|
BraheError | If required orbital element fields are missing. |
to_sgp_propagator method descriptor ¶
to_sgp_propagator(step_size: float = 60.0) -> SGPPropagator
Create an SGPPropagator from this GP record using OMM elements directly.
Preserves full OMM numeric precision without TLE text round-tripping.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
step_size | float | Propagation step size in seconds. Default: 60.0 | 60.0 |
Returns:
| Name | Type | Description |
|---|---|---|
SGPPropagator | SGPPropagator | Initialized SGP4 propagator at the record's epoch. |
Raises:
| Type | Description |
|---|---|
BraheError | If required orbital element fields are missing. |
Operator Functions¶
Filter operator functions for constructing query filter values. In Python, access these via brahe.spacetrack.operators:
Comparison Operators¶
spacetrack_greater_than builtin ¶
spacetrack_less_than builtin ¶
spacetrack_not_equal builtin ¶
Range and Pattern Operators¶
spacetrack_inclusive_range builtin ¶
spacetrack_like builtin ¶
spacetrack_startswith builtin ¶
Time References¶
spacetrack_now builtin ¶
spacetrack_now() -> str
Current time reference for SpaceTrack queries.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | The string "now". |
spacetrack_now_offset builtin ¶
Special Values¶
spacetrack_null_val builtin ¶
spacetrack_null_val() -> str
Null value reference for SpaceTrack queries.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | The string "null-val". |
spacetrack_or_list builtin ¶
See Also¶
- Ephemeris Data Sources Overview -- GPRecord field tables and operator usage
- CelesTrak -- CelesTrak client that returns GPRecord
- Space-Track -- Space-Track client that returns GPRecord