39 #include <mathlib/mathlib.h> 43 velocity_p_gain =
math::max(velocity_p_gain, 0.01
f);
48 const float takeoff_desired_vz,
const bool skip_takeoff,
const hrt_abstime &now_us)
101 if (armed && skip_takeoff) {
130 return takeoff_desired_vz;
systemlib::Hysteresis _spoolup_time_hysteresis
becomes true MPC_SPOOLUP_TIME seconds after the vehicle was armed
void generateInitialRampValue(const float hover_thrust, const float velocity_p_gain)
Calculate a vertical velocity to initialize the takeoff ramp that when passed to the velocity control...
float _takeoff_ramp_vz_init
float updateRamp(const float dt, const float takeoff_desired_vz)
Update and return the velocity constraint ramp value during takeoff.
void updateTakeoffState(const bool armed, const bool landed, const bool want_takeoff, const float takeoff_desired_vz, const bool skip_takeoff, const hrt_abstime &now_us)
Update the state for the takeoff.
void set_state_and_update(const bool new_state, const hrt_abstime &now_us)
static struct actuator_armed_s armed
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
TakeoffState _takeoff_state
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
constexpr _Tp max(_Tp a, _Tp b)
A class handling all takeoff states and a smooth ramp up of the motors.