Hi All,

Presently, the gs deflection retains it's final value when the nav 
frequency is changed to a station that has no glide slope or when the gs 
goes out of range.  I had been using the  select animation to overcome 
this, but that does not allow using a nasal filter to smoothly park the 
gs needle. The attached small patch overcomes this.  I wanted to have 
other ac developers comments before I ask James Turner to commit this 
small change.

Dave P.

? navradio.diff
Index: navradio.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Instrumentation/navradio.cxx,v
retrieving revision 1.57
diff -u -p -r1.57 navradio.cxx
--- navradio.cxx    24 Oct 2009 08:31:39 -0000    1.57
+++ navradio.cxx    10 Nov 2009 20:31:01 -0000
@@ -580,6 +580,8 @@ void FGNavRadio::updateGlideSlope(double
   if (!_gs || !inrange_node->getBoolValue()) {
     gs_dist_node->setDoubleValue( 0.0 );
     gs_inrange_node->setBoolValue(false);
+    _gsNeedleDeflection = 0.0;
+    _gsNeedleDeflectionNorm = 0.0;
     return;
   }
  
@@ -589,6 +591,8 @@ void FGNavRadio::updateGlideSlope(double
   gs_inrange_node->setBoolValue(gsInRange);
        
   if (!gsInRange) {
+    _gsNeedleDeflection = 0.0;
+    _gsNeedleDeflectionNorm = 0.0;
     return;
   }


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to