Copter: ekf check triggers if position bad

This commit is contained in:
Randy Mackay 2015-03-26 23:24:26 -07:00
parent 74b98b89d0
commit 765b8ded02
1 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,11 @@ static bool ekf_over_threshold()
return false;
}
// return true immediately if position is bad
if (!position_ok()) {
return true;
}
// use EKF to get variance
float posVar, hgtVar, tasVar;
Vector3f magVar;