diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-08-26 21:55:52 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-08-26 21:55:52 +0200 |
commit | 96f5a823e9e0c878f96a723872e337357a558b14 (patch) | |
tree | a9facf48b0f6dd2650043d7bdd536b504667702f | |
parent | 7819e364bc5ff5c54b37ac9b9921d1dfeb8e42df (diff) | |
parent | 8d3dd7363dbf9a29d88d2abb3364739749894684 (diff) | |
download | px4-firmware-96f5a823e9e0c878f96a723872e337357a558b14.tar.gz px4-firmware-96f5a823e9e0c878f96a723872e337357a558b14.tar.bz2 px4-firmware-96f5a823e9e0c878f96a723872e337357a558b14.zip |
Merge pull request #1302 from PX4/catapultlaunchdetectorhotfix
catapult launch detection: fix integration logic
-rw-r--r-- | src/lib/launchdetection/CatapultLaunchMethod.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/launchdetection/CatapultLaunchMethod.cpp b/src/lib/launchdetection/CatapultLaunchMethod.cpp index c555a0a69..9d479832f 100644 --- a/src/lib/launchdetection/CatapultLaunchMethod.cpp +++ b/src/lib/launchdetection/CatapultLaunchMethod.cpp @@ -66,10 +66,10 @@ void CatapultLaunchMethod::update(float accel_x) last_timestamp = hrt_absolute_time(); if (accel_x > threshold_accel.get()) { - integrator += accel_x * dt; + integrator += dt; // warnx("*** integrator %.3f, threshold_accel %.3f, threshold_time %.3f, accel_x %.3f, dt %.3f", // (double)integrator, (double)threshold_accel.get(), (double)threshold_time.get(), (double)accel_x, (double)dt); - if (integrator > threshold_accel.get() * threshold_time.get()) { + if (integrator > threshold_time.get()) { launchDetected = true; } |