Firmware
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VtolType Class Referenceabstract
Inheritance diagram for VtolType:
Standard Tailsitter Tiltrotor

Public Member Functions

 VtolType (VtolAttitudeControl *att_controller)
 
 VtolType (const VtolType &)=delete
 
VtolTypeoperator= (const VtolType &)=delete
 
bool init ()
 Initialise.
 
virtual void update_vtol_state ()=0
 Update vtol state.
 
virtual void update_transition_state ()=0
 Update transition state.
 
virtual void update_mc_state ()
 Update multicopter state.
 
virtual void update_fw_state ()
 Update fixed wing state.
 
virtual void fill_actuator_outputs ()=0
 Write control values to actuator output topics.
 
virtual void waiting_on_tecs ()
 Special handling opportunity for the time right after transition to FW before TECS is running.
 
void check_quadchute_condition ()
 Checks for fixed-wing failsafe condition and issues abort request if needed.
 
bool can_transition_on_ground ()
 Returns true if we're allowed to do a mode transition on the ground.
 
mode get_mode ()
 
virtual void parameters_update ()=0
 

Protected Member Functions

bool set_idle_mc ()
 Sets mc motor minimum pwm to VT_IDLE_PWM_MC which ensures that they are spinning in mc mode. More...
 
bool set_idle_fw ()
 Sets mc motor minimum pwm to PWM_MIN which ensures that the motors stop spinning on zero throttle in fw mode. More...
 
motor_state set_motor_state (const motor_state current_state, const motor_state next_state, const int value=0)
 Sets state of a selection of motors, see struct motor_state. More...
 

Protected Attributes

VtolAttitudeControl_attc
 
mode _vtol_mode
 
struct vehicle_attitude_s * _v_att
 
struct vehicle_attitude_setpoint_s * _v_att_sp
 
struct vehicle_attitude_setpoint_s * _mc_virtual_att_sp
 
struct vehicle_attitude_setpoint_s * _fw_virtual_att_sp
 
struct vehicle_control_mode_s * _v_control_mode
 
struct vtol_vehicle_status_s * _vtol_vehicle_status
 
struct actuator_controls_s * _actuators_out_0
 
struct actuator_controls_s * _actuators_out_1
 
struct actuator_controls_s * _actuators_mc_in
 
struct actuator_controls_s * _actuators_fw_in
 
struct vehicle_local_position_s * _local_pos
 
struct vehicle_local_position_setpoint_s * _local_pos_sp
 
struct airspeed_s * _airspeed
 
struct tecs_status_s * _tecs_status
 
struct vehicle_land_detected_s * _land_detected
 
struct Params_params
 
bool flag_idle_mc = false
 
bool _pusher_active = false
 
float _mc_roll_weight = 1.0f
 
float _mc_pitch_weight = 1.0f
 
float _mc_yaw_weight = 1.0f
 
float _mc_throttle_weight = 1.0f
 
float _thrust_transition = 0.0f
 
float _ra_hrate = 0.0f
 
float _ra_hrate_sp = 0.0f
 
bool _flag_was_in_trans_mode = false
 
hrt_abstime _trans_finished_ts = 0
 
bool _tecs_running = false
 
hrt_abstime _tecs_running_ts = 0
 
motor_state _motor_state = motor_state::DISABLED
 

Member Function Documentation

§ set_idle_fw()

bool VtolType::set_idle_fw ( )
protected

Sets mc motor minimum pwm to PWM_MIN which ensures that the motors stop spinning on zero throttle in fw mode.

Returns
true on success

§ set_idle_mc()

bool VtolType::set_idle_mc ( )
protected

Sets mc motor minimum pwm to VT_IDLE_PWM_MC which ensures that they are spinning in mc mode.

Returns
true on success

§ set_motor_state()

motor_state VtolType::set_motor_state ( const motor_state  current_state,
const motor_state  next_state,
const int  value = 0 
)
protected

Sets state of a selection of motors, see struct motor_state.

Parameters
[in]current_stateThe current motor state
[in]next_stateThe next state
[in]valueDesired pwm value if next_state = motor_state::VALUE
Returns
next_state if succesfull, otherwise current_state

The documentation for this class was generated from the following files: