Prevented attitude correction from changing velocity when pos not init.

This commit is contained in:
James Goppert
2013-01-17 12:18:20 -05:00
parent c2c0baf843
commit 13bb814f20
+5 -3
View File
@@ -590,9 +590,11 @@ int KalmanNav::correctAtt()
psi += xCorrect(PSI);
// attitude also affects nav velocities
vN += xCorrect(VN);
vE += xCorrect(VE);
vD += xCorrect(VD);
if (_positionInitialized) {
vN += xCorrect(VN);
vE += xCorrect(VE);
vD += xCorrect(VD);
}
// update state covariance
// http://en.wikipedia.org/wiki/Extended_Kalman_filter