#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>
-#elif defined( FG_HAVE_NATIVE_SGI_COMPILERS )
+#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
# include <iostream.h>
#elif defined( __BORLANDC__ )
# include <iostream>
# include <istream.h>
#endif
-#if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
-FG_USING_STD(istream);
+#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
+SG_USING_STD(istream);
#endif
// 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();
i.z = cart.z();
- if ( i.gslon < FG_EPSILON && i.gslat < FG_EPSILON ) {
+ if ( i.gslon < SG_EPSILON && i.gslat < SG_EPSILON ) {
i.has_gs = false;
} 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();
// cout << "gs = " << cart << endl;
}
- if ( i.dmelon < FG_EPSILON && i.dmelat < FG_EPSILON ) {
+ if ( i.dmelon < SG_EPSILON && i.dmelat < SG_EPSILON ) {
i.has_dme = false;
} 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();