Skip to main content

Observation

Trait Observation 

Source
pub trait Observation {
    // Required methods
    fn sensor(&self) -> SensorId;
    fn taken_at(&self) -> Instant<Utc>;
    fn measured(&self) -> ObservationVector;
    fn predict(&self, state: &NavigationState) -> Result<ObservationVector>;
    fn jacobian(&self, state: &NavigationState) -> Result<ObservationJacobian>;
    fn noise(&self) -> ObservationNoise;

    // Provided methods
    fn gate(&self) -> GatingPolicy { ... }
    fn innovation(
        &self,
        predicted: &ObservationVector,
    ) -> Result<ObservationVector> { ... }
}
Expand description

Observation from the estimator’s view: z, h(x), H, R, no source details.

Vectors and Jacobian must agree in length; the estimator rejects the observation otherwise.

Required Methods§

Source

fn sensor(&self) -> SensorId

Source identifier, for reporting and per-source health: the estimator tracks accept/reject runs per SensorId, so differently named receivers are judged separately.

Source

fn taken_at(&self) -> Instant<Utc>

Time of the measurement.

Source

fn measured(&self) -> ObservationVector

Measurement z.

Source

fn predict(&self, state: &NavigationState) -> Result<ObservationVector>

Predicted measurement h(x).

§Errors

Any error preventing the prediction from this state.

Source

fn jacobian(&self, state: &NavigationState) -> Result<ObservationJacobian>

Jacobian H = ∂h/∂x at x.

§Errors

As Observation::predict.

Source

fn noise(&self) -> ObservationNoise

Measurement noise R.

Provided Methods§

Source

fn gate(&self) -> GatingPolicy

Gating policy.

Source

fn innovation(&self, predicted: &ObservationVector) -> Result<ObservationVector>

Innovation z − h(x).

Plain difference by default. Angle observations override it to wrap into [−π, π): 359° measured vs 1° predicted is −2°, not 358°.

§Errors

KernelError::BufferTooSmall if measured and predicted vectors differ in length.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§