From 8e35f6727c20960c05c6e7fad38fccb80f0bdc5e Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 31 Jan 2014 16:52:54 +0100 Subject: Testing missing init bit in array initialization --- src/modules/fw_att_pos_estimator/estimator.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/modules/fw_att_pos_estimator') diff --git a/src/modules/fw_att_pos_estimator/estimator.cpp b/src/modules/fw_att_pos_estimator/estimator.cpp index c7c9b6476..9b57dfd55 100644 --- a/src/modules/fw_att_pos_estimator/estimator.cpp +++ b/src/modules/fw_att_pos_estimator/estimator.cpp @@ -1730,6 +1730,7 @@ void calcEarthRateNED(Vector3f &omega, float latitude) void CovarianceInit() { // Calculate the initial covariance matrix P + P[0][0] = 0.25f*sq(1.0f*deg2rad); P[1][1] = 0.25f*sq(1.0f*deg2rad); P[2][2] = 0.25f*sq(1.0f*deg2rad); P[3][3] = 0.25f*sq(10.0f*deg2rad); -- cgit v1.2.3 From 9cb59e33a6da2bcd2bb49bc3d49ce527597582f9 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 31 Jan 2014 17:43:49 +0100 Subject: Initializing variables --- src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules/fw_att_pos_estimator') diff --git a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp index 10f7d42ac..3ed816345 100644 --- a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp +++ b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp @@ -392,8 +392,6 @@ FixedwingEstimator::task_main() parameters_update(); - Vector3f lastAngRate; - Vector3f lastAccel; /* set initial filter state */ fuseVelData = false; fusePosData = false; @@ -402,6 +400,11 @@ FixedwingEstimator::task_main() fuseVtasData = false; statesInitialised = false; + /* initialize measurement data */ + VtasMeas = 0.0f; + Vector3f lastAngRate = {0.0f, 0.0f, 0.0f}; + Vector3f lastAccel = {0.0f, 0.0f, 0.0f}; + /* wakeup source(s) */ struct pollfd fds[2]; -- cgit v1.2.3