mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 12:33:33 +08:00
Add const modifier
const modifier Add missing const modifier
This commit is contained in:
committed by
Mathieu Bresciani
parent
e357376797
commit
b5e1397c0f
@@ -165,7 +165,7 @@ void Ekf::fuseHagl()
|
||||
|
||||
if (_hagl_test_ratio <= 1.0f) {
|
||||
// calculate the Kalman gain
|
||||
float gain = _terrain_var / _hagl_innov_var;
|
||||
const float gain = _terrain_var / _hagl_innov_var;
|
||||
// correct the state
|
||||
_terrain_vpos -= gain * _hagl_innov;
|
||||
// correct the variance
|
||||
|
||||
Reference in New Issue
Block a user