nyx_space::od::simulator

Trait TrackingDevice

Source
pub trait TrackingDevice<MsrIn>: ConfigRepr
where MsrIn: Interpolatable, DefaultAllocator: Allocator<MsrIn::Size> + Allocator<MsrIn::Size, MsrIn::Size> + Allocator<MsrIn::VecLength>,
{ // Required methods fn name(&self) -> String; fn measurement_types(&self) -> &IndexSet<MeasurementType>; fn measure( &mut self, epoch: Epoch, traj: &Traj<MsrIn>, rng: Option<&mut Pcg64Mcg>, almanac: Arc<Almanac>, ) -> Result<Option<NewMeasurement>, ODError>; fn location( &self, epoch: Epoch, frame: Frame, almanac: Arc<Almanac>, ) -> AlmanacResult<Orbit>; fn measure_instantaneous( &mut self, rx: MsrIn, rng: Option<&mut Pcg64Mcg>, almanac: Arc<Almanac>, ) -> Result<Option<NewMeasurement>, ODError>; fn measurement_covar( &self, msr_type: MeasurementType, epoch: Epoch, ) -> Result<f64, ODError>; fn measurement_bias( &self, msr_type: MeasurementType, epoch: Epoch, ) -> Result<f64, ODError>; // Provided methods fn measurement_covar_matrix<M: DimName>( &self, msr_types: &IndexSet<MeasurementType>, epoch: Epoch, ) -> Result<OMatrix<f64, M, M>, ODError> where DefaultAllocator: Allocator<M, M> { ... } fn measurement_bias_vector<M: DimName>( &self, msr_types: &IndexSet<MeasurementType>, epoch: Epoch, ) -> Result<OVector<f64, M>, ODError> where DefaultAllocator: Allocator<M> { ... } }
Expand description

Tracking device simulator.

Required Methods§

Source

fn name(&self) -> String

Returns the name of this tracking data simulator

Source

fn measurement_types(&self) -> &IndexSet<MeasurementType>

Returns the enabled measurement types for thie device.

Source

fn measure( &mut self, epoch: Epoch, traj: &Traj<MsrIn>, rng: Option<&mut Pcg64Mcg>, almanac: Arc<Almanac>, ) -> Result<Option<NewMeasurement>, ODError>

Performs a measurement of the input trajectory at the provided epoch (with integration times if relevant), and returns a measurement from itself to the input state. Returns None of the object is not visible. This trait function takes in a trajectory and epoch so it can properly simulate integration times for the measurements. If the random number generator is provided, it shall be used to add noise to the measurement.

§Choice of the random number generator

The Pcg64Mcg is chosen because it is fast, space efficient, and has a good statistical distribution.

§Errors
  • A specific measurement is requested but the noise on that measurement type is not configured.
Source

fn location( &self, epoch: Epoch, frame: Frame, almanac: Arc<Almanac>, ) -> AlmanacResult<Orbit>

Returns the device location at the given epoch and in the given frame.

Source

fn measure_instantaneous( &mut self, rx: MsrIn, rng: Option<&mut Pcg64Mcg>, almanac: Arc<Almanac>, ) -> Result<Option<NewMeasurement>, ODError>

Source

fn measurement_covar( &self, msr_type: MeasurementType, epoch: Epoch, ) -> Result<f64, ODError>

Source

fn measurement_bias( &self, msr_type: MeasurementType, epoch: Epoch, ) -> Result<f64, ODError>

Provided Methods§

Source

fn measurement_covar_matrix<M: DimName>( &self, msr_types: &IndexSet<MeasurementType>, epoch: Epoch, ) -> Result<OMatrix<f64, M, M>, ODError>

Source

fn measurement_bias_vector<M: DimName>( &self, msr_types: &IndexSet<MeasurementType>, epoch: Epoch, ) -> Result<OVector<f64, M>, ODError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§