EKF hotfix: Force zero initialization of vectors

This commit is contained in:
Lorenz Meier 2014-07-13 14:58:57 +02:00
parent c610050dc3
commit b4b3a2a2c6
3 changed files with 11 additions and 3 deletions

View File

@ -743,8 +743,8 @@ FixedwingEstimator::task_main()
/* sets also parameters in the EKF object */
parameters_update();
Vector3f lastAngRate = {0.0f, 0.0f, 0.0f};
Vector3f lastAccel = {0.0f, 0.0f, 0.0f};
Vector3f lastAngRate;
Vector3f lastAccel;
/* wakeup source(s) */
struct pollfd fds[2];

View File

@ -73,7 +73,7 @@ void AttPosEKF::UpdateStrapdownEquationsNED()
float qUpdated[4];
float quatMag;
float deltaQuat[4];
const Vector3f gravityNED = {0.0,0.0,GRAVITY_MSS};
const Vector3f gravityNED(0.0f, 0.0f, GRAVITY_MSS);
// Remove sensor bias errors
correctedDelAng.x = dAngIMU.x - states[10];

View File

@ -19,6 +19,14 @@ public:
float y;
float z;
Vector3f() { zero(); }
Vector3f(float a, float b, float c) :
x(a),
y(b),
z(c)
{}
float length(void) const;
void zero(void);
};