adding user parameters, simplifying dynamic gps filter, adding yaw smoothing

This commit is contained in:
Jimmy Johnson
2016-05-16 15:12:50 -07:00
parent bb79d14cb1
commit 59296e0a49
4 changed files with 88 additions and 57 deletions
@@ -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;
}