mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 02:23:35 +08:00
EKF: Ensure yaw gets reset when declination is set
This commit is contained in:
committed by
Paul Riseborough
parent
68a3cbc368
commit
4657a9cd21
@@ -79,6 +79,8 @@ bool Ekf::collect_gps(uint64_t time_usec, struct gps_message *gps)
|
||||
_last_gps_origin_time_us = _time_last_imu;
|
||||
// set the magnetic declination returned by the geo library using the current GPS position
|
||||
_mag_declination_gps = math::radians(get_mag_declination(lat, lon));
|
||||
// request a reset of the yaw using the new declination
|
||||
_mag_yaw_reset_req = true;
|
||||
// save the horizontal and vertical position uncertainty of the origin
|
||||
_gps_origin_eph = gps->eph;
|
||||
_gps_origin_epv = gps->epv;
|
||||
|
||||
Reference in New Issue
Block a user