mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 03:53:33 +08:00
Updated commander to take free-fall into account
Added free-fall status in vehicle_status topic
This commit is contained in:
@@ -126,7 +126,7 @@ bool MulticopterLandDetector::get_freefall_state()
|
||||
}
|
||||
acc_norm = sqrtf(acc_norm); //norm of specific force
|
||||
|
||||
int32_t elapsed_time_ms = (now - _freefallTimer)/1000;
|
||||
int32_t elapsed_time_ms = (now - _freefallTimer) / 1000;
|
||||
bool freefall = (acc_norm < _params.acc_threshold_m_s2);
|
||||
if (!freefall || _freefallTimer == 0) { //reset timer if uav not falling
|
||||
_freefallTimer = now;
|
||||
|
||||
@@ -105,7 +105,7 @@ PARAM_DEFINE_FLOAT(LNDMC_FFALL_THR, 2.0f);
|
||||
*
|
||||
* @group Land Detector
|
||||
*/
|
||||
PARAM_DEFINE_INT32(LNDMC_FFALL_TRIG, 200); //minimal value is limited by LAND_DETECTOR_UPDATE_RATE=50Hz in landDetector.h
|
||||
PARAM_DEFINE_INT32(LNDMC_FFALL_TRIG, 300); //minimal value is limited by LAND_DETECTOR_UPDATE_RATE=50Hz in landDetector.h
|
||||
|
||||
/**
|
||||
* Fixedwing max horizontal velocity
|
||||
|
||||
Reference in New Issue
Block a user