mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 14:24:21 +08:00
ran astyle
This commit is contained in:
@@ -128,8 +128,8 @@ bool MulticopterLandDetector::get_freefall_state()
|
||||
const uint64_t now = hrt_absolute_time();
|
||||
|
||||
float acc_norm = _ctrl_state.x_acc * _ctrl_state.x_acc
|
||||
+ _ctrl_state.y_acc * _ctrl_state.y_acc
|
||||
+ _ctrl_state.z_acc * _ctrl_state.z_acc;
|
||||
+ _ctrl_state.y_acc * _ctrl_state.y_acc
|
||||
+ _ctrl_state.z_acc * _ctrl_state.z_acc;
|
||||
acc_norm = sqrtf(acc_norm); //norm of specific force. Should be close to 9.8 m/s^2 when landed.
|
||||
|
||||
bool freefall = (acc_norm < _params.acc_threshold_m_s2); //true if we are currently falling
|
||||
|
||||
Reference in New Issue
Block a user