mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
AP_NavEKF3: fixed constrain indexing bug
fixes #20180 thanks to @liyue75 for spotting this!
This commit is contained in:
parent
47739344b8
commit
36f68c8b64
@ -1945,7 +1945,7 @@ void NavEKF3_core::ConstrainVariances()
|
||||
zeroCols(P,13,15);
|
||||
zeroRows(P,13,15);
|
||||
for (uint8_t i=0; i<=2; i++) {
|
||||
const uint8_t stateIndex = 1 + 13;
|
||||
const uint8_t stateIndex = i + 13;
|
||||
P[stateIndex][stateIndex] = fmaxF(P[stateIndex][stateIndex], minStateVarTarget);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user