EKF: Parameterize maximum angle for rng fusion

This commit is contained in:
CarlOlsson
2017-09-26 20:50:02 +02:00
parent 160e4d69c1
commit 0a7c3ecbc6
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ void Ekf::controlFusionModes()
// calculate 2,2 element of rotation matrix from sensor frame to earth frame
_R_rng_to_earth_2_2 = _R_to_earth(2, 0) * _sin_tilt_rng + _R_to_earth(2, 2) * _cos_tilt_rng;
_range_data_ready = _range_buffer.pop_first_older_than(_imu_sample_delayed.time_us, &_range_sample_delayed)
&& (_R_rng_to_earth_2_2 > 0.7071f);
&& (_R_rng_to_earth_2_2 > _params.range_cos_max_tilt);
checkForStuckRange();