mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
VTOL: rename params _PTCH to _PITCH
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -146,6 +146,25 @@ bool param_modify_on_import(bson_node_t node)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2022-04-11: translate VT_PTCH_MIN to VT_PITCH_MIN
|
||||||
|
{
|
||||||
|
if (strcmp("VT_PTCH_MIN", node->name) == 0) {
|
||||||
|
strcpy(node->name, "VT_PITCH_MIN");
|
||||||
|
PX4_INFO("copying %s -> %s", "VT_PTCH_MIN", "VT_PITCH_MIN");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2022-04-11: translate VT_LND_PTCH_MIN to VT_LND_PITCH_MIN
|
||||||
|
{
|
||||||
|
if (strcmp("VT_LND_PTCH_MIN", node->name) == 0) {
|
||||||
|
strcpy(node->name, "VT_LND_PITCH_MIN");
|
||||||
|
PX4_INFO("copying %s -> %s", "VT_LND_PTCH_MIN", "VT_LND_PITCH_MIN");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 2021-10-21: translate NAV_GPSF_LT to FW_GPSF_LT and NAV_GPSF_R to FW_GPSF_R
|
// 2021-10-21: translate NAV_GPSF_LT to FW_GPSF_LT and NAV_GPSF_R to FW_GPSF_R
|
||||||
{
|
{
|
||||||
if (strcmp("NAV_GPSF_LT", node->name) == 0) {
|
if (strcmp("NAV_GPSF_LT", node->name) == 0) {
|
||||||
|
|||||||
@@ -359,12 +359,12 @@ PARAM_DEFINE_INT32(VT_MC_ON_FMU, 0);
|
|||||||
* @max 45.0
|
* @max 45.0
|
||||||
* @group VTOL Attitude Control
|
* @group VTOL Attitude Control
|
||||||
*/
|
*/
|
||||||
PARAM_DEFINE_FLOAT(VT_PTCH_MIN, -5.0f);
|
PARAM_DEFINE_FLOAT(VT_PITCH_MIN, -5.0f);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimum pitch angle during hover landing.
|
* Minimum pitch angle during hover landing.
|
||||||
*
|
*
|
||||||
* Overrides VT_PTCH_MIN when the vehicle is in LAND mode (hovering).
|
* Overrides VT_PITCH_MIN when the vehicle is in LAND mode (hovering).
|
||||||
* During landing it can be beneficial to allow lower minimum pitch angles as it can avoid the wings
|
* During landing it can be beneficial to allow lower minimum pitch angles as it can avoid the wings
|
||||||
* generating too much lift and preventing the vehicle from sinking at the desired rate.
|
* generating too much lift and preventing the vehicle from sinking at the desired rate.
|
||||||
*
|
*
|
||||||
@@ -372,7 +372,7 @@ PARAM_DEFINE_FLOAT(VT_PTCH_MIN, -5.0f);
|
|||||||
* @max 45.0
|
* @max 45.0
|
||||||
* @group VTOL Attitude Control
|
* @group VTOL Attitude Control
|
||||||
*/
|
*/
|
||||||
PARAM_DEFINE_FLOAT(VT_LND_PTCH_MIN, -5.0f);
|
PARAM_DEFINE_FLOAT(VT_LND_PITCH_MIN, -5.0f);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spoiler setting while landing (hover)
|
* Spoiler setting while landing (hover)
|
||||||
|
|||||||
@@ -633,12 +633,12 @@ float VtolType::pusher_assist()
|
|||||||
// normalized pusher support throttle (standard VTOL) or tilt (tiltrotor), initialize to 0
|
// normalized pusher support throttle (standard VTOL) or tilt (tiltrotor), initialize to 0
|
||||||
float forward_thrust = 0.0f;
|
float forward_thrust = 0.0f;
|
||||||
|
|
||||||
float pitch_setpoint_min = math::radians(_param_vt_ptch_min.get());
|
float pitch_setpoint_min = math::radians(_param_vt_pitch_min.get());
|
||||||
|
|
||||||
if (_attc->get_pos_sp_triplet()->current.valid
|
if (_attc->get_pos_sp_triplet()->current.valid
|
||||||
&& _attc->get_pos_sp_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND) {
|
&& _attc->get_pos_sp_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND) {
|
||||||
pitch_setpoint_min = math::radians(
|
pitch_setpoint_min = math::radians(
|
||||||
_param_vt_lnd_ptch_min.get()); // set min pitch during LAND (usually lower to generate less lift)
|
_param_vt_lnd_pitch_min.get()); // set min pitch during LAND (usually lower to generate less lift)
|
||||||
}
|
}
|
||||||
|
|
||||||
// only allow pitching down up to threshold, the rest of the desired
|
// only allow pitching down up to threshold, the rest of the desired
|
||||||
|
|||||||
@@ -297,12 +297,12 @@ protected:
|
|||||||
(ParamFloat<px4::params::VT_B_DEC_I>) _param_vt_b_dec_i,
|
(ParamFloat<px4::params::VT_B_DEC_I>) _param_vt_b_dec_i,
|
||||||
(ParamFloat<px4::params::VT_B_DEC_MSS>) _param_vt_b_dec_mss,
|
(ParamFloat<px4::params::VT_B_DEC_MSS>) _param_vt_b_dec_mss,
|
||||||
|
|
||||||
(ParamFloat<px4::params::VT_PTCH_MIN>) _param_vt_ptch_min,
|
(ParamFloat<px4::params::VT_PITCH_MIN>) _param_vt_pitch_min,
|
||||||
(ParamFloat<px4::params::VT_FWD_THRUST_SC>) _param_vt_fwd_thrust_sc,
|
(ParamFloat<px4::params::VT_FWD_THRUST_SC>) _param_vt_fwd_thrust_sc,
|
||||||
(ParamInt<px4::params::VT_FWD_THRUST_EN>) _param_vt_fwd_thrust_en,
|
(ParamInt<px4::params::VT_FWD_THRUST_EN>) _param_vt_fwd_thrust_en,
|
||||||
(ParamFloat<px4::params::MPC_LAND_ALT1>) _param_mpc_land_alt1,
|
(ParamFloat<px4::params::MPC_LAND_ALT1>) _param_mpc_land_alt1,
|
||||||
(ParamFloat<px4::params::MPC_LAND_ALT2>) _param_mpc_land_alt2,
|
(ParamFloat<px4::params::MPC_LAND_ALT2>) _param_mpc_land_alt2,
|
||||||
(ParamFloat<px4::params::VT_LND_PTCH_MIN>) _param_vt_lnd_ptch_min,
|
(ParamFloat<px4::params::VT_LND_PITCH_MIN>) _param_vt_lnd_pitch_min,
|
||||||
|
|
||||||
(ParamBool<px4::params::SYS_CTRL_ALLOC>) _param_sys_ctrl_alloc,
|
(ParamBool<px4::params::SYS_CTRL_ALLOC>) _param_sys_ctrl_alloc,
|
||||||
(ParamInt<px4::params::VT_IDLE_PWM_MC>) _param_vt_idle_pwm_mc,
|
(ParamInt<px4::params::VT_IDLE_PWM_MC>) _param_vt_idle_pwm_mc,
|
||||||
|
|||||||
Reference in New Issue
Block a user