mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 10:50:19 +08:00
catapult launch detection: fix integration logic
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user