mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
vmount: compute gimbal yaw setpoint relative to vehicle yaw
This commit is contained in:
committed by
Lorenz Meier
parent
d8164377a8
commit
0fd043af01
@@ -187,7 +187,8 @@ void OutputBase::_handle_position_update(bool force_update)
|
|||||||
}
|
}
|
||||||
|
|
||||||
float roll = _cur_control_data->type_data.lonlat.roll_angle;
|
float roll = _cur_control_data->type_data.lonlat.roll_angle;
|
||||||
float yaw = get_bearing_to_next_waypoint(vehicle_global_position.lat, vehicle_global_position.lon, lat, lon);
|
float yaw = get_bearing_to_next_waypoint(vehicle_global_position.lat, vehicle_global_position.lon, lat, lon)
|
||||||
|
- vehicle_global_position.yaw;
|
||||||
|
|
||||||
_angle_setpoints[0] = roll;
|
_angle_setpoints[0] = roll;
|
||||||
_angle_setpoints[1] = pitch;
|
_angle_setpoints[1] = pitch;
|
||||||
|
|||||||
Reference in New Issue
Block a user