]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/ils.hxx
ignore resets for now because every z/Z key press would trigger a call to NOAA. We...
[flightgear.git] / src / Navaids / ils.hxx
index 8fd0a2fc26eb0fc821c018065b8198fb2004f6b8..95b37cf34528f4752c0a0cdb0f71c8af6e9aa14c 100644 (file)
 
 
 #include <simgear/compiler.h>
+#include <simgear/constants.h>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/misc/sgstream.hxx>
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
 
 
 #define FG_ILS_DEFAULT_RANGE 18
@@ -183,7 +180,9 @@ operator >> ( istream& in, FGILS& i )
     // generate cartesian coordinates
     Point3D geod, cart;
 
-    geod = Point3D( i.loclon * SGD_DEGREES_TO_RADIANS, i.loclat * SGD_DEGREES_TO_RADIANS, i.gselev );
+    geod = Point3D( i.loclon * SGD_DEGREES_TO_RADIANS,
+                    i.loclat * SGD_DEGREES_TO_RADIANS,
+                    i.gselev * SG_FEET_TO_METER );
     cart = sgGeodToCart( geod );
     i.x = cart.x();
     i.y = cart.y();
@@ -194,7 +193,9 @@ operator >> ( istream& in, FGILS& i )
     } else {
        i.has_gs = true;
 
-       geod = Point3D( i.gslon * SGD_DEGREES_TO_RADIANS, i.gslat * SGD_DEGREES_TO_RADIANS, i.gselev );
+       geod = Point3D( i.gslon * SGD_DEGREES_TO_RADIANS,
+                        i.gslat * SGD_DEGREES_TO_RADIANS,
+                        i.gselev * SG_FEET_TO_METER );
        cart = sgGeodToCart( geod );
        i.gs_x = cart.x();
        i.gs_y = cart.y();
@@ -207,7 +208,9 @@ operator >> ( istream& in, FGILS& i )
     } else {
        i.has_dme = true;
 
-       geod = Point3D( i.dmelon * SGD_DEGREES_TO_RADIANS, i.dmelat * SGD_DEGREES_TO_RADIANS, i.gselev);
+       geod = Point3D( i.dmelon * SGD_DEGREES_TO_RADIANS,
+                        i.dmelat * SGD_DEGREES_TO_RADIANS,
+                        i.gselev * SG_FEET_TO_METER );
        cart = sgGeodToCart( geod );
        i.dme_x = cart.x();
        i.dme_y = cart.y();