mirror of https://github.com/ArduPilot/ardupilot
AP_Compass: do not use GSF if any model has been clipped
This commit is contained in:
parent
c06aced405
commit
2a5e9f76ac
|
@ -51,8 +51,10 @@ void CompassLearn::update(void)
|
|||
AP_Notify::flags.compass_cal_running = true;
|
||||
|
||||
ftype yaw_rad, yaw_variance;
|
||||
if (!gsf->getYawData(yaw_rad, yaw_variance) ||
|
||||
uint8_t n_clips;
|
||||
if (!gsf->getYawData(yaw_rad, yaw_variance, &n_clips) ||
|
||||
!is_positive(yaw_variance) ||
|
||||
n_clips > 1 ||
|
||||
yaw_variance >= sq(radians(YAW_ACCURACY_THRESHOLD_DEG))) {
|
||||
// not converged
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue