From f8718e3c11c2527339393fe44a0a860360c61804 Mon Sep 17 00:00:00 2001 From: mahimayoga Date: Thu, 19 Dec 2024 14:47:43 +0100 Subject: [PATCH] Formatting --- src/modules/land_detector/FixedwingLandDetector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/land_detector/FixedwingLandDetector.cpp b/src/modules/land_detector/FixedwingLandDetector.cpp index d27ab18ea14b..15b3f50cf7c1 100644 --- a/src/modules/land_detector/FixedwingLandDetector.cpp +++ b/src/modules/land_detector/FixedwingLandDetector.cpp @@ -76,10 +76,11 @@ bool FixedwingLandDetector::_get_landed_state() if (!_vehicle_local_position.v_xy_valid) { // set _velocity_xy_filtered to 0 if data is invalid val = 0.0f; + } else { // Horizontal velocity complimentary filter. val = 0.97f * _velocity_xy_filtered + 0.03f * sqrtf(_vehicle_local_position.vx * _vehicle_local_position.vx + - _vehicle_local_position.vy * _vehicle_local_position.vy); + _vehicle_local_position.vy * _vehicle_local_position.vy); }