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§
Sourcefn sensor(&self) -> SensorId
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.
Sourcefn measured(&self) -> ObservationVector
fn measured(&self) -> ObservationVector
Measurement z.
Sourcefn predict(&self, state: &NavigationState) -> Result<ObservationVector>
fn predict(&self, state: &NavigationState) -> Result<ObservationVector>
Sourcefn jacobian(&self, state: &NavigationState) -> Result<ObservationJacobian>
fn jacobian(&self, state: &NavigationState) -> Result<ObservationJacobian>
Sourcefn noise(&self) -> ObservationNoise
fn noise(&self) -> ObservationNoise
Measurement noise R.
Provided Methods§
Sourcefn gate(&self) -> GatingPolicy
fn gate(&self) -> GatingPolicy
Gating policy.
Sourcefn innovation(&self, predicted: &ObservationVector) -> Result<ObservationVector>
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".