Browse Source

AP_NavEKF3: always calculate extNav innovations and variances

zr-v5.1
Randy Mackay 4 years ago
parent
commit
e7e91b1c3b
  1. 6
      libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp
  2. 3
      libraries/AP_NavEKF3/AP_NavEKF3_core.h

6
libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp

@ -426,6 +426,12 @@ void NavEKF3_core::SelectVelPosFusion() @@ -426,6 +426,12 @@ void NavEKF3_core::SelectVelPosFusion()
extNavVelToFuse = storedExtNavVel.recall(extNavVelDelayed, imuDataDelayed.time_ms);
if (extNavVelToFuse) {
CorrectExtNavVelForSensorOffset(extNavVelDelayed);
// calculate innovations and variances for reporting purposes only
CalculateVelInnovationsAndVariances(extNavVelDelayed.vel, extNavVelDelayed.err, frontend->extNavVelVarAccScale, extNavVelInnov, extNavVelVarInnov);
// record time innovations were calculated (for timeout checks)
extNavVelInnovTime_ms = AP_HAL::millis();
}
// Read GPS data from the sensor

3
libraries/AP_NavEKF3/AP_NavEKF3_core.h

@ -1352,6 +1352,9 @@ private: @@ -1352,6 +1352,9 @@ private:
uint32_t extNavVelMeasTime_ms; // time external navigation velocity measurements were accepted for input to the data buffer (msec)
bool extNavVelToFuse; // true when there is new external navigation velocity to fuse
bool useExtNavVel; // true if external nav velocity should be used
Vector3f extNavVelInnov; // external nav velocity innovations
Vector3f extNavVelVarInnov; // external nav velocity innovation variances
uint32_t extNavVelInnovTime_ms; // system time that external nav velocity innovations were recorded (to detect timeouts)
// flags indicating severe numerical errors in innovation variance calculation for different fusion operations
struct {

Loading…
Cancel
Save