|
|
|
@ -224,7 +224,7 @@ bool AP_Mount_Backend::calc_angle_to_location(const struct Location &target, Vec
@@ -224,7 +224,7 @@ bool AP_Mount_Backend::calc_angle_to_location(const struct Location &target, Vec
|
|
|
|
|
|
|
|
|
|
// pan calcs
|
|
|
|
|
if (calc_pan) { |
|
|
|
|
// calc absolute heading and then onvert to vehicle relative yaw
|
|
|
|
|
// calc absolute heading and then convert to vehicle relative yaw
|
|
|
|
|
angles_to_target_rad.z = atan2f(GPS_vector_x, GPS_vector_y); |
|
|
|
|
if (relative_pan) { |
|
|
|
|
angles_to_target_rad.z = wrap_PI(angles_to_target_rad.z - AP::ahrs().yaw); |
|
|
|
|