EKF2: centralized auto-generated state (#22183)

* ekf2_derivation: use single source of state definition

The state is defined as an ordered dictionary of group elements and
everything else is generated using that state definition

* ekf2: generated state sample add const reference getter

---------

Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
Co-authored-by: Daniel Agar <daniel@agar.ca>
This commit is contained in:
Mathieu Bresciani
2023-10-06 10:28:21 -04:00
committed by GitHub
co-authored by bresch Daniel Agar
parent 2e1d5687f9
commit 05fd8c5976
15 changed files with 279 additions and 206 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ void Ekf::controlGravityFusion(const imuSample &imu)
Vector3f innovation_variance;
VectorState Kx, Ky, Kz; // Kalman gain vectors
sym::ComputeGravityInnovVarAndKAndH(
getStateAtFusionHorizonAsVector(), P, measurement, measurement_var, FLT_EPSILON,
_state.vector(), P, measurement, measurement_var, FLT_EPSILON,
&innovation, &innovation_variance, &Kx, &Ky, &Kz);
// fill estimator aid source status