mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 22:27:36 +08:00
EKF: optflow fusion cleanup
This commit is contained in:
committed by
Paul Riseborough
parent
7fa9a1963b
commit
5907e81ef7
@@ -65,9 +65,6 @@ void Ekf::fuseOptFlow()
|
|||||||
// calculate the optical flow observation variance
|
// calculate the optical flow observation variance
|
||||||
const float R_LOS = calcOptFlowMeasVar();
|
const float R_LOS = calcOptFlowMeasVar();
|
||||||
|
|
||||||
SparseVector24f<0,1,2,3,4,5,6> Hfusion; // Optical flow observation Jacobians
|
|
||||||
Vector24f Kfusion; // Optical flow Kalman gains
|
|
||||||
|
|
||||||
// get rotation matrix from earth to body
|
// get rotation matrix from earth to body
|
||||||
const Dcmf earth_to_body = quatToInverseRotMat(_state.quat_nominal);
|
const Dcmf earth_to_body = quatToInverseRotMat(_state.quat_nominal);
|
||||||
|
|
||||||
@@ -262,6 +259,8 @@ void Ekf::fuseOptFlow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fuse observation axes sequentially
|
// fuse observation axes sequentially
|
||||||
|
SparseVector24f<0,1,2,3,4,5,6> Hfusion; // Optical flow observation Jacobians
|
||||||
|
Vector24f Kfusion; // Optical flow Kalman gains
|
||||||
for (uint8_t obs_index = 0; obs_index <= 1; obs_index++) {
|
for (uint8_t obs_index = 0; obs_index <= 1; obs_index++) {
|
||||||
|
|
||||||
// calculate observation Jocobians and Kalman gains
|
// calculate observation Jocobians and Kalman gains
|
||||||
|
|||||||
Reference in New Issue
Block a user