45 #define ARSP_YAW_CTRL_DISABLE 4.0f // airspeed at which we stop controlling yaw during a front transition 46 #define THROTTLE_TRANSITION_MAX 0.25f // maximum added thrust above last value in transition 47 #define PITCH_TRANSITION_FRONT_P1 -1.1f // pitch angle to switch to TRANSITION_P2 48 #define PITCH_TRANSITION_BACK -0.25f // pitch angle to switch to MC 136 bool transition_to_fw =
false;
139 if (airspeed_triggers_transition) {
143 transition_to_fw =
true;
149 if (transition_to_fw) {
203 float yaw_sp = atan2f(z(1), z(0));
vtol is in fixed wing mode
float equivalent_airspeed_m_s
Vector3 cross(const Matrix31 &b) const
void update_transition_state() override
Update transition state.
void parameters_update() override
void waiting_on_tecs() override
Special handling opportunity for the time right after transition to FW before TECS is running...
__EXPORT int param_get(param_t param, void *val)
Copy the value of a parameter.
Vector3< Type > dcm_z() const
Corresponding body z-axis to an attitude quaternion / last orthogonal unit basis vector.
struct actuator_controls_s * _actuators_mc_in
struct vehicle_attitude_s * _v_att
matrix::Quatf _q_trans_sp
struct Tailsitter::@139 _params_tailsitter
void copyTo(Type dst[M *N]) const
VtolAttitudeControl * _attc
struct actuator_controls_s * _actuators_out_0
vtol is in front transition part 1 mode
struct Tailsitter::@141 _vtol_schedule
virtual void update_fw_state()
Update fixed wing state.
struct actuator_controls_s * _actuators_fw_in
struct vehicle_attitude_setpoint_s * _v_att_sp
constexpr T radians(T degrees)
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
struct vehicle_attitude_setpoint_s * _mc_virtual_att_sp
bool set_idle_mc()
Sets mc motor minimum pwm to VT_IDLE_PWM_MC which ensures that they are spinning in mc mode...
uint64_t timestamp_sample
struct vehicle_attitude_setpoint_s * _fw_virtual_att_sp
vtol is in back transition mode
#define PITCH_TRANSITION_BACK
__EXPORT param_t param_find(const char *name)
Look up a parameter by name.
float back_trans_duration
Tailsitter(VtolAttitudeControl *_att_controller)
Vector3< float > Vector3f
matrix::Vector3f _trans_rot_axis
float transition_airspeed
vtol is in multicopter mode
Quaternion< float > Quatf
#define PITCH_TRANSITION_FRONT_P1
void update_vtol_state() override
Update vtol state.
struct airspeed_validated_s * _airspeed_validated
struct Tailsitter::@140 _params_handles_tailsitter
AxisAngle< float > AxisAnglef
bool _flag_was_in_trans_mode
struct actuator_controls_s * _actuators_out_1
void update_fw_state() override
Update fixed wing state.
bool is_fixed_wing_requested()
float front_trans_duration
struct vtol_vehicle_status_s * _vtol_vehicle_status
void fill_actuator_outputs() override
Write data to actuator output topic.
bool can_transition_on_ground()
Returns true if we're allowed to do a mode transition on the ground.
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).
matrix::Quatf _q_trans_start