]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/ils.hxx
Sync with latest JSBSim CVS
[flightgear.git] / src / Navaids / ils.hxx
index 37fd9fd5b2f712379a4a476f765e1df60f816077..b97b2882e9a560199274c23b017b18909efc0d75 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <simgear/compiler.h>
 #include <simgear/math/sg_geodesy.hxx>
-#include <simgear/misc/fgstream.hxx>
+#include <simgear/misc/sgstream.hxx>
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
@@ -128,7 +128,12 @@ inline istream&
 operator >> ( istream& in, FGILS& i )
 {
     double f;
-    in >> i.ilstype >> i.ilstypename >> i.aptcode >> i.rwyno 
+    in >> i.ilstype;
+    
+    if ( i.ilstype == '[' )
+          return in;
+
+    in >> i.ilstypename >> i.aptcode >> i.rwyno 
        >> f >> i.locident >> i.locheading >> i.loclat >> i.loclon
        >> i.gselev >> i.gsangle >> i.gslat >> i.gslon
        >> i.dmelat >> i.dmelon
@@ -142,7 +147,7 @@ operator >> ( istream& in, FGILS& i )
     // generate cartesian coordinates
     Point3D geod, cart;
 
-    geod = Point3D( i.loclon * DEG_TO_RAD, i.loclat * DEG_TO_RAD, i.gselev );
+    geod = Point3D( i.loclon * SGD_DEGREES_TO_RADIANS, i.loclat * SGD_DEGREES_TO_RADIANS, i.gselev );
     cart = sgGeodToCart( geod );
     i.x = cart.x();
     i.y = cart.y();
@@ -153,7 +158,7 @@ operator >> ( istream& in, FGILS& i )
     } else {
        i.has_gs = true;
 
-       geod = Point3D( i.gslon * DEG_TO_RAD, i.gslat * DEG_TO_RAD, i.gselev );
+       geod = Point3D( i.gslon * SGD_DEGREES_TO_RADIANS, i.gslat * SGD_DEGREES_TO_RADIANS, i.gselev );
        cart = sgGeodToCart( geod );
        i.gs_x = cart.x();
        i.gs_y = cart.y();
@@ -166,7 +171,7 @@ operator >> ( istream& in, FGILS& i )
     } else {
        i.has_dme = true;
 
-       geod = Point3D( i.dmelon * DEG_TO_RAD, i.dmelat * DEG_TO_RAD, i.gselev);
+       geod = Point3D( i.dmelon * SGD_DEGREES_TO_RADIANS, i.dmelat * SGD_DEGREES_TO_RADIANS, i.gselev);
        cart = sgGeodToCart( geod );
        i.dme_x = cart.x();
        i.dme_y = cart.y();