44 #include <px4_platform_common/px4_config.h> 45 #include <px4_platform_common/defines.h> 46 #include <px4_platform_common/module.h> 47 #include <px4_platform_common/module_params.h> 48 #include <px4_platform_common/posix.h> 49 #include <px4_platform_common/tasks.h> 50 #include <px4_platform_common/px4_work_queue/WorkItem.hpp> 89 static int print_usage(
const char *reason =
nullptr);
151 (ParamFloat<px4::params::FW_ACRO_X_MAX>) _param_fw_acro_x_max,
152 (ParamFloat<px4::params::FW_ACRO_Y_MAX>) _param_fw_acro_y_max,
153 (ParamFloat<px4::params::FW_ACRO_Z_MAX>) _param_fw_acro_z_max,
155 (ParamFloat<px4::params::FW_AIRSPD_MAX>) _param_fw_airspd_max,
156 (ParamFloat<px4::params::FW_AIRSPD_MIN>) _param_fw_airspd_min,
157 (ParamFloat<px4::params::FW_AIRSPD_TRIM>) _param_fw_airspd_trim,
158 (ParamInt<px4::params::FW_ARSP_MODE>) _param_fw_arsp_mode,
160 (ParamBool<px4::params::FW_BAT_SCALE_EN>) _param_fw_bat_scale_en,
162 (ParamFloat<px4::params::FW_DTRIM_P_FLPS>) _param_fw_dtrim_p_flps,
163 (ParamFloat<px4::params::FW_DTRIM_P_VMAX>) _param_fw_dtrim_p_vmax,
164 (ParamFloat<px4::params::FW_DTRIM_P_VMIN>) _param_fw_dtrim_p_vmin,
165 (ParamFloat<px4::params::FW_DTRIM_R_FLPS>) _param_fw_dtrim_r_flps,
166 (ParamFloat<px4::params::FW_DTRIM_R_VMAX>) _param_fw_dtrim_r_vmax,
167 (ParamFloat<px4::params::FW_DTRIM_R_VMIN>) _param_fw_dtrim_r_vmin,
168 (ParamFloat<px4::params::FW_DTRIM_Y_VMAX>) _param_fw_dtrim_y_vmax,
169 (ParamFloat<px4::params::FW_DTRIM_Y_VMIN>) _param_fw_dtrim_y_vmin,
171 (ParamFloat<px4::params::FW_FLAPERON_SCL>) _param_fw_flaperon_scl,
172 (ParamFloat<px4::params::FW_FLAPS_LND_SCL>) _param_fw_flaps_lnd_scl,
173 (ParamFloat<px4::params::FW_FLAPS_SCL>) _param_fw_flaps_scl,
174 (ParamFloat<px4::params::FW_FLAPS_TO_SCL>) _param_fw_flaps_to_scl,
176 (ParamFloat<px4::params::FW_MAN_P_MAX>) _param_fw_man_p_max,
177 (ParamFloat<px4::params::FW_MAN_P_SC>) _param_fw_man_p_sc,
178 (ParamFloat<px4::params::FW_MAN_R_MAX>) _param_fw_man_r_max,
179 (ParamFloat<px4::params::FW_MAN_R_SC>) _param_fw_man_r_sc,
180 (ParamFloat<px4::params::FW_MAN_Y_SC>) _param_fw_man_y_sc,
182 (ParamFloat<px4::params::FW_P_RMAX_NEG>) _param_fw_p_rmax_neg,
183 (ParamFloat<px4::params::FW_P_RMAX_POS>) _param_fw_p_rmax_pos,
184 (ParamFloat<px4::params::FW_P_TC>) _param_fw_p_tc,
185 (ParamFloat<px4::params::FW_PR_FF>) _param_fw_pr_ff,
186 (ParamFloat<px4::params::FW_PR_I>) _param_fw_pr_i,
187 (ParamFloat<px4::params::FW_PR_IMAX>) _param_fw_pr_imax,
188 (ParamFloat<px4::params::FW_PR_P>) _param_fw_pr_p,
189 (ParamFloat<px4::params::FW_PSP_OFF>) _param_fw_psp_off,
191 (ParamFloat<px4::params::FW_RATT_TH>) _param_fw_ratt_th,
193 (ParamFloat<px4::params::FW_R_RMAX>) _param_fw_r_rmax,
194 (ParamFloat<px4::params::FW_R_TC>) _param_fw_r_tc,
195 (ParamFloat<px4::params::FW_RLL_TO_YAW_FF>) _param_fw_rll_to_yaw_ff,
196 (ParamFloat<px4::params::FW_RR_FF>) _param_fw_rr_ff,
197 (ParamFloat<px4::params::FW_RR_I>) _param_fw_rr_i,
198 (ParamFloat<px4::params::FW_RR_IMAX>) _param_fw_rr_imax,
199 (ParamFloat<px4::params::FW_RR_P>) _param_fw_rr_p,
200 (ParamFloat<px4::params::FW_RSP_OFF>) _param_fw_rsp_off,
202 (ParamBool<px4::params::FW_W_EN>) _param_fw_w_en,
203 (ParamFloat<px4::params::FW_W_RMAX>) _param_fw_w_rmax,
204 (ParamFloat<px4::params::FW_WR_FF>) _param_fw_wr_ff,
205 (ParamFloat<px4::params::FW_WR_I>) _param_fw_wr_i,
206 (ParamFloat<px4::params::FW_WR_IMAX>) _param_fw_wr_imax,
207 (ParamFloat<px4::params::FW_WR_P>) _param_fw_wr_p,
209 (ParamFloat<px4::params::FW_Y_RMAX>) _param_fw_y_rmax,
210 (ParamFloat<px4::params::FW_YR_FF>) _param_fw_yr_ff,
211 (ParamFloat<px4::params::FW_YR_I>) _param_fw_yr_i,
212 (ParamFloat<px4::params::FW_YR_IMAX>) _param_fw_yr_imax,
213 (ParamFloat<px4::params::FW_YR_P>) _param_fw_yr_p,
215 (ParamFloat<px4::params::TRIM_PITCH>) _param_trim_pitch,
216 (ParamFloat<px4::params::TRIM_ROLL>) _param_trim_roll,
217 (ParamFloat<px4::params::TRIM_YAW>) _param_trim_yaw
FixedwingAttitudeControl()
static int task_spawn(int argc, char *argv[])
void vehicle_rates_setpoint_poll()
vehicle_attitude_s _att
vehicle attitude setpoint
int print_status() override
void vehicle_status_poll()
uORB::Subscription _vehicle_status_sub
vehicle status subscription
uORB::Subscription _vehicle_rates_sub
Definition of geo / math functions to perform geodesic calculations.
orb_id_t _actuators_id
pointer to correct actuator controls0 uORB metadata structure
manual_control_setpoint_s _manual
r/c channel data
uORB::Subscription _battery_status_sub
battery status subscription
ECL_YawController _yaw_ctrl
Definition of a simple orthogonal roll PID controller.
float get_airspeed_and_update_scaling()
DEFINE_PARAMETERS((ParamFloat< px4::params::FW_ACRO_X_MAX >) _param_fw_acro_x_max,(ParamFloat< px4::params::FW_ACRO_Y_MAX >) _param_fw_acro_y_max,(ParamFloat< px4::params::FW_ACRO_Z_MAX >) _param_fw_acro_z_max,(ParamFloat< px4::params::FW_AIRSPD_MAX >) _param_fw_airspd_max,(ParamFloat< px4::params::FW_AIRSPD_MIN >) _param_fw_airspd_min,(ParamFloat< px4::params::FW_AIRSPD_TRIM >) _param_fw_airspd_trim,(ParamInt< px4::params::FW_ARSP_MODE >) _param_fw_arsp_mode,(ParamBool< px4::params::FW_BAT_SCALE_EN >) _param_fw_bat_scale_en,(ParamFloat< px4::params::FW_DTRIM_P_FLPS >) _param_fw_dtrim_p_flps,(ParamFloat< px4::params::FW_DTRIM_P_VMAX >) _param_fw_dtrim_p_vmax,(ParamFloat< px4::params::FW_DTRIM_P_VMIN >) _param_fw_dtrim_p_vmin,(ParamFloat< px4::params::FW_DTRIM_R_FLPS >) _param_fw_dtrim_r_flps,(ParamFloat< px4::params::FW_DTRIM_R_VMAX >) _param_fw_dtrim_r_vmax,(ParamFloat< px4::params::FW_DTRIM_R_VMIN >) _param_fw_dtrim_r_vmin,(ParamFloat< px4::params::FW_DTRIM_Y_VMAX >) _param_fw_dtrim_y_vmax,(ParamFloat< px4::params::FW_DTRIM_Y_VMIN >) _param_fw_dtrim_y_vmin,(ParamFloat< px4::params::FW_FLAPERON_SCL >) _param_fw_flaperon_scl,(ParamFloat< px4::params::FW_FLAPS_LND_SCL >) _param_fw_flaps_lnd_scl,(ParamFloat< px4::params::FW_FLAPS_SCL >) _param_fw_flaps_scl,(ParamFloat< px4::params::FW_FLAPS_TO_SCL >) _param_fw_flaps_to_scl,(ParamFloat< px4::params::FW_MAN_P_MAX >) _param_fw_man_p_max,(ParamFloat< px4::params::FW_MAN_P_SC >) _param_fw_man_p_sc,(ParamFloat< px4::params::FW_MAN_R_MAX >) _param_fw_man_r_max,(ParamFloat< px4::params::FW_MAN_R_SC >) _param_fw_man_r_sc,(ParamFloat< px4::params::FW_MAN_Y_SC >) _param_fw_man_y_sc,(ParamFloat< px4::params::FW_P_RMAX_NEG >) _param_fw_p_rmax_neg,(ParamFloat< px4::params::FW_P_RMAX_POS >) _param_fw_p_rmax_pos,(ParamFloat< px4::params::FW_P_TC >) _param_fw_p_tc,(ParamFloat< px4::params::FW_PR_FF >) _param_fw_pr_ff,(ParamFloat< px4::params::FW_PR_I >) _param_fw_pr_i,(ParamFloat< px4::params::FW_PR_IMAX >) _param_fw_pr_imax,(ParamFloat< px4::params::FW_PR_P >) _param_fw_pr_p,(ParamFloat< px4::params::FW_PSP_OFF >) _param_fw_psp_off,(ParamFloat< px4::params::FW_RATT_TH >) _param_fw_ratt_th,(ParamFloat< px4::params::FW_R_RMAX >) _param_fw_r_rmax,(ParamFloat< px4::params::FW_R_TC >) _param_fw_r_tc,(ParamFloat< px4::params::FW_RLL_TO_YAW_FF >) _param_fw_rll_to_yaw_ff,(ParamFloat< px4::params::FW_RR_FF >) _param_fw_rr_ff,(ParamFloat< px4::params::FW_RR_I >) _param_fw_rr_i,(ParamFloat< px4::params::FW_RR_IMAX >) _param_fw_rr_imax,(ParamFloat< px4::params::FW_RR_P >) _param_fw_rr_p,(ParamFloat< px4::params::FW_RSP_OFF >) _param_fw_rsp_off,(ParamBool< px4::params::FW_W_EN >) _param_fw_w_en,(ParamFloat< px4::params::FW_W_RMAX >) _param_fw_w_rmax,(ParamFloat< px4::params::FW_WR_FF >) _param_fw_wr_ff,(ParamFloat< px4::params::FW_WR_I >) _param_fw_wr_i,(ParamFloat< px4::params::FW_WR_IMAX >) _param_fw_wr_imax,(ParamFloat< px4::params::FW_WR_P >) _param_fw_wr_p,(ParamFloat< px4::params::FW_Y_RMAX >) _param_fw_y_rmax,(ParamFloat< px4::params::FW_YR_FF >) _param_fw_yr_ff,(ParamFloat< px4::params::FW_YR_I >) _param_fw_yr_i,(ParamFloat< px4::params::FW_YR_IMAX >) _param_fw_yr_imax,(ParamFloat< px4::params::FW_YR_P >) _param_fw_yr_p,(ParamFloat< px4::params::TRIM_PITCH >) _param_trim_pitch,(ParamFloat< px4::params::TRIM_ROLL >) _param_trim_roll,(ParamFloat< px4::params::TRIM_YAW >) _param_trim_yaw) ECL_RollController _roll_ctrl
actuator_controls_s _actuators
actuator control inputs
vehicle_control_mode_s _vcontrol_mode
vehicle control mode
perf_counter_t _loop_perf
loop performance counter
vehicle_attitude_setpoint_s _att_sp
vehicle attitude setpoint
void vehicle_control_mode_poll()
uORB::SubscriptionData< airspeed_validated_s > _airspeed_validated_sub
static int custom_command(int argc, char *argv[])
uORB::Subscription _vcontrol_mode_sub
vehicle status subscription
High-resolution timer with callouts and timekeeping.
Definition of a simple orthogonal pitch PID controller.
Global flash based parameter store.
ECL_PitchController _pitch_ctrl
Definition of a simple orthogonal coordinated turn yaw PID controller.
uORB::PublicationMulti< rate_ctrl_status_s > _rate_ctrl_status_pub
rate controller status publication
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
uORB::Subscription _rates_sp_sub
vehicle rates setpoint
uORB::Publication< actuator_controls_s > _actuators_2_pub
actuator control group 1 setpoint (Airframe)
orb_id_t _attitude_setpoint_id
void vehicle_manual_poll()
uORB::Subscription _global_pos_sub
global position subscription
orb_advert_t _attitude_sp_pub
attitude setpoint point
orb_advert_t _actuators_0_pub
actuator control group 0 setpoint
vehicle_status_s _vehicle_status
vehicle status
uORB::Publication< vehicle_rates_setpoint_s > _rate_sp_pub
rate setpoint publication
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
uORB::SubscriptionCallbackWorkItem _att_sub
vehicle attitude
void control_flaps(const float dt)
actuator_controls_s _actuators_airframe
actuator control inputs
Definition of a simple orthogonal coordinated turn yaw PID controller.
int parameters_update()
Update our local parameter cache.
vehicle_global_position_s _global_pos
global position
Quaternion< float > Quatf
~FixedwingAttitudeControl() override
uORB::Subscription _vehicle_land_detected_sub
vehicle land detected subscription
uORB::Subscription _att_sp_sub
vehicle attitude setpoint
uORB::Subscription _manual_sub
notification of manual control updates
vehicle_rates_setpoint_s _rates_sp
static int print_usage(const char *reason=nullptr)
uORB::Subscription _parameter_update_sub
notification of parameter updates
ECL_WheelController _wheel_ctrl
void vehicle_attitude_setpoint_poll()
bool _flag_control_attitude_enabled_last
void vehicle_land_detected_poll()
Performance measuring tools.