diff options
author | Johan Jansen <jnsn.johan@gmail.com> | 2015-02-09 12:47:31 +0100 |
---|---|---|
committer | Johan Jansen <jnsn.johan@gmail.com> | 2015-02-09 12:47:31 +0100 |
commit | 004118f929a03e0d42e363dd2b74330ccf6b82fe (patch) | |
tree | b4d4e57d90936ab65a473e1708cb6173f5299831 /src/modules | |
parent | 01dc7747032bc3d14408e23a13ef45c9f37e46c5 (diff) | |
download | px4-firmware-004118f929a03e0d42e363dd2b74330ccf6b82fe.tar.gz px4-firmware-004118f929a03e0d42e363dd2b74330ccf6b82fe.tar.bz2 px4-firmware-004118f929a03e0d42e363dd2b74330ccf6b82fe.zip |
LandDetector: Change rotation rate in rads/s to deg/s (more similar to mpc params)
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/land_detector/MulticopterLandDetector.cpp | 2 | ||||
-rw-r--r-- | 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 61b5867bf..cfb3344f9 100644 --- a/src/modules/land_detector/MulticopterLandDetector.cpp +++ b/src/modules/land_detector/MulticopterLandDetector.cpp @@ -43,6 +43,7 @@ #include <cmath> #include <drivers/drv_hrt.h> +#include <mathlib/mathlib.h> 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 0302bc7c1..0deba1835 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 |