mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 16:13:34 +08:00
ekf2: make mag control responsible for WMM
- this further untangles mag control (which requires the WMM) from GPS
This commit is contained in:
committed by
Mathieu Bresciani
parent
be4d0d351c
commit
bbcf741e9e
@@ -259,7 +259,6 @@ public:
|
||||
// return true if the origin is valid
|
||||
bool getEkfGlobalOrigin(uint64_t &origin_time, double &latitude, double &longitude, float &origin_alt) const;
|
||||
bool setEkfGlobalOrigin(double latitude, double longitude, float altitude, float eph = 0.f, float epv = 0.f);
|
||||
void updateWmm(double lat, double lon);
|
||||
|
||||
// get the 1-sigma horizontal and vertical position uncertainty of the ekf WGS-84 position
|
||||
void get_ekf_gpos_accuracy(float *ekf_eph, float *ekf_epv) const;
|
||||
@@ -466,6 +465,9 @@ public:
|
||||
#endif // CONFIG_EKF2_GNSS
|
||||
|
||||
#if defined(CONFIG_EKF2_MAGNETOMETER)
|
||||
// set the magnetic field data returned by the geo library using position
|
||||
bool updateWorldMagneticModel(const double latitude_deg, const double longitude_deg);
|
||||
|
||||
const auto &aid_src_mag() const { return _aid_src_mag; }
|
||||
#endif // CONFIG_EKF2_MAGNETOMETER
|
||||
|
||||
@@ -770,8 +772,8 @@ private:
|
||||
bool update_all_states = false, bool update_tilt = false);
|
||||
|
||||
// fuse magnetometer declination measurement
|
||||
// argument passed in is the declination uncertainty in radians
|
||||
bool fuseDeclination(float decl_sigma);
|
||||
// declination uncertainty in radians
|
||||
bool fuseDeclination(float decl_measurement_rad, float decl_sigma);
|
||||
|
||||
#endif // CONFIG_EKF2_MAGNETOMETER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user