Observation index cannot get negative.

This commit is contained in:
Lorenz Meier 2014-06-29 12:00:54 +02:00
parent 092ede366a
commit b64c64d5a3
1 changed files with 1 additions and 1 deletions

View File

@ -1088,7 +1088,7 @@ void AttPosEKF::FuseVelposNED()
stateIndex = 4 + obsIndex;
// Calculate the measurement innovation, using states from a
// different time coordinate if fusing height data
if (obsIndex >= 0 && obsIndex <= 2)
if (obsIndex <= 2)
{
innovVelPos[obsIndex] = statesAtVelTime[stateIndex] - observation[obsIndex];
}