From 004118f929a03e0d42e363dd2b74330ccf6b82fe Mon Sep 17 00:00:00 2001 From: Johan Jansen Date: Mon, 9 Feb 2015 12:47:31 +0100 Subject: [PATCH] LandDetector: Change rotation rate in rads/s to deg/s (more similar to mpc params) --- src/modules/land_detector/MulticopterLandDetector.cpp | 2 ++ src/modules/land_detector/land_detector_params.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/land_detector/MulticopterLandDetector.cpp b/src/modules/land_detector/MulticopterLandDetector.cpp index 61b5867bf0..cfb3344f9b 100644 --- a/src/modules/land_detector/MulticopterLandDetector.cpp +++ b/src/modules/land_detector/MulticopterLandDetector.cpp @@ -43,6 +43,7 @@ #include #include +#include MulticopterLandDetector::MulticopterLandDetector() : LandDetector(), _paramHandle(), @@ -140,6 +141,7 @@ void MulticopterLandDetector::updateParameterCache(const bool force) param_get(_paramHandle.maxClimbRate, &_params.maxClimbRate); param_get(_paramHandle.maxVelocity, &_params.maxVelocity); param_get(_paramHandle.maxRotation, &_params.maxRotation); + _params.maxRotation = math::radians(_params.maxRotation); param_get(_paramHandle.maxThrottle, &_params.maxThrottle); } } diff --git a/src/modules/land_detector/land_detector_params.c b/src/modules/land_detector/land_detector_params.c index 0302bc7c14..0deba18352 100644 --- a/src/modules/land_detector/land_detector_params.c +++ b/src/modules/land_detector/land_detector_params.c @@ -61,11 +61,11 @@ PARAM_DEFINE_FLOAT(LNDMC_XY_VEL_MAX, 1.00f); /** * Multicopter max rotation * - * Maximum allowed around each axis to trigger a land (radians per second) + * Maximum allowed around each axis to trigger a land (degrees per second) * * @group Land Detector */ -PARAM_DEFINE_FLOAT(LNDMC_ROT_MAX, 0.20f); +PARAM_DEFINE_FLOAT(LNDMC_ROT_MAX, 0.15f); /** * Multicopter max throttle