]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/util.cxx
Added options to set up avionics from the command line:
[flightgear.git] / src / Main / util.cxx
index 4e952685b5033e925902793a666bb3df6d16fd13..c6ab0aa5c04a63163c6df123071a2834ce9cbb9d 100644 (file)
 // $Id$
 
 
+#include <simgear/compiler.h>
+
 #include <math.h>
 
+#include <vector>
+SG_USING_STD(vector);
+
 #include <simgear/debug/logstream.hxx>
 
 #include "fg_io.hxx"
 #endif
 
 
+void
+fgDefaultWeatherValue (const char * propname, double value)
+{
+    int i;
+
+    SGPropertyNode * branch = fgGetNode("/environment/config/boundary", true);
+    vector<SGPropertyNode_ptr> entries = branch->getChildren("entry");
+    for (i = 0; i < entries.size(); i++)
+        entries[i]->setDoubleValue(propname, value);
+
+    branch = fgGetNode("/environment/config/aloft", true);
+    entries = branch->getChildren("entry");
+    for (i = 0; i < entries.size(); i++)
+        entries[i]->setDoubleValue(propname, value);
+}
+
+
 void
 fgExit (int status)
 {