GNSS yaw: use dedicated observation noise

This commit is contained in:
bresch
2021-08-02 14:22:03 +02:00
committed by Mathieu Bresciani
parent 718e5b5b5d
commit e90e1c7e2a
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -276,6 +276,9 @@ struct parameters {
float mag_yaw_rate_gate{0.25f}; ///< yaw rate threshold used by mode select logic (rad/sec)
const float quat_max_variance{0.0001f}; ///< zero innovation yaw measurements will not be fused when the sum of quaternion variance is less than this
// GNSS heading fusion
float gps_heading_noise{0.1f}; ///< measurement noise standard deviation used for GNSS heading fusion (rad)
// airspeed fusion
float tas_innov_gate{5.0f}; ///< True Airspeed innovation consistency gate size (STD)
float eas_noise{1.4f}; ///< EAS measurement noise standard deviation used for airspeed fusion (m/s)
+2 -2
View File
@@ -70,7 +70,7 @@ void Ekf::fuseGpsYaw()
// using magnetic heading process noise
// TODO extend interface to use yaw uncertainty provided by GPS if available
const float R_YAW = sq(fmaxf(_params.mag_heading_noise, 1.0e-2f));
const float R_YAW = sq(fmaxf(_params.gps_heading_noise, 1.0e-2f));
// calculate intermediate variables
const float HK0 = sinf(_gps_yaw_offset);
@@ -209,7 +209,7 @@ bool Ekf::resetYawToGps()
// GPS yaw measurement is alreday compensated for antenna offset in the driver
const float measured_yaw = _gps_sample_delayed.yaw;
const float yaw_variance = sq(fmaxf(_params.mag_heading_noise, 1.0e-2f));
const float yaw_variance = sq(fmaxf(_params.gps_heading_noise, 1.0e-2f));
resetQuatStateYaw(measured_yaw, yaw_variance, true);
_time_last_gps_yaw_fuse = _time_last_imu;