Models¶
What the API answers, as small frozen dataclasses. Each keeps the whole answer in raw, for what is not modelled.
Runs, comparisons, plans, passes, orbit events, TLEs and orbit files are made in the background: their
wait() asks until they have finished (see Errors, waiting and limits).
- class lunaspace.Organisation¶
The organisation of the API key, its tier (None: every feature and the default limits) and the features the tier includes.
- class lunaspace.Asset¶
A satellite.
- __init__(id, name, kind, created_at, external_id=None, group=None, norad_id=None, international_designator=None, tle_enabled=False, orbit_events_enabled=False, raw=<factory>)¶
- class lunaspace.SpacecraftProperties¶
What the orbit determination needs to know of the spacecraft, from
valid_from.- __init__(id, mass_kg, drag_area_m2, srp_area_m2, created_at, drag_coefficient=None, reflectivity_coefficient=None, valid_from=None, raw=<factory>)¶
- class lunaspace.TrackingFile¶
An uploaded file of navigation fixes, as the API checked and described it.
- __init__(id, asset_id, format, fix_count, first_epoch, last_epoch, time_scale, has_velocities, sha256, bytes, uploaded_at, filename=None, satellite=None, raw=<factory>)¶
- class lunaspace.Product¶
A file a run made:
oem(the ephemeris),residuals,uncertainty,result. The ephemeris says its first and last time tag: it holds the fitted arc and the prediction.
- class lunaspace.RunManoeuvre¶
A reported manoeuvre in a run: determined from the tracking data where it lies inside the arc, applied as reported where it is
plannedafter it. Its velocity change in the orbit’s axes [m/s]; its mass change and the mass after it where the run models one (the burn was reported withdelta_mass_kgorspecific_impulse_s).- __init__(epoch, radial_m_s, along_track_m_s, cross_track_m_s, planned=False, sigma_radial_m_s=None, sigma_along_track_m_s=None, sigma_cross_track_m_s=None, delta_mass_kg=None, mass_kg=None, raw=<factory>)¶
- Parameters:
- Return type:
None
- class lunaspace.Run¶
An orbit determination: queued, running, then succeeded or failed. A succeeded run that is over a limit of its profile is not
accepted; its products are there all the same.- created_at: datetime¶
- manoeuvres: list[RunManoeuvre]¶
- wait(timeout=1800.0, poll=5.0, raise_on_failure=True)¶
The run once it has finished (see
Runs.wait).
- download(name, to=None)¶
A product: written to
to(a file, or a directory for its own file name), or returned as bytes.
- diagnostics()¶
The run’s diagnostics (a finished run’s; the feature
od_diagnostics).- Return type:
- report(to=None)¶
The run as a report to read and pass on (one HTML page): see
Runs.report.
- orbit_file(format='oem', **settings)¶
The run’s orbit in another form (see
OrbitFiles.request);.wait()waits for it.
- residuals()¶
The residuals of every fix as a pandas data frame, in metres (
lunaspace.frames.residuals; needs pandas).- Return type:
- __init__(id, asset_id, name, status, trigger, engine, created_at, profile=None, setting=None, custom=None, engine_version=None, finished_at=None, arc_start=None, arc_end=None, mass_kg=None, accepted=None, weighted_rms=None, flags=<factory>, manoeuvres=<factory>, products=<factory>, error=None, raw=<factory>, _client=None)¶
- Parameters:
id (str)
asset_id (str)
name (str)
status (str)
trigger (str)
engine (str)
created_at (datetime)
profile (str | None)
setting (str | None)
engine_version (str | None)
finished_at (datetime | None)
arc_start (datetime | None)
arc_end (datetime | None)
mass_kg (float | None)
accepted (bool | None)
weighted_rms (float | None)
manoeuvres (list[RunManoeuvre])
_client (Client | None)
- Return type:
None
- class lunaspace.Schedule¶
A satellite’s automatic runs: one arc every
interval_hours.- __init__(enabled, profile, arc_hours, interval_hours, max_wait_hours, prior_covariance, updated_at, setting=None, custom=None, last_run_id=None, raw=<factory>)¶
- class lunaspace.Profile¶
A kind of orbit determination, with its settings (other ways to run it) and the custom settings an expert may give.
default: the one a request takes when it names none.- __init__(name, description, min_arc_hours, max_arc_hours, prediction_hours, default=False, settings=<factory>, custom_settings=<factory>, raw=<factory>)¶
- class lunaspace.Orbit¶
A satellite’s current orbit: the accepted run it comes from and its ephemeris.
- __init__(od_run_id, updated_at, arc_start, arc_end, ephemeris_start, ephemeris_end, ephemeris_sha256, raw=<factory>)¶
- class lunaspace.Station¶
A ground station of the organisation’s.
- __init__(id, name, latitude_deg, longitude_deg, height_m, created_at, mask_deg=None, downlink_frequency_hz=None, raw=<factory>)¶
- class lunaspace.CatalogueStation¶
A site of the service’s catalogue, to fill a new station in from.
- __init__(id, name, provider, latitude_deg, longitude_deg, source, precision, bands=<factory>, height_m=None, raw=<factory>)¶
- class lunaspace.Pass¶
A pass over a station: from its start to its end above the mask (AOS and LOS where it rises and sets inside the prediction), the closest approach (TCA).
- __init__(start, end, tca, max_elevation_deg, duration_s, min_range_m, start_azimuth_deg, tca_azimuth_deg, end_azimuth_deg, aos=None, los=None, raw=<factory>)¶
- class lunaspace.StationPasses¶
StationPasses(name: ‘str’, passes: ‘list[Pass]’ = <factory>, station_id: ‘str | None’ = None, raw: ‘dict[str, Any]’ = <factory>)
- class lunaspace.Passes¶
A satellite’s passes over its stations, computed on an orbit: products
passes(JSON),pointing(CSV) and, beyond a day,oem.- created_at: datetime¶
- stations: list[StationPasses]¶
- __init__(id, asset_id, run_id, status, trigger, days, light_time, created_at, finished_at=None, stations=<factory>, products=<factory>, error=None, raw=<factory>, _client=None)¶
- Parameters:
- Return type:
None
- class lunaspace.TleElements¶
SGP4’s mean elements as the TLE carries them.
- __init__(epoch, mean_motion_rev_day, eccentricity, inclination_deg, raan_deg, argument_of_perigee_deg, mean_anomaly_deg, bstar, raw=<factory>)¶
- class lunaspace.TleFit¶
How well the TLE holds the orbit it was fitted to, in metres.
- class lunaspace.Tle¶
A TLE and an OMM fitted to an orbit: products
tle,omm(CCSDS KVN),document.- created_at: datetime¶
- elements: TleElements | None = None¶
- __init__(id, asset_id, run_id, status, trigger, created_at, finished_at=None, lines=<factory>, elements=None, fit=None, products=<factory>, error=None, raw=<factory>, _client=None)¶
- Parameters:
- Return type:
None
- class lunaspace.PlanBurn¶
A burn of a plan, in the orbit’s axes [m/s].
- class lunaspace.PlanTarget¶
A target of a plan: what was wanted, before and after the burns, and its sigma.
- class lunaspace.Plan¶
A manoeuvre plan from the satellite’s current orbit: advice only, adopted by reporting its burns as planned manoeuvres. Products
plan(JSON) andoem.- window_start: datetime¶
- window_end: datetime¶
- created_at: datetime¶
- targets: list[PlanTarget]¶
- __init__(id, asset_id, start_run_id, status, profile, window_start, window_end, created_at, finished_at=None, burns=<factory>, targets=<factory>, total_delta_v_m_s=None, products=<factory>, error=None, raw=<factory>, _client=None)¶
- class lunaspace.ComparisonSetting¶
One setting of a comparison: its run and figures.
- __init__(setting, status, description, run_id=None, engine=None, gate_passed=None, weighted_rms=None, drag_coefficient=None, skipped_reason=None, raw=<factory>)¶
- class lunaspace.Comparison¶
One arc determined with several settings (or engines), set side by side. It never changes the satellite’s orbit; acting on its recommendation is the customer’s step.
- created_at: datetime¶
- arc_start: datetime¶
- arc_end: datetime¶
- settings: list[ComparisonSetting]¶
- wait(timeout=3600.0, poll=10.0)¶
The comparison once every setting has finished.
- Parameters:
- Return type:
- __init__(id, asset_id, profile, complete, created_at, arc_start, arc_end, settings=<factory>, reference=None, recommended=None, recommended_reason=None, raw=<factory>, _client=None)¶
- Parameters:
- Return type:
None
- class lunaspace.Manoeuvre¶
A manoeuvre the customer reported: inside a run’s arc it is estimated, after it applied in the prediction.
- __init__(id, asset_id, epoch, created_at, radial_m_s=0.0, along_track_m_s=0.0, cross_track_m_s=0.0, sigma_m_s=None, delta_mass_kg=None, specific_impulse_s=None, raw=<factory>)¶
- class lunaspace.Eclipse¶
An eclipse by the Earth, with the contacts it has; one under way at the orbit’s start or end is cut there (
cut_start,cut_end).- __init__(start, end, duration_s, umbra_duration_s, cut_start, cut_end, penumbra_start=None, umbra_start=None, umbra_end=None, penumbra_end=None, raw=<factory>)¶
- class lunaspace.NodeCrossing¶
A crossing of the equator: where, at what local solar time, and the Sun’s elevation above the orbit’s plane (the beta angle) then.
- class lunaspace.Revolution¶
An orbit from an ascending node to the next: its period and its time in eclipse.
- class lunaspace.OrbitEvents¶
A satellite’s orbit events, computed on an orbit: its eclipses, its crossings of the equator, its orbits one by one; products
events(JSON),ground_track(CSV) and, beyond the run’s own ephemeris,oem.- created_at: datetime¶
- nodes: list[NodeCrossing]¶
- orbits: list[Revolution]¶
- ground_track()¶
The ground track as a pandas data frame (
lunaspace.frames.ground_track; needs pandas): a row a point, indexed by its epoch (UTC).- Return type:
- __init__(id, asset_id, run_id, status, trigger, days, created_at, finished_at=None, orbit_source=None, orbit_start=None, orbit_end=None, eclipses=<factory>, nodes=<factory>, orbits=<factory>, ground_points=0, products=<factory>, error=None, raw=<factory>, _client=None)¶
- Parameters:
id (str)
asset_id (str)
run_id (str)
status (str)
trigger (str)
days (int)
created_at (datetime)
finished_at (datetime | None)
orbit_source (str | None)
orbit_start (datetime | None)
orbit_end (datetime | None)
nodes (list[NodeCrossing])
orbits (list[Revolution])
ground_points (int)
_client (Client | None)
- Return type:
None
- class lunaspace.OrbitPiece¶
A piece of a reconstructed orbit: the stretch one run’s fitted arc gives.
- class lunaspace.OrbitGap¶
A stretch of the span asked for that no accepted run’s arc covers.
- class lunaspace.OrbitFile¶
An orbit file, made on request: a run’s ephemeris written again (
format“oem”: in another frame, at another step, over a part of its span, without its covariances), one state of it as a CCSDS OPM (“opm”), or a satellite’s reconstructed orbit (“reconstructed”: the fitted arcs of its accepted runs joined,piecesandgaps). What was asked for, and, once it is made, what was written.- created_at: datetime¶
- pieces: list[OrbitPiece]¶
- download(to=None)¶
The file, once it is made: written to
to(a file, or a directory for the name the API gives it), or returned as bytes.
- __init__(id, asset_id, format, status, frame, covariance, created_at, run_id=None, finished_at=None, step_s=None, start=None, end=None, epoch=None, ref_frame=None, first_epoch=None, last_epoch=None, states=None, covariances=None, segments=None, elements=None, manoeuvres=None, pieces=<factory>, gaps=<factory>, file_name=None, error=None, raw=<factory>, _client=None)¶
- Parameters:
id (str)
asset_id (str)
format (str)
status (str)
frame (str)
covariance (bool)
created_at (datetime)
run_id (str | None)
finished_at (datetime | None)
step_s (int | None)
start (datetime | None)
end (datetime | None)
epoch (datetime | None)
ref_frame (str | None)
first_epoch (datetime | None)
last_epoch (datetime | None)
states (int | None)
covariances (int | None)
segments (int | None)
elements (bool | None)
manoeuvres (int | None)
pieces (list[OrbitPiece])
file_name (str | None)
_client (Client | None)
- Return type:
None
- class lunaspace.DragCoefficient¶
The drag coefficient one accepted run estimated over its arc.
- class lunaspace.Webhook¶
An address told when a run finishes (
od.completed) or wants a look (od.flagged).
- class lunaspace.NewWebhook¶
A webhook just made, with the secret its deliveries are signed with: shown once; keep it to verify them (
lunaspace.webhooks.verify).
- class lunaspace.Engine¶
An orbit determination engine a run can name.
- class lunaspace.Rtn¶
A figure per axis of the orbit: radial, along-track, cross-track.
- class lunaspace.Quantile¶
Quantile(p: ‘float’, normal: ‘float’, value: ‘float’, raw: ‘dict[str, Any]’ = <factory>)
- class lunaspace.RatioStatistics¶
One axis’s residuals over the fixes’ sigma: against N(0, 1), an
sdabove 1 says the fixes are noisier than weighted, below 1 weighted too loosely.
- class lunaspace.SegmentResiduals¶
The residuals’ RMS and mean over one segment, in metres.
- class lunaspace.EstimateValue¶
One value of an estimate (one per segment for the empirical accelerations).
- class lunaspace.EstimatedParameter¶
An estimate but the state, in SI units, with its sigma after the fit; for the empirical accelerations also the a priori sigma (a posterior sigma near it: the data did not determine the value) and the flag’s scale.
- values: list[EstimateValue]¶
- class lunaspace.CorrelationPair¶
CorrelationPair(a: ‘str’, b: ‘str’, correlation: ‘float’, raw: ‘dict[str, Any]’ = <factory>)
- class lunaspace.Correlations¶
The correlation matrix of the estimated columns: near ±1, two columns the data cannot tell apart.
- strongest: list[CorrelationPair]¶
- between(a, b)¶
The correlation of two columns by name.
- class lunaspace.Iteration¶
Iteration(iteration: ‘int’, weighted_rms: ‘float’, edited: ‘int | None’ = None, step: ‘float | None’ = None, raw: ‘dict[str, Any]’ = <factory>)
- class lunaspace.HorizonCheck¶
The run before’s prediction at a horizon against this run’s fit: the error, the sigma it predicted, and their quotient z (mostly within ±1 where the predicted uncertainty is honest).
- class lunaspace.PredictionPoint¶
The run before’s prediction against this run’s fit at one moment (every five minutes of the hours the two share): this orbit minus that prediction along the orbit’s axes, and the standard deviations that run predicted there.
- class lunaspace.Diagnostics¶
What an analyst looks at to judge a run beyond its gate (the API’s diagnostics).
- radial: RatioStatistics | None = None¶
- along_track: RatioStatistics | None = None¶
- cross_track: RatioStatistics | None = None¶
- segments: list[SegmentResiduals]¶
- parameters: list[EstimatedParameter]¶
- correlations: Correlations | None = None¶
- prediction_check: list[HorizonCheck]¶
- prediction_series: list[PredictionPoint]¶
- parameter(name)¶
An estimate by name:
drag_coefficient,along_track_acceleration, …; for a run whose profile estimates the drag coefficient in steps (leo-gnss-v3),drag_coefficientis the one its prediction runs on anddrag_coefficient_stepsthe steps.- Parameters:
name (str)
- Return type:
EstimatedParameter | None
- prediction()¶
The run before’s prediction against this fit every five minutes as a pandas data frame (
lunaspace.frames.prediction_series; needs pandas).- Return type:
- __init__(run_id, flag_limit=None, fixes_sigma_m=None, edit_threshold=None, radial=None, along_track=None, cross_track=None, segments=<factory>, parameters=<factory>, correlations=None, convergence=<factory>, prediction_check=<factory>, prediction_series=<factory>, raw=<factory>)¶
- Parameters:
run_id (str)
flag_limit (float | None)
fixes_sigma_m (float | None)
edit_threshold (float | None)
radial (RatioStatistics | None)
along_track (RatioStatistics | None)
cross_track (RatioStatistics | None)
segments (list[SegmentResiduals])
parameters (list[EstimatedParameter])
correlations (Correlations | None)
prediction_check (list[HorizonCheck])
prediction_series (list[PredictionPoint])
- Return type:
None
- class lunaspace.Trend¶
One run’s figures among its satellite’s.
- prediction: list[HorizonCheck]¶
- at(hours)¶
The run before’s prediction checked at
hours(1, 6, 12, 24), if it was.- Parameters:
hours (float)
- Return type:
HorizonCheck | None
- __init__(run_id, trigger, accepted, flagged, arc_start=None, arc_end=None, profile=None, engine=None, weighted_rms=None, variance_factor=None, edited_share=None, drag_coefficient=None, drag_coefficient_sigma=None, empirical_along_track=None, empirical_cross_track=None, prediction=<factory>, raw=<factory>)¶
- Parameters:
run_id (str)
trigger (str)
accepted (bool)
flagged (bool)
arc_start (datetime | None)
arc_end (datetime | None)
profile (str | None)
engine (str | None)
weighted_rms (float | None)
variance_factor (float | None)
edited_share (float | None)
drag_coefficient (float | None)
drag_coefficient_sigma (float | None)
empirical_along_track (float | None)
empirical_cross_track (float | None)
prediction (list[HorizonCheck])
- Return type:
None