EKF: use GPS to lookup declination from WMM before full GPS checks pass

This commit is contained in:
Daniel Agar
2020-09-28 08:43:32 +02:00
committed by Mathieu Bresciani
parent 6b99ea2a60
commit 4c2355a638
7 changed files with 777 additions and 740 deletions
+1 -1
View File
@@ -524,7 +524,7 @@ float Ekf::getMagDeclination()
} else if (_params.mag_declination_source & MASK_USE_GEO_DECL) {
// use parameter value until GPS is available, then use value returned by geo library
if (_NED_origin_initialised) {
if (_NED_origin_initialised || ISFINITE(_mag_declination_gps)) {
return _mag_declination_gps;
} else {