Browse Source

AP_NavEKF: Always check for new GPS data

This fixes a bug that meant that once the EKF had started up in a non-GPS mode, it would no longer read the GPS and therefore would never be able to use GPS again until reset.
master
priseborough 10 years ago committed by Randy Mackay
parent
commit
2c012c2763
  1. 8
      libraries/AP_NavEKF/AP_NavEKF.cpp

8
libraries/AP_NavEKF/AP_NavEKF.cpp

@ -737,11 +737,11 @@ void NavEKF::UpdateFilter() @@ -737,11 +737,11 @@ void NavEKF::UpdateFilter()
// select fusion of velocity, position and height measurements
void NavEKF::SelectVelPosFusion()
{
// check for new data, specify which measurements should be used and check data for freshness
if (PV_AidingMode == AID_ABSOLUTE) {
// check for and read new GPS data
readGpsData();
// check for and read new GPS data
readGpsData();
// Specify which measurements should be used and check data for freshness
if (PV_AidingMode == AID_ABSOLUTE) {
// check if we can use opticalflow as a backup
bool optFlowBackup = (flowDataValid && !hgtTimeout);

Loading…
Cancel
Save