#include <Main/fg_props.hxx>
#include <Main/util.hxx>
#include <Scenery/scenery.hxx>
+#include <Navaids/navrecord.hxx>
#include "NasalSys.hxx"
// Return UNIX epoch time in seconds.
static naRef f_systime(naContext c, naRef me, int argc, naRef* args)
{
-#ifdef WIN32
+#ifdef _WIN32
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
double t = (4294967296.0 * ft.dwHighDateTime + ft.dwLowDateTime);
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", 17, naNum(rwy->ILS()->get_freq() / 100.0));
+ }
+
#undef HASHSET
naHash_set(rwys, rwyid, rwydata);
}
const char* src = n->getStringValue("script");
if(!n->hasChild("script")) src = 0; // Hrm...
if(src)
- createModule(module, n->getPath(), src, strlen(src));
+ createModule(module, n->getPath().c_str(), src, strlen(src));
if(!file_specified && !src)
SG_LOG(SG_NASAL, SG_ALERT, "Nasal error: " <<
{
const char* nasal = arg->getStringValue("script");
const char* moduleName = arg->getStringValue("module");
- naRef code = parse(arg->getPath(true), nasal, strlen(nasal));
+ naRef code = parse(arg->getPath(true).c_str(), nasal, strlen(nasal));
if(naIsNil(code)) return false;
// Commands can be run "in" a module. Make sure that module