Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
terrain_estimator: add vehicle_variance_scaler
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlOlsson authored and priseborough committed Nov 14, 2018
1 parent acde4eb commit 8a2e512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EKF/terrain_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void Ekf::fuseHagl()
_hagl_innov = pred_hagl - meas_hagl;

// calculate the observation variance adding the variance of the vehicles own height uncertainty
float obs_variance = fmaxf(P[9][9], 0.0f) + sq(_params.range_noise) + sq(_params.range_noise_scaler * _range_sample_delayed.rng);
float obs_variance = fmaxf(P[9][9] * _params.vehicle_variance_scaler, 0.0f) + sq(_params.range_noise) + sq(_params.range_noise_scaler * _range_sample_delayed.rng);

// calculate the innovation variance - limiting it to prevent a badly conditioned fusion
_hagl_innov_var = fmaxf(_terrain_var + obs_variance, obs_variance);
Expand Down

0 comments on commit 8a2e512

Please sign in to comment.