]> git.mxchange.org Git - flightgear.git/commitdiff
Add runway ILS frequency to Nasal airportinfo() query, as discussed on the list.
authorjmt <jmt>
Sat, 19 Dec 2009 18:12:00 +0000 (18:12 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 20 Dec 2009 07:44:47 +0000 (08:44 +0100)
src/Scripting/NasalSys.cxx

index 502a406b2e6f88fed49e6bf310c7c7d2b459212f..c10c4d05860aa159b5a605f5c9abed8fb981da1f 100644 (file)
@@ -32,6 +32,7 @@
 #include <Main/fg_props.hxx>
 #include <Main/util.hxx>
 #include <Scenery/scenery.hxx>
+#include <Navaids/navrecord.hxx>
 
 #include "NasalSys.hxx"
 
@@ -593,6 +594,11 @@ static naRef f_airportinfo(naContext c, naRef me, int argc, naRef* args)
         HASHSET("width", 5, naNum(rwy->widthM()));
         HASHSET("threshold", 9, naNum(rwy->displacedThresholdM()));
         HASHSET("stopway", 7, naNum(rwy->stopwayM()));
+        
+        if (rwy->ILS()) {
+          HASHSET("ils-frequency-mhz", 3, naNum(rwy->ILS()->get_freq() / 100.0));
+        }
+        
 #undef HASHSET
         naHash_set(rwys, rwyid, rwydata);
     }