Skip to content

Commit

Permalink
Fixed-wing: remove roll offset param (FW_RSP_OFF)
Browse files Browse the repository at this point in the history
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
  • Loading branch information
sfuhrer committed Feb 12, 2021
1 parent 99c6b90 commit 43cba8e
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 24 deletions.
4 changes: 1 addition & 3 deletions src/modules/fw_att_control/FixedwingAttitudeControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ FixedwingAttitudeControl::vehicle_manual_poll()
if (_vcontrol_mode.flag_control_attitude_enabled) {
// STABILIZED mode generate the attitude setpoint from manual user inputs

_att_sp.roll_body = _manual_control_setpoint.y * radians(_param_fw_man_r_max.get()) + radians(_param_fw_rsp_off.get());
_att_sp.roll_body = constrain(_att_sp.roll_body,
-radians(_param_fw_man_r_max.get()), radians(_param_fw_man_r_max.get()));
_att_sp.roll_body = _manual_control_setpoint.y * radians(_param_fw_man_r_max.get());

_att_sp.pitch_body = -_manual_control_setpoint.x * radians(_param_fw_man_p_max.get())
+ radians(_param_fw_psp_off.get());
Expand Down
1 change: 0 additions & 1 deletion src/modules/fw_att_control/FixedwingAttitudeControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ class FixedwingAttitudeControl final : public ModuleBase<FixedwingAttitudeContro
(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,
Expand Down
16 changes: 0 additions & 16 deletions src/modules/fw_att_control/fw_att_control_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,22 +413,6 @@ PARAM_DEFINE_FLOAT(FW_YR_FF, 0.3f);
*/
PARAM_DEFINE_FLOAT(FW_WR_FF, 0.2f);

/**
* Roll setpoint offset
*
* An airframe specific offset of the roll setpoint in degrees, the value is
* added to the roll setpoint and should correspond to the typical cruise speed
* of the airframe.
*
* @unit deg
* @min -90.0
* @max 90.0
* @decimal 1
* @increment 0.5
* @group FW Attitude Control
*/
PARAM_DEFINE_FLOAT(FW_RSP_OFF, 0.0f);

/**
* Pitch setpoint offset (pitch at level flight)
*
Expand Down
3 changes: 0 additions & 3 deletions src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1715,9 +1715,6 @@ FixedwingPositionControl::Run()
if (control_position(_local_pos.timestamp, curr_pos, ground_speed, _pos_sp_triplet.previous, _pos_sp_triplet.current,
_pos_sp_triplet.next)) {

// add attitude roll setpoint offset (pitch is handled earlier)
_att_sp.roll_body += radians(_param_fw_rsp_off.get());

if (_control_mode.flag_control_manual_enabled) {
_att_sp.roll_body = constrain(_att_sp.roll_body, -radians(_param_fw_man_r_max.get()),
radians(_param_fw_man_r_max.get()));
Expand Down
1 change: 0 additions & 1 deletion src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ class FixedwingPositionControl final : public ModuleBase<FixedwingPositionContro
(ParamInt<px4::params::FW_ARSP_MODE>) _param_fw_arsp_mode,

(ParamFloat<px4::params::FW_PSP_OFF>) _param_fw_psp_off,
(ParamFloat<px4::params::FW_RSP_OFF>) _param_fw_rsp_off,
(ParamFloat<px4::params::FW_MAN_P_MAX>) _param_fw_man_p_max,
(ParamFloat<px4::params::FW_MAN_R_MAX>) _param_fw_man_r_max,

Expand Down

0 comments on commit 43cba8e

Please sign in to comment.