From 85de2452a3a4e6ebc9d2dc32965b091f7eb328f4 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 7 Jul 2003 21:19:46 +0000 Subject: [PATCH] A couple fixes so the nav/ils heading hold will work again. --- src/Autopilot/newauto.cxx | 3 ++- src/Cockpit/navcom.cxx | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Autopilot/newauto.cxx b/src/Autopilot/newauto.cxx index b18b00423..610d7ded1 100644 --- a/src/Autopilot/newauto.cxx +++ b/src/Autopilot/newauto.cxx @@ -532,7 +532,8 @@ FGAutopilot::update (double dt) } // determine the target radial in "true" heading - double tgt_radial = current_radiostack->get_navcom1()->get_nav_radial(); + double tgt_radial + = current_radiostack->get_navcom1()->get_nav_target_radial(); if ( current_radiostack->get_navcom1()->get_nav_loc() ) { // ILS localizers radials are already "true" in our // database diff --git a/src/Cockpit/navcom.cxx b/src/Cockpit/navcom.cxx index c74dce0fb..541dc2213 100644 --- a/src/Cockpit/navcom.cxx +++ b/src/Cockpit/navcom.cxx @@ -738,7 +738,8 @@ double FGNavCom::get_nav_reciprocal_radial () const { double recip = nav_radial + 180; - if (recip >= 360) - recip = 360; + if ( recip >= 360 ) { + recip -= 360; + } return recip; } -- 2.39.5