update range sensor angle parameters in case they have changed

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman 2017-02-13 16:32:56 +01:00
parent aa53f45f15
commit 7e2597ec28
1 changed files with 5 additions and 0 deletions

View File

@ -96,6 +96,11 @@ void Ekf::runTerrainEstimator()
if (_range_data_ready) { if (_range_data_ready) {
fuseHagl(); fuseHagl();
// update range sensor angle parameters in case they have changed
// we do this here to avoid doing those calculations at a high rate
_sin_tilt_rng = sinf(_params.rng_sens_pitch);
_cos_tilt_rng = cosf(_params.rng_sens_pitch);
} }
} }
} }