From e2875babad0d6fef80dccad2fd0058d58e64041a Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 3 Jan 2005 00:16:16 +0000 Subject: [PATCH] Initialize the timer countdown value since this could conceivably start as any randomly large number (thus preventing the first station seach from happening at least for a very long time.) --- src/Instrumentation/marker_beacon.cxx | 3 ++- src/Instrumentation/navradio.cxx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Instrumentation/marker_beacon.cxx b/src/Instrumentation/marker_beacon.cxx index 175eac49b..9f7201d95 100644 --- a/src/Instrumentation/marker_beacon.cxx +++ b/src/Instrumentation/marker_beacon.cxx @@ -46,7 +46,8 @@ FGMarkerBeacon::FGMarkerBeacon(SGPropertyNode *node) : middle_blink(false), inner_blink(false), name("marker-beacon"), - num(0) + num(0), + _time_before_search_sec(0.0) { SGPath path( globals->get_fg_root() ); SGPath term = path; diff --git a/src/Instrumentation/navradio.cxx b/src/Instrumentation/navradio.cxx index cd94276ef..fe586b3e9 100644 --- a/src/Instrumentation/navradio.cxx +++ b/src/Instrumentation/navradio.cxx @@ -68,7 +68,8 @@ FGNavRadio::FGNavRadio(SGPropertyNode *node) : horiz_vel(0.0), last_x(0.0), name("nav"), - num(0) + num(0), + _time_before_search_sec(0.0) { SGPath path( globals->get_fg_root() ); SGPath term = path; @@ -364,6 +365,8 @@ FGNavRadio::update(double dt) { station = Point3D( nav_x, nav_y, nav_z ); nav_loc_dist = aircraft.distance3D( station ); + // cout << "station = " << station << " dist = " << nav_loc_dist + // << endl; if ( nav_has_gs ) { // find closest distance to the gs base line