Replace EKF/common.h #defines with enums.

This commit is contained in:
mcsauder
2022-05-18 09:25:19 -04:00
committed by Daniel Agar
parent 8f2c84d36f
commit ea10eacb99
17 changed files with 171 additions and 164 deletions
+2 -2
View File
@@ -174,7 +174,7 @@ bool Ekf::initialiseFilter()
}
}
if (_params.mag_fusion_type <= MAG_FUSE_TYPE_3D) {
if (_params.mag_fusion_type <= MagFuseType::MAG_3D) {
if (_mag_counter < _obs_buffer_length) {
// not enough mag samples accumulated
return false;
@@ -202,7 +202,7 @@ bool Ekf::initialiseFilter()
initialiseCovariance();
// update the yaw angle variance using the variance of the measurement
if (_params.mag_fusion_type <= MAG_FUSE_TYPE_3D) {
if (_params.mag_fusion_type <= MagFuseType::MAG_3D) {
// using magnetic heading tuning parameter
increaseQuatYawErrVariance(sq(fmaxf(_params.mag_heading_noise, 1.0e-2f)));
}