mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-13 20:28:37 -04:00
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;
|
AP_Notify::flags.compass_cal_running = true;
|
||||||
|
|
||||||
ftype yaw_rad, yaw_variance;
|
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) ||
|
!is_positive(yaw_variance) ||
|
||||||
|
n_clips > 1 ||
|
||||||
yaw_variance >= sq(radians(YAW_ACCURACY_THRESHOLD_DEG))) {
|
yaw_variance >= sq(radians(YAW_ACCURACY_THRESHOLD_DEG))) {
|
||||||
// not converged
|
// not converged
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user