diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-09 23:54:04 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-09 23:54:04 +0100 |
commit | efecd85658eecd0b0651a21c37d3936589074e91 (patch) | |
tree | c61937fd22ffc9e2d3440b26eb3fe947df23776f /src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp | |
parent | c13f7d1f4b6db3d6be99b744eb454a6fcb706311 (diff) | |
download | px4-firmware-efecd85658eecd0b0651a21c37d3936589074e91.tar.gz px4-firmware-efecd85658eecd0b0651a21c37d3936589074e91.tar.bz2 px4-firmware-efecd85658eecd0b0651a21c37d3936589074e91.zip |
Further build cleanup
Diffstat (limited to 'src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp')
-rw-r--r-- | src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp | 4 |
1 files changed, 3 insertions, 1 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 71df13d27..23cd98530 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 @@ -405,6 +405,8 @@ FixedwingEstimator::task_main() Vector3f lastAngRate = {0.0f, 0.0f, 0.0f}; Vector3f lastAccel = {0.0f, 0.0f, 0.0f}; + float dt = 0.0f; // time lapsed since last covariance prediction + /* wakeup source(s) */ struct pollfd fds[2]; @@ -675,7 +677,7 @@ FixedwingEstimator::task_main() * or the time limit will be exceeded on the next measurement update */ if ((dt >= (covTimeStepMax - dtIMU)) || (summedDelAng.length() > covDelAngMax)) { - CovariancePrediction(); + CovariancePrediction(dt); summedDelAng = summedDelAng.zero(); summedDelVel = summedDelVel.zero(); dt = 0.0f; |