]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/modelmgr.cxx
Improve transponder instrumentation: new version
[flightgear.git] / src / Model / modelmgr.cxx
index 142d7af4080d95b313853bdbb3c9757330f073e6..449c3bedc8ff0ce5598391ea68c186c8d60a90fb 100644 (file)
@@ -18,8 +18,6 @@
 #include <vector>
 #include <cstring>
 
-#include <osg/Math>
-
 #include <simgear/scene/model/placement.hxx>
 #include <simgear/scene/model/modellib.hxx>
 #include <simgear/structure/exception.hxx>
@@ -81,7 +79,7 @@ FGModelMgr::add_model (SGPropertyNode * node)
         << t.getFormattedMessage() << t.getOrigin());
     return;
   }
-  
+
   Instance * instance = new Instance;
   SGModelPlacement *model = new SGModelPlacement;
   instance->model = model;
@@ -150,7 +148,7 @@ namespace
 {
 double testNan(double val) throw (sg_range_exception)
 {
-    if (osg::isNaN(val))
+    if (SGMisc<double>::isNaN(val))
         throw sg_range_exception("value is nan");
     return val;
 }
@@ -161,6 +159,7 @@ struct UpdateFunctor : public std::unary_function<FGModelMgr::Instance*, void>
     {
         SGModelPlacement* model = instance->model;
         double lon, lat, elev, roll, pitch, heading;
+        lon = lat = elev = roll = pitch = heading = 0.0;
 
         try {
             // Optionally set position from properties