|
|
|
@ -66,7 +66,7 @@ void Tracker::update_bearing_and_distance()
@@ -66,7 +66,7 @@ void Tracker::update_bearing_and_distance()
|
|
|
|
|
// calculate pitch to vehicle
|
|
|
|
|
// To-Do: remove need for check of control_mode
|
|
|
|
|
if (control_mode != SCAN && !nav_status.manual_control_pitch) { |
|
|
|
|
if (g.alt_source == 0) { |
|
|
|
|
if (g.alt_source == ALT_SOURCE_BARO) { |
|
|
|
|
nav_status.pitch = degrees(atan2f(nav_status.alt_difference_baro, nav_status.distance)); |
|
|
|
|
} else { |
|
|
|
|
nav_status.pitch = degrees(atan2f(nav_status.alt_difference_gps, nav_status.distance)); |
|
|
|
|