aboutsummaryrefslogtreecommitdiff
path: root/src/lib/launchdetection/CatapultLaunchMethod.cpp
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-08-27 21:33:42 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-08-27 21:33:42 +0200
commit05027617996c86005fb8ec4d68fae798b9fbef35 (patch)
treee95f7178fecfea58fa81c61bee1550d954feb4bb /src/lib/launchdetection/CatapultLaunchMethod.cpp
parent9cc1f1ab9db4af9af18e6879ba82cbcfa8e588f3 (diff)
parent62b98cc9447262111da1e9ecac700a180f121482 (diff)
downloadpx4-firmware-05027617996c86005fb8ec4d68fae798b9fbef35.tar.gz
px4-firmware-05027617996c86005fb8ec4d68fae798b9fbef35.tar.bz2
px4-firmware-05027617996c86005fb8ec4d68fae798b9fbef35.zip
Merge remote-tracking branch 'upstream/master' into obcfailsafe
Diffstat (limited to 'src/lib/launchdetection/CatapultLaunchMethod.cpp')
-rw-r--r--src/lib/launchdetection/CatapultLaunchMethod.cpp4
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;
}