2. DiffOneWayRangeIdeal#
- class DiffOneWayRangeIdeal(name: str, instrument: Instrument, sigma: ArrayWUnits = None, gs_range_bias: float = None, state_definition: StateArray = None, sequence_definition=None, ground_station_2: GroundStation = None)#
Bases:
Measurement
Models the ideal differential one-way ranging measurement model.
Generates differenced ranging observables between an two observers and a target. The differenced ranging observables are expressed in sec
- Parameters:
name (
str
) – name of the measurement modelinstrument (
Instrument
) – instrument object associated with the measurement modelsigma (
ArrayWUnits
, optional) – Measurement standard deviation in seconds. Defaults toNone
.gs_range_bias (
float
, optional) – Measurement bias. Defaults toNone
.state_definition (
StateVector
, optional) – State vector definition list. Defaults toNone
.sequence_definition (
list
, optional) – sequence definition list. Optional, defaults toNone
.ground_station_2 (
GroundStation
, optional) – Second ground station needed for measurement model (differential). Defaults toNone
.
Attributes
The ground station number
DESC
The instrument.
The name of the model.
The sequence definition.
The standard deviation of the measurement model.
The state vector definition
The station of the measurement model.
Methods
Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the maneuver DV components.
Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the srp scaling factor (eta_srp).
Generates the portion in the h_tilde matrix relative to the partial of the ideal range measurement model with respect to the ground station position components.
compute_h_tilde_pos
(relative_state_1, ...)Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the position components.
Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the range bias.
Generates the portion in the h_tilde matrix relative to the partial of the DOR measurement model with respect to the velocity components.
compute_partials
(target, epoch_array[, frame])Stacks together measurement partials for an epoch array at different epochs.
computed_measurements
(target[, epoch_array, ...])Computes the doppler measurement between
target.name
andself.instrument.name
(2-way doppler).generate_measurement_dataset
(dataset_name, ...)Generates a MeasurementDataSet object that can be used by filters downstream.
observed_measurements
(file_name[, ...])Reads measurements from a .json file.
partials
(target, epoch, frame)Groups toghether the different components of measurement partials in the global H-tilde.
residuals
(observed_meas, computed_meas)Generates the measurement model's residuals given observed and computed ArrayWFrames.
write_observed_measurements
(target[, ...])Generates synthetic measurements and write them as a .json file.
- compute_h_tilde_dv_man() ndarray #
Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the maneuver DV components.
- Returns:
partials – The 3x1 partial derivatives of the measurement model by the maneuver DV components
- Return type:
References
“Statistical Orbit Determination”, B. D. Tapley, B. E. Schutz, and G. H. Born, 2004 (pg. 161, eq. 4.2.6)
- compute_h_tilde_eta_srp() ndarray #
Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the srp scaling factor (eta_srp).
- Returns:
partial – The scalar partial derivative of the measurement model by the position components
- Return type:
References
“Statistical Orbit Determination”, B. D. Tapley, B. E. Schutz, and G. H. Born, 2004 (pg. 161, eq. 4.2.6)
- compute_h_tilde_gs_location(relative_state_1: ArrayWUnits, relative_state_2: ArrayWUnits) ndarray #
Generates the portion in the h_tilde matrix relative to the partial of the ideal range measurement model with respect to the ground station position components.
- Parameters:
relative_state_1 (
ArrayWUnits
) – The relative state between ground station #1 and the target,relative_state_2 (
ArrayWUnits
) – The relative state between ground station #2 and the target.
- Returns:
partials – The 3x1partial derivatives of the measurement model by the position components.
- Return type:
References
“Statistical Orbit Determination”, B. D. Tapley, B. E. Schutz, and G. H. Born, 2004 (pg. 161, eq. 4.2.6)
- compute_h_tilde_pos(relative_state_1: ArrayWUnits, relative_state_2: ArrayWUnits) ndarray #
Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the position components.
- Parameters:
relative_state_1 (
ArrayWUnits
) – The relative state between ground station #1 and the target.relative_state_2 (
ArrayWYnts
) – The relative state between ground station #2 and the target.
- Returns:
partials – The 3x1 partial derivatives of the measurement model by the position components
- Return type:
References
“Statistical Orbit Determination”, B. D. Tapley, B. E. Schutz, and G. H. Born, 2004 (pg. 161, eq. 4.2.6)
- compute_h_tilde_range_bias() ndarray #
Generates the portion in the h_tilde matrix relative to the partial of the ideal DOR measurement model with respect to the range bias.
- Returns:
partial – The scalar partial derivative of the measurement model by the position components.
- Return type:
References
“Statistical Orbit Determination”, B. D. Tapley, B. E. Schutz, and G. H. Born, 2004 (pg. 161, eq. 4.2.6)
- compute_h_tilde_vel() ndarray #
Generates the portion in the h_tilde matrix relative to the partial of the DOR measurement model with respect to the velocity components.
- Returns:
partials – The 3x1 partial derivatives of the measurement model by the velocity components
- Return type:
References
“Statistical Orbit Determination”, B. D. Tapley, B. E. Schutz, and G. H. Born, 2004 (pg. 161, eq. 4.2.6)
- compute_partials(target: ~scarabaeus.spacecraft.Spacecraft.Spacecraft, epoch_array: ~scarabaeus.timeAndFrame.EpochArray.EpochArray, frame: ~scarabaeus.timeAndFrame.Frame.Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER)) list #
Stacks together measurement partials for an epoch array at different epochs.
- Parameters:
target (
Spacecraft
) – The target spacecraft.epoch_array (
EpochArray
) – The epochs.frame (
Frame
, optional) – The reference frame. Defaults to a J2000 Frame object.
- Returns:
partials – A list with all the partials evaluated at different epochs in the
epoch_array
.- Return type:
- computed_measurements(target: ~scarabaeus.spacecraft.Spacecraft.Spacecraft, epoch_array: ~scarabaeus.timeAndFrame.EpochArray.EpochArray = None, epoch_start: ~scarabaeus.timeAndFrame.EpochArray.EpochArray = None, epoch_end: ~scarabaeus.timeAndFrame.EpochArray.EpochArray = None, tstep: float = 1, frame: ~scarabaeus.timeAndFrame.Frame.Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER), noisy: bool = False, prior_range_bias=None) ArrayWFrame #
Computes the doppler measurement between
target.name
andself.instrument.name
(2-way doppler).If a receiver_station is specified as an instrument (i.e. a ground station) 3-way doppler is computed instead.
- Parameters:
target (
Spacecraft
) – The target spacecraft.epoch_array (
EpochArray
, optional) – An array of epochs (times) at which the range rate measurements should be computed. If provided, overridesepoch_start
,epoch_end
, andtstep
.epoch_start (
EpochArray
, optional) – The starting epoch for the range ratemeasurement computations. Required ifepoch_array
is not provided.epoch_end (
EpochArray
, optional) – The ending epoch for the range ratemeasurement computations. Required ifepoch_array
is not provided.tstep (
float
) – The time step, in seconds, between consecutive range ratemeasurements ifepoch_array
is not provided. Defaults to1
second.frame (
Frame
, optional) – The reference frame in which the range rate computation is performed. Defaults to a J2000 Frame object.noisy (
bool
) – Indicates if noise is added to the computed range rate measurement. Defaults toFalse
.
- generate_measurement_dataset(dataset_name: str, measurement_type: str, target: ~scarabaeus.body.Body.Body, observed_meas: ~scarabaeus.timeAndFrame.ArrayWFrame.ArrayWFrame = None, frame: ~scarabaeus.timeAndFrame.Frame.Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER), noisy: bool = False, prior_range_bias=None) list[MeasurementDataSet] #
Generates a MeasurementDataSet object that can be used by filters downstream.
- Parameters:
dataset_name (
str
) – The name of the MeasurementDataSet.target (
Spacecraft
) – The target spacecraft.epoch_list (
EpochArray
, optional) – The epochs. Defaults toNone
.epoch_start (
EpochArray
, optional) – The starting epoch. Defaults toNone
.epoch_end (
EpochArray
, optional) – The end epoch. Defaults toNone
.tstep (
int
, optional) – The integration timestep. Defaults to1
.observed_measurements (
list
, optional) – The observed measurements. Defaults toNone
.frame (
Frame
, optional) – The reference frame. Defaults to a J2000 Frame object.noisy (
bool
, optional) – Indicates if noise is added to the measurements or not. Defaults toFalse
.
- Returns:
mds_list – A list of MeasurementDataSet objects representing the measurements with their key properties to be used by a filter.
- Return type:
list[MeasurementDataSet]
Notes
The MeasurementDataSet output is generated in 6 steps:
Computed measurements
Partials
Residuals
Sigmas
Pack everything in a list
Pack the list in a MeasurementDataSet object
- observed_measurements(file_name, meas_name: str = 'meas_ideal', units: ~scarabaeus.units.Units.Units = unitless, frame: ~scarabaeus.timeAndFrame.Frame.Frame = J2000 (0 - SOLAR SYSTEM BARYCENTER)) Tuple[EpochArray, ndarray, ArrayWFrame] #
Reads measurements from a .json file.
- Parameters:
file_name (
str
) – The filename of the .json file containig the measurement information.meas_name (
str
, optional) – The name of the measurement data to access from the dictionary. Defaults to'meas_ideal'
.units (
Units
, optional) – Units to be used to write the output AWU. Defaults tounitless
.frame (
Frame
, optional) – Frame to be used to write the output AWF. Defaults to a J2000 Frame object.
- Returns:
meas_time_et, meas_sec, meas_obs – A tuple with the following values corresponding to their respective indices:
[0]
= meas_time_etEpochArrayThe time in ephemeris time.
[1]
= meas_Secnumpy.ndarrayThe times in seconds.
[2]
= meas_obsArrayWFrameAn AWF with the quantities in AWU.
- Return type:
Tuple[EpochArray
,numpy.ndarray
,ArrayWFrame]
Notes
The writing of the json assumes or requires units and frames.
- partials(target: Spacecraft, epoch: EpochArray, frame: Frame) list #
Groups toghether the different components of measurement partials in the global H-tilde. It returns the H-tilde array for the modelled measurement.
- Parameters:
target (
Spacecraft
) – The target spacecraft.epoch (
EpochArray
) – The epochs.frame (
Frame
) – The reference frame.
- Returns:
h_tilde – The H-tilde array with all measurements partials from this model by component.
- Return type:
- residuals(observed_meas: ArrayWFrame, computed_meas: ArrayWFrame) ArrayWFrame #
Generates the measurement model’s residuals given observed and computed ArrayWFrames.
- Parameters:
observed_meas (
ArrayWFrame
) – The observed measurements values (O).computed_meas (
ArrayWFrame
) – The computed measurements values (C).
- Returns:
residuals – AWF with the residual O-C.
- Return type:
- write_observed_measurements(target: Spacecraft, epoch_array: EpochArray = None, epoch_start: EpochArray = None, epoch_end: EpochArray = None, tstep: float = 1, frame: Frame = None, noisy: bool = False, prior_range_bias: float = None, file_name: str = 'ideal_measurement') None #
Generates synthetic measurements and write them as a .json file. The input of this method encapsulate the ones needed for the “computed_meas” method in each measurement model class.
- Parameters:
target (
Spacecraft
) – The target spacecraft for which the range measurement is to be computed.epoch_array (
EpochArray
, optional) – An array of epochs (times) at which the range measurements should be computed. If provided, overridesepoch_start
,epoch_end
, andtstep
.epoch_start (
EpochArray
, optional) – The starting epoch for the range measurement computations. Required ifepoch_array
is not provided.epoch_end (
EpochArray
, optional) – The ending epoch for the range measurement computations. Required ifepoch_array
is not provided.tstep (
float
, optional) – The time step, in seconds, between consecutive range measurements. If epoch_array is not provided. Defaults to1
second.frame (Frame , optional) – The reference frame in which the range computation is performed. Defaults to
None
.noisy (bool , optional) – Whether to add noise to the computed range measurement. Defaults to
False
.prior_range_bias (
float
, optional) – A prior bias value to add to the computed range measurements. Defaults toNone
.file_name (
str
, optional) – The filename of the JSON in which the measurement is saved, Defaults to'ideal_measurement'
.
- Return type:
- property gs_range_bias#
DESC
- property instrument: Instrument#
The instrument.
- property sigma: ArrayWUnits#
The standard deviation of the measurement model.
- property station: ArrayWUnits#
The station of the measurement model.