mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 17:33:33 +08:00
adding user parameters, simplifying dynamic gps filter, adding yaw smoothing
This commit is contained in:
@@ -1149,7 +1149,10 @@ void MulticopterPositionControl::control_auto(float dt)
|
||||
_pos_sp = pos_sp_s.edivide(scale);
|
||||
|
||||
/* update yaw setpoint if needed */
|
||||
if (PX4_ISFINITE(_pos_sp_triplet.current.yaw)) {
|
||||
|
||||
if (_pos_sp_triplet.current.yawspeed_valid && _pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_FOLLOW_TARGET) {
|
||||
_att_sp.yaw_body = _att_sp.yaw_body + _pos_sp_triplet.current.yawspeed * dt;
|
||||
} else if (PX4_ISFINITE(_pos_sp_triplet.current.yaw)) {
|
||||
_att_sp.yaw_body = _pos_sp_triplet.current.yaw;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user