From 9cb59e33a6da2bcd2bb49bc3d49ce527597582f9 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 31 Jan 2014 17:43:49 +0100 Subject: [PATCH] Initializing variables --- .../fw_att_pos_estimator/fw_att_pos_estimator_main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 10f7d42acd..3ed8163455 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];