pub trait TrackingDevice<MsrIn>: ConfigReprwhere
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>;
// Provided method
fn measurement_covar_matrix<M: DimName>(
&self,
msr_types: &IndexSet<MeasurementType>,
epoch: Epoch,
) -> Result<OMatrix<f64, M, M>, ODError>
where DefaultAllocator: Allocator<M, M> { ... }
}
Expand description
Tracking device simulator.
Required Methods§
Sourcefn measurement_types(&self) -> &IndexSet<MeasurementType>
fn measurement_types(&self) -> &IndexSet<MeasurementType>
Returns the enabled measurement types for thie device.
Sourcefn measure(
&mut self,
epoch: Epoch,
traj: &Traj<MsrIn>,
rng: Option<&mut Pcg64Mcg>,
almanac: Arc<Almanac>,
) -> Result<Option<NewMeasurement>, ODError>
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.
Sourcefn location(
&self,
epoch: Epoch,
frame: Frame,
almanac: Arc<Almanac>,
) -> AlmanacResult<Orbit>
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.
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>
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>,
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.