VTOL: remove pusher reverse feature

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-03-06 14:00:02 +01:00
parent c09bf66639
commit 4be74befd2
7 changed files with 2 additions and 55 deletions
-11
View File
@@ -76,7 +76,6 @@ void Standard::update_vtol_state()
// Failsafe event, engage mc motors immediately
_vtol_mode = vtol_mode::MC_MODE;
_pusher_throttle = 0.0f;
_reverse_output = 0.0f;
} else if (!_attc->is_fixed_wing_requested()) {
@@ -85,20 +84,17 @@ void Standard::update_vtol_state()
// in mc mode
_vtol_mode = vtol_mode::MC_MODE;
mc_weight = 1.0f;
_reverse_output = 0.0f;
} else if (_vtol_mode == vtol_mode::FW_MODE) {
// Regular backtransition
resetTransitionStates();
_vtol_mode = vtol_mode::TRANSITION_TO_MC;
_reverse_output = _param_vt_b_rev_out.get();
} else if (_vtol_mode == vtol_mode::TRANSITION_TO_FW) {
// failsafe back to mc mode
_vtol_mode = vtol_mode::MC_MODE;
mc_weight = 1.0f;
_pusher_throttle = 0.0f;
_reverse_output = 0.0f;
} else if (_vtol_mode == vtol_mode::TRANSITION_TO_MC) {
// speed exit condition: use ground if valid, otherwise airspeed
@@ -250,12 +246,6 @@ void Standard::update_transition_state()
_pusher_throttle = 0.0f;
if (_time_since_trans_start >= _param_vt_b_rev_del.get()) {
// Handle throttle reversal for active breaking
_pusher_throttle = math::constrain((_time_since_trans_start - _param_vt_b_rev_del.get())
* _param_vt_psher_slew.get(), 0.0f, _param_vt_b_trans_thr.get());
}
// continually increase mc attitude control as we transition back to mc mode
if (_param_vt_b_trans_ramp.get() > FLT_EPSILON) {
mc_weight = _time_since_trans_start / _param_vt_b_trans_ramp.get();
@@ -335,7 +325,6 @@ void Standard::fill_actuator_outputs()
fw_out[actuator_controls_s::INDEX_THROTTLE] = _pusher_throttle;
fw_out[actuator_controls_s::INDEX_FLAPS] = _flaps_setpoint_with_slewrate.getState();
fw_out[actuator_controls_s::INDEX_SPOILERS] = _spoiler_setpoint_with_slewrate.getState();
fw_out[actuator_controls_s::INDEX_AIRBRAKES] = _reverse_output;
break;
+1 -4
View File
@@ -75,7 +75,6 @@ private:
vtol_mode _vtol_mode{vtol_mode::MC_MODE}; /**< vtol flight mode, defined by enum vtol_mode */
float _pusher_throttle{0.0f};
float _reverse_output{0.0f};
float _airspeed_trans_blend_margin{0.0f};
void parameters_update() override;
@@ -83,9 +82,7 @@ private:
DEFINE_PARAMETERS_CUSTOM_PARENT(VtolType,
(ParamFloat<px4::params::VT_PSHER_SLEW>) _param_vt_psher_slew,
(ParamFloat<px4::params::VT_B_TRANS_RAMP>) _param_vt_b_trans_ramp,
(ParamFloat<px4::params::FW_PSP_OFF>) _param_fw_psp_off,
(ParamFloat<px4::params::VT_B_REV_OUT>) _param_vt_b_rev_out,
(ParamFloat<px4::params::VT_B_REV_DEL>) _param_vt_b_rev_del
(ParamFloat<px4::params::FW_PSP_OFF>) _param_fw_psp_off
)
};
#endif
@@ -87,32 +87,6 @@ PARAM_DEFINE_FLOAT(VT_FWD_THRUST_SC, 0.7f);
*/
PARAM_DEFINE_FLOAT(VT_B_TRANS_RAMP, 3.0f);
/**
* Reverse thrust output during back transition
*
* @min 0
* @max 1
* @increment 0.01
* @decimal 2
* @group VTOL Attitude Control
*/
PARAM_DEFINE_FLOAT(VT_B_REV_OUT, 0.0f);
/**
* Delay in seconds before applying back transition throttle
*
* Set this to a value greater than 0 to give the motor time to spin down.
*
* @unit s
* @min 0
* @max 10
* @increment 1
* @decimal 2
* @group VTOL Attitude Control
*/
PARAM_DEFINE_FLOAT(VT_B_REV_DEL, 0.0f);
/**
* Pusher throttle ramp up slew rate
*