Add vision height covariance passthrough (#507)

* Add vision height covariance passthrough

* Fix hgtErr layout
This commit is contained in:
Dion Gonano
2018-09-11 06:36:13 +10:00
committed by Paul Riseborough
parent a7245229cb
commit 2354c30d81
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ void Ekf::fuseVelPosHeight()
// calculate the innovation assuming the external vision observaton is in local NED frame
innovation[5] = _state.pos(2) - _ev_sample_delayed.posNED(2);
// observation variance - defined externally
R[5] = fmaxf(_ev_sample_delayed.posErr, 0.01f);
R[5] = fmaxf(_ev_sample_delayed.hgtErr, 0.01f);
R[5] = R[5] * R[5];
// innovation gate size
gate_size[5] = fmaxf(_params.ev_innov_gate, 1.0f);