LandDetector: Change rotation rate in rads/s to deg/s (more similar to mpc params)

This commit is contained in:
Johan Jansen 2015-02-09 12:47:31 +01:00
parent 01dc774703
commit 004118f929
2 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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