ekf2: cleanup more optional mag (CONFIG_EKF2_MAGNETOMETER)

This commit is contained in:
Daniel Agar
2023-10-09 10:18:02 -04:00
parent 5f87f3a046
commit 28d58a947f
7 changed files with 71 additions and 45 deletions
@@ -452,12 +452,15 @@ protected:
uint64_t _wmm_gps_time_last_checked{0}; // time WMM last checked
uint64_t _wmm_gps_time_last_set{0}; // time WMM last set
#if defined(CONFIG_EKF2_MAGNETOMETER)
float _mag_declination_gps{NAN}; // magnetic declination returned by the geo library using the last valid GPS position (rad)
float _mag_inclination_gps{NAN}; // magnetic inclination returned by the geo library using the last valid GPS position (rad)
float _mag_strength_gps{NAN}; // magnetic strength returned by the geo library using the last valid GPS position (T)
float _mag_inclination{NAN};
float _mag_strength{NAN};
#endif // CONFIG_EKF2_MAGNETOMETER
// this is the current status of the filter control modes
filter_control_status_u _control_status{};