]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/NasalSys.cxx
ITM radio calculations are only considered valid
[flightgear.git] / src / Scripting / NasalSys.cxx
index 7c4a387e67d41faf6adefddcb6c430fd85ddb4ec..777d1eedea4082c80ee51f4ad25f99f29d022c31 100644 (file)
@@ -33,7 +33,6 @@
 #include <Scenery/scenery.hxx>
 #include <Navaids/navlist.hxx>
 #include <Navaids/procedure.hxx>
-#include <Radio/radio.hxx>
 
 
 #include "NasalSys.hxx"
@@ -216,7 +215,7 @@ static naRef f_getprop(naContext c, naRef me, int argc, naRef* args)
         {
         double dv = p->getDoubleValue();
         if (osg::isNaN(dv)) {
-          SG_LOG(SG_GENERAL, SG_ALERT, "Nasal getprop: property " << p->getPath() << " is NaN");
+          SG_LOG(SG_NASAL, SG_ALERT, "Nasal getprop: property " << p->getPath() << " is NaN");
           return naNil();
         }
         
@@ -295,7 +294,7 @@ static naRef f_print(naContext c, naRef me, int argc, naRef* args)
         if(naIsNil(s)) continue;
         buf += naStr_data(s);
     }
-    SG_LOG(SG_GENERAL, SG_ALERT, buf);
+    SG_LOG(SG_NASAL, SG_ALERT, buf);
     return naNum(buf.length());
 }
 
@@ -501,27 +500,6 @@ static naRef f_carttogeod(naContext c, naRef me, int argc, naRef* args)
     return vec;
 }
 
-// Convert a cartesian point to a geodetic lat/lon/altitude.
-static naRef f_radioTransmission(naContext c, naRef me, int argc, naRef* args)
-{
-    double lat, lon, elev, heading, pitch;
-    if(argc != 5) naRuntimeError(c, "radioTransmission() expects 5 arguments");
-    for(int i=0; i<argc; i++) {
-        if(naIsNil(args[i]))
-               return naNil();
-    }
-    lat = naNumValue(args[0]).num;
-    lon = naNumValue(args[1]).num;
-    elev = naNumValue(args[2]).num;
-    heading = naNumValue(args[3]).num;
-    pitch = naNumValue(args[4]).num;
-    SGGeod geod = SGGeod::fromDegM(lon, lat, elev * SG_FEET_TO_METER);
-    FGRadioTransmission *radio = new FGRadioTransmission;
-    double signal = radio->receiveBeacon(geod, heading, pitch);
-    delete radio;
-    return naNum(signal);
-}
-
 // Convert a geodetic lat/lon/altitude to a cartesian point.
 static naRef f_geodtocart(naContext c, naRef me, int argc, naRef* args)
 {
@@ -827,7 +805,6 @@ static struct { const char* name; naCFunction func; } funcs[] = {
     { "geodinfo", f_geodinfo },
     { "airportinfo", f_airportinfo },
     { "navinfo", f_navinfo },
-    { "radioTransmission", f_radioTransmission },
     { 0, 0 }
 };