mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 19:29:06 +08:00
MC Att C: add param to use VTOL way for att generation or not
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
7bcd33b177
commit
36af12a1d4
@ -153,7 +153,8 @@ private:
|
||||
(ParamFloat<px4::params::MPC_MANTHR_MIN>) _param_mpc_manthr_min, /**< minimum throttle for stabilized */
|
||||
(ParamFloat<px4::params::MPC_THR_MAX>) _param_mpc_thr_max, /**< maximum throttle for stabilized */
|
||||
(ParamFloat<px4::params::MPC_THR_HOVER>) _param_mpc_thr_hover, /**< throttle at stationary hover */
|
||||
(ParamInt<px4::params::MPC_THR_CURVE>) _param_mpc_thr_curve /**< throttle curve behavior */
|
||||
(ParamInt<px4::params::MPC_THR_CURVE>) _param_mpc_thr_curve, /**< throttle curve behavior */
|
||||
(ParamInt<px4::params::MC_ATT_VTOL_WAY>) _param_mc_att_vtol_way
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ MulticopterAttitudeControl::generate_attitude_setpoint(const Quatf &q, float dt,
|
||||
attitude_setpoint.yaw_body = _man_yaw_sp + euler_sp(2);
|
||||
|
||||
/* modify roll/pitch only if we're a VTOL */
|
||||
if (_vtol) {
|
||||
if (_vtol && _param_mc_att_vtol_way.get()) {
|
||||
// Construct attitude setpoint rotation matrix. Modify the setpoints for roll
|
||||
// and pitch such that they reflect the user's intention even if a large yaw error
|
||||
// (yaw_sp - yaw) is present. In the presence of a yaw error constructing a rotation matrix
|
||||
|
||||
@ -158,3 +158,11 @@ PARAM_DEFINE_FLOAT(MC_YAWRATE_MAX, 200.0f);
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MC_MAN_TILT_TAU, 0.0f);
|
||||
|
||||
/**
|
||||
* Generate manual attitude sp VTOL way
|
||||
*
|
||||
* @boolean
|
||||
* @group Multicopter Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(MC_ATT_VTOL_WAY, 1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user