mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 09:08:30 -04:00
AP_NavEKF: Corrected height update timeout error
This commit is contained in:
parent
0f3ebb8e31
commit
4a7f81e50a
@ -118,18 +118,22 @@ void SelectVelPosFusion()
|
||||
fuseVelData = false;
|
||||
fusePosData = false;
|
||||
}
|
||||
// Fuse height measurements with GPS measurements for efficiency
|
||||
// Don't wait longer than HGTmsecTgt msec between height fusion steps
|
||||
// Fuse height measurements at the same time as GPS measurements for efficiency
|
||||
// Don't wait longer than HGTmsecTgt msec between height updates
|
||||
if (statesInitialised && (newDataGps || ((IMUmsec - HGTmsecPrev) >= HGTmsecTgt)))
|
||||
{
|
||||
HGTmsecPrev = IMUmsec;
|
||||
fuseHgtData = true;
|
||||
readHgtData();
|
||||
}
|
||||
else
|
||||
{
|
||||
fuseHgtData = false;
|
||||
// protect against wrap-around
|
||||
if(IMUmsec < HGTmsecPrev) HGTmsecPrev = IMUmsec;
|
||||
|
||||
}
|
||||
FuseVelposNED();
|
||||
FuseVelPosNED();
|
||||
fuseHgtData = false;
|
||||
}
|
||||
|
||||
@ -1050,7 +1054,7 @@ void CovariancePrediction()
|
||||
zeroCols(nextP,16,17);
|
||||
}
|
||||
|
||||
// If the total position variance exceds 1E6 (1000m), then stop covariance
|
||||
// If the total position variance exceeds 1E6 (1000m), then stop covariance
|
||||
// growth by setting the predicted to the previous values
|
||||
// This prevent an ill conditioned matrix from occurring for long periods
|
||||
// without GPS
|
||||
@ -1079,7 +1083,7 @@ void CovariancePrediction()
|
||||
}
|
||||
}
|
||||
|
||||
void FuseVelposNED()
|
||||
void FuseVelPosNED()
|
||||
{
|
||||
|
||||
// declare variables used by fault isolation logic
|
||||
|
@ -59,11 +59,11 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
void UpdateStrapdownEquationsNED();
|
||||
void UpdateStrapdownEquationsNED();
|
||||
|
||||
void CovariancePrediction();
|
||||
|
||||
void FuseVelposNED();
|
||||
void FuseVelPosNED();
|
||||
|
||||
void FuseMagnetometer();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user