nyx_space::od::simulator

Trait TrackingDeviceSim

Source
pub trait TrackingDeviceSim<MsrIn, Msr>: ConfigRepr{
    // 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§

Source

fn name(&self) -> String

Returns the name of this tracking data simulator

Source

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.
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<Msr>, ODError>

Source

fn measurement_covar( &mut self, epoch: Epoch, ) -> Result<OMatrix<f64, Msr::MeasurementSize, Msr::MeasurementSize>, 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§