pub trait TrackingDeviceSim<MsrIn, Msr>: ConfigReprwhere
MsrIn: Interpolatable,
Msr: Measurement,
DefaultAllocator: Allocator<Msr::MeasurementSize> + Allocator<MsrIn::Size> + Allocator<MsrIn::Size, MsrIn::Size> + Allocator<Msr::MeasurementSize, Msr::MeasurementSize> + Allocator<MsrIn::VecLength>,{
// Required methods
fn name(&self) -> String;
fn measure(
&mut self,
epoch: Epoch,
traj: &Traj<MsrIn>,
rng: Option<&mut Pcg64Mcg>,
almanac: Arc<Almanac>,
) -> Result<Option<Msr>, 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<Msr>, ODError>;
fn measurement_covar(
&mut self,
epoch: Epoch,
) -> Result<OMatrix<f64, Msr::MeasurementSize, Msr::MeasurementSize>, ODError>;
}
Expand description
Tracking device simulator.
Required Methods§
sourcefn measure(
&mut self,
epoch: Epoch,
traj: &Traj<MsrIn>,
rng: Option<&mut Pcg64Mcg>,
almanac: Arc<Almanac>,
) -> Result<Option<Msr>, ODError>
fn measure( &mut self, epoch: Epoch, traj: &Traj<MsrIn>, rng: Option<&mut Pcg64Mcg>, almanac: Arc<Almanac>, ) -> Result<Option<Msr>, 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<Msr>, ODError>
fn measurement_covar( &mut self, epoch: Epoch, ) -> Result<OMatrix<f64, Msr::MeasurementSize, Msr::MeasurementSize>, ODError>
Object Safety§
This trait is not object safe.