]> git.mxchange.org Git - flightgear.git/commitdiff
Dave Perry:
authorjmt <jmt>
Sat, 14 Nov 2009 11:10:34 +0000 (11:10 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 15 Nov 2009 00:31:42 +0000 (01:31 +0100)
Allows using a nasal filter to smoothly park the gs needle when out
of range or frequency changes to a station w/o gs.

src/Instrumentation/navradio.cxx

index 4dace88a02690f932570ebe11746600a7acc9da7..31eb2f461bce9e7a2447564861844d8221c55893 100644 (file)
@@ -575,6 +575,8 @@ void FGNavRadio::updateGlideSlope(double dt, const SGVec3d& aircraft, double sig
   if (!_gs || !inrange_node->getBoolValue()) {
     gs_dist_node->setDoubleValue( 0.0 );
     gs_inrange_node->setBoolValue(false);
+    _gsNeedleDeflection = 0.0;
+    _gsNeedleDeflectionNorm = 0.0;
     return;
   }
   
@@ -584,6 +586,8 @@ void FGNavRadio::updateGlideSlope(double dt, const SGVec3d& aircraft, double sig
   gs_inrange_node->setBoolValue(gsInRange);
         
   if (!gsInRange) {
+    _gsNeedleDeflection = 0.0;
+    _gsNeedleDeflectionNorm = 0.0;
     return;
   }