diff --git a/src/Airports/GenAirports/build.cxx b/src/Airports/GenAirports/build.cxx
index e6c79fcf..ec20b2c7 100644
--- a/src/Airports/GenAirports/build.cxx
+++ b/src/Airports/GenAirports/build.cxx
@@ -113,7 +113,7 @@ static FGPolygon rwy_section_tex_coords( const FGPolygon& in_poly,
 	    while ( course < -360 ) { course += 360; }
 	    while ( course > 360 ) { course -= 360; }
 	    // cout << "Dist = " << dist << endl;
-	    // cout << "  Course = " << course * 180.0 / FG_PI << endl;
+	    // cout << "  Course = " << course * 180.0 / SG_PI << endl;
 
 	    //
 	    // 3. Convert from polar to cartesian coordinates
@@ -515,10 +515,10 @@ static void gen_runway_section( const FGRunway& rwy_info,
     Point3D a3 = runway.get_pt(0, 3);
 
     if ( startl_pct > 0.0 ) {
-	startl_pct -= nudge * FG_EPSILON;
+	startl_pct -= nudge * SG_EPSILON;
     }
     if ( endl_pct < 1.0 ) {
-	endl_pct += nudge * FG_EPSILON;
+	endl_pct += nudge * SG_EPSILON;
     }
 
     if ( endl_pct > 1.0 ) {
@@ -532,10 +532,10 @@ static void gen_runway_section( const FGRunway& rwy_info,
     // with polygon slivers.
     if ( startw_pct > 0.0 || endw_pct < 1.0 ) {
 	if ( startw_pct > 0.0 ) {
-	    startw_pct -= nudge * FG_EPSILON;
+	    startw_pct -= nudge * SG_EPSILON;
 	}
 	if ( endw_pct < 1.0 ) {
-	    endw_pct += nudge * FG_EPSILON;
+	    endw_pct += nudge * SG_EPSILON;
 	}
     }
 
diff --git a/src/Airports/GenAirports/convex_hull.cxx b/src/Airports/GenAirports/convex_hull.cxx
index 39cca5dc..661069bb 100644
--- a/src/Airports/GenAirports/convex_hull.cxx
+++ b/src/Airports/GenAirports/convex_hull.cxx
@@ -93,7 +93,7 @@ bool test_point(Point3D Pa, Point3D Pb, Point3D Pc) {
 
     // printf("a1 = %.2f  a2 = %.2f\n", a1 * RAD_TO_DEG, a2 * RAD_TO_DEG);
 
-    return ( (a1 + a2) < FG_PI );
+    return ( (a1 + a2) < SG_PI );
 }
 
 
diff --git a/src/Airports/GenAirports/runway.cxx b/src/Airports/GenAirports/runway.cxx
index f10c95b4..a26fabb5 100644
--- a/src/Airports/GenAirports/runway.cxx
+++ b/src/Airports/GenAirports/runway.cxx
@@ -83,8 +83,8 @@ FGPolygon gen_area(Point3D origin, double angle, const FGPolygon& cart_list) {
     for ( i = 0; i < rad_list.contour_size( 0 ); ++i) {
 	p = rad_list.get_pt( 0, i );
 	double theta = p.y() + angle;
-        while ( theta < FG_2PI ) {
-            theta += FG_2PI;
+        while ( theta < SG_2PI ) {
+            theta += SG_2PI;
 	}
 	p.sety( theta );
 	rad_list.set_pt( 0, i, p );
diff --git a/src/BuildTiles/Clipper/clipper.cxx b/src/BuildTiles/Clipper/clipper.cxx
index f3e049da..4c934ae3 100644
--- a/src/BuildTiles/Clipper/clipper.cxx
+++ b/src/BuildTiles/Clipper/clipper.cxx
@@ -119,8 +119,8 @@ bool FGClipper::load_polys(const string& path) {
 	    in >> lastx;
 	    in >> lasty;
 
-	    if ( (fabs(startx - lastx) < FG_EPSILON) 
-		 && (fabs(starty - lasty) < FG_EPSILON) ) {
+	    if ( (fabs(startx - lastx) < SG_EPSILON) 
+		 && (fabs(starty - lasty) < SG_EPSILON) ) {
 		// last point same as first, discard
 	    } else {
 		p = Point3D( lastx, lasty, 0.0 );
@@ -185,7 +185,7 @@ void FGClipper::move_slivers( FGPolygon& in, FGPolygon& out ) {
 	/* cout << "  min_angle (rad) = " 
 	     << min_angle << endl;
 	cout << "  min_angle (deg) = " 
-	     << min_angle * 180.0 / FG_PI << endl;
+	     << min_angle * 180.0 / SG_PI << endl;
 	cout << "  area = " << area << endl; */
 
 	if ( ((min_angle < angle_cutoff) && (area < area_cutoff)) ||
diff --git a/src/BuildTiles/GenOutput/genobj.cxx b/src/BuildTiles/GenOutput/genobj.cxx
index 584b174c..729e5802 100644
--- a/src/BuildTiles/GenOutput/genobj.cxx
+++ b/src/BuildTiles/GenOutput/genobj.cxx
@@ -83,7 +83,7 @@ int_list FGGenOutput::calc_tex_coords( FGConstruct& c, point_list geod_nodes,
     double clat_rad = clat * DEG_TO_RAD;
     double cos_lat = cos( clat_rad );
     double local_radius = cos_lat * EQUATORIAL_RADIUS_M;
-    double local_perimeter = 2.0 * local_radius * FG_PI;
+    double local_perimeter = 2.0 * local_radius * SG_PI;
     double degree_width = local_perimeter / 360.0;
 
     // cout << "clat = " << clat << endl;
@@ -93,7 +93,7 @@ int_list FGGenOutput::calc_tex_coords( FGConstruct& c, point_list geod_nodes,
     // cout << "local_perimeter = " << local_perimeter << endl;
     // cout << "degree_width = " << degree_width << endl;
 
-    double perimeter = 2.0 * EQUATORIAL_RADIUS_M * FG_PI;
+    double perimeter = 2.0 * EQUATORIAL_RADIUS_M * SG_PI;
     double degree_height = perimeter / 360.0;
     // cout << "degree_height = " << degree_height << endl;
 
@@ -138,10 +138,10 @@ int_list FGGenOutput::calc_tex_coords( FGConstruct& c, point_list geod_nodes,
 	t.setx( p.x() * ( degree_width / FG_STANDARD_TEXTURE_DIMENSION ) );
 	t.sety( p.y() * ( degree_height / FG_STANDARD_TEXTURE_DIMENSION ) );
 	shifted_t = t - min;
-	if ( shifted_t.x() < FG_EPSILON ) {
+	if ( shifted_t.x() < SG_EPSILON ) {
 	    shifted_t.setx( 0.0 );
 	}
-	if ( shifted_t.y() < FG_EPSILON ) {
+	if ( shifted_t.y() < SG_EPSILON ) {
 	    shifted_t.sety( 0.0 );
 	}
 	shifted_t.setz( 0.0 );
diff --git a/src/BuildTiles/Main/main.cxx b/src/BuildTiles/Main/main.cxx
index 9ce9e78c..47ec361d 100644
--- a/src/BuildTiles/Main/main.cxx
+++ b/src/BuildTiles/Main/main.cxx
@@ -650,16 +650,16 @@ static Point3D calc_normal( FGConstruct& c, int i ) {
     // cout << "  " << p1 << endl;
     // cout << "  " << p2 << endl;
     // cout << "  " << p3 << endl;
-    if ( fabs(p1.x() - p2.x()) < FG_EPSILON &&
-	 fabs(p1.x() - p3.x()) < FG_EPSILON ) {
+    if ( fabs(p1.x() - p2.x()) < SG_EPSILON &&
+	 fabs(p1.x() - p3.x()) < SG_EPSILON ) {
 	degenerate = true;
     }
-    if ( fabs(p1.y() - p2.y()) < FG_EPSILON &&
-	 fabs(p1.y() - p3.y()) < FG_EPSILON ) {
+    if ( fabs(p1.y() - p2.y()) < SG_EPSILON &&
+	 fabs(p1.y() - p3.y()) < SG_EPSILON ) {
 	degenerate = true;
     }
-    if ( fabs(p1.z() - p2.z()) < FG_EPSILON &&
-	 fabs(p1.z() - p3.z()) < FG_EPSILON ) {
+    if ( fabs(p1.z() - p2.z()) < SG_EPSILON &&
+	 fabs(p1.z() - p3.z()) < SG_EPSILON ) {
 	degenerate = true;
     }
 
diff --git a/src/BuildTiles/Match/match.cxx b/src/BuildTiles/Match/match.cxx
index ff67e15c..bc51cfd4 100644
--- a/src/BuildTiles/Match/match.cxx
+++ b/src/BuildTiles/Match/match.cxx
@@ -331,46 +331,46 @@ void FGMatch::split_tile( FGConstruct& c ) {
 	Point3D node = nodes[i];
 	Point3D normal = point_normals[i];
 
-	if ( (fabs(node.y() - min.y) < FG_EPSILON) && 
-	     (fabs(node.x() - min.x) < FG_EPSILON) ) {
+	if ( (fabs(node.y() - min.y) < SG_EPSILON) && 
+	     (fabs(node.x() - min.x) < SG_EPSILON) ) {
 	    if ( ! sw_flag ) {
 		sw_node = node;
 		sw_normal = normal;
 	    }
-	} else if ( (fabs(node.y() - min.y) < FG_EPSILON) &&
-		    (fabs(node.x() - max.x) < FG_EPSILON) ) {
+	} else if ( (fabs(node.y() - min.y) < SG_EPSILON) &&
+		    (fabs(node.x() - max.x) < SG_EPSILON) ) {
 	    if ( ! se_flag ) {
 		se_node = node;
 		se_normal = normal;
 	    }
-	} else if ( (fabs(node.y() - max.y) < FG_EPSILON) &&
-		    (fabs(node.x() - max.x) < FG_EPSILON)) {
+	} else if ( (fabs(node.y() - max.y) < SG_EPSILON) &&
+		    (fabs(node.x() - max.x) < SG_EPSILON)) {
 	    if ( ! ne_flag ) {
 		ne_node = node;
 		ne_normal = normal;
 	    }
-	} else if ( (fabs(node.y() - max.y) < FG_EPSILON) &&
-		    (fabs(node.x() - min.x) < FG_EPSILON) ) {
+	} else if ( (fabs(node.y() - max.y) < SG_EPSILON) &&
+		    (fabs(node.x() - min.x) < SG_EPSILON) ) {
 	    if ( ! nw_flag ) {
 		nw_node = node;
 		nw_normal = normal;
 	    }
-	} else if ( fabs(node.x() - min.x) < FG_EPSILON ) {
+	} else if ( fabs(node.x() - min.x) < SG_EPSILON ) {
 	    if ( ! west_flag ) {
 		west_nodes.push_back( node );
 		west_normals.push_back( normal );
 	    }
-	} else if ( fabs(node.x() - max.x) < FG_EPSILON ) {
+	} else if ( fabs(node.x() - max.x) < SG_EPSILON ) {
 	    if ( ! east_flag ) {
 		east_nodes.push_back( node );
 		east_normals.push_back( normal );
 	    }
-	} else if ( fabs(node.y() - min.y) < FG_EPSILON ) {
+	} else if ( fabs(node.y() - min.y) < SG_EPSILON ) {
 	    if ( ! south_flag ) {
 		south_nodes.push_back( node );
 		south_normals.push_back( normal );
 	    }
-	} else if ( fabs(node.y() - max.y) < FG_EPSILON ) {
+	} else if ( fabs(node.y() - max.y) < SG_EPSILON ) {
 	    if ( ! north_flag ) {
 		north_nodes.push_back( node );
 		north_normals.push_back( normal );
@@ -395,20 +395,20 @@ void FGMatch::split_tile( FGConstruct& c ) {
 	p1 = nodes[ seg.get_n1() ];
 	p2 = nodes[ seg.get_n2() ];
 
-	if ( fabs(p1.y() - p2.y()) < FG_EPSILON ) {
+	if ( fabs(p1.y() - p2.y()) < SG_EPSILON ) {
 	    // check if horizontal
-	    if ( fabs(p1.y() - max.y) < FG_EPSILON ) {
+	    if ( fabs(p1.y() - max.y) < SG_EPSILON ) {
 		north_segs.push_back( seg );
-	    } else if ( fabs(p1.y() - min.y) < FG_EPSILON ) {
+	    } else if ( fabs(p1.y() - min.y) < SG_EPSILON ) {
 		south_segs.push_back( seg );
 	    } else {
 		body_segs.push_back( seg );
 	    }
-	} else if ( fabs(p1.x() - p2.x()) < FG_EPSILON ) {
+	} else if ( fabs(p1.x() - p2.x()) < SG_EPSILON ) {
 	    // check if vertical
-	    if ( fabs(p1.x() - max.x) < FG_EPSILON ) {
+	    if ( fabs(p1.x() - max.x) < SG_EPSILON ) {
 		east_segs.push_back( seg );
-	    } else if ( fabs(p1.x() - min.x) < FG_EPSILON ) {
+	    } else if ( fabs(p1.x() - min.x) < SG_EPSILON ) {
 		west_segs.push_back( seg );
 	    } else {
 		body_segs.push_back( seg );
diff --git a/src/Lib/Array/array.cxx b/src/Lib/Array/array.cxx
index 3fb8d880..53298899 100644
--- a/src/Lib/Array/array.cxx
+++ b/src/Lib/Array/array.cxx
@@ -416,7 +416,7 @@ double FGArray::interpolate_altitude( double lon, double lat ) const {
 	
 	// printf("  zA = %.2f  zB = %.2f\n", zA, zB);
 
-	if ( dx > FG_EPSILON ) {
+	if ( dx > SG_EPSILON ) {
 	    elev = dy * (zB - zA) / dx + zA;
 	} else {
 	    elev = zA;
@@ -448,7 +448,7 @@ double FGArray::interpolate_altitude( double lon, double lat ) const {
 	// printf("  zA = %.2f  zB = %.2f\n", zA, zB );
 	// printf("  xB - xA = %.2f\n", col_step * dy / row_step);
 
-	if ( dy > FG_EPSILON ) {
+	if ( dy > SG_EPSILON ) {
 	    elev = dx * (zB - zA) / dy    + zA;
 	} else {
 	    elev = zA;
diff --git a/src/Lib/DEM/dem.cxx b/src/Lib/DEM/dem.cxx
index fd8bb4aa..8f4d5b90 100644
--- a/src/Lib/DEM/dem.cxx
+++ b/src/Lib/DEM/dem.cxx
@@ -532,7 +532,7 @@ double FGDem::interpolate_altitude( double lon, double lat ) {
 	
 	// printf("  zA = %.2f  zB = %.2f\n", zA, zB);
 
-	if ( dx > FG_EPSILON ) {
+	if ( dx > SG_EPSILON ) {
 	    elev = dy * (zB - zA) / dx + zA;
 	} else {
 	    elev = zA;
@@ -564,7 +564,7 @@ double FGDem::interpolate_altitude( double lon, double lat ) {
 	// printf("  zA = %.2f  zB = %.2f\n", zA, zB );
 	// printf("  xB - xA = %.2f\n", col_step * dy / row_step);
 
-	if ( dy > FG_EPSILON ) {
+	if ( dy > SG_EPSILON ) {
 	    elev = dx * (zB - zA) / dy    + zA;
 	} else {
 	    elev = zA;
diff --git a/src/Lib/Geometry/poly_support.cxx b/src/Lib/Geometry/poly_support.cxx
index 16372dd8..e613687a 100644
--- a/src/Lib/Geometry/poly_support.cxx
+++ b/src/Lib/Geometry/poly_support.cxx
@@ -48,7 +48,7 @@ extern "C" {
 // Given a line segment specified by two endpoints p1 and p2, return
 // the slope of the line.
 static double slope( const Point3D& p0, const Point3D& p1 ) {
-    if ( fabs(p0.x() - p1.x()) > FG_EPSILON ) {
+    if ( fabs(p0.x() - p1.x()) > SG_EPSILON ) {
 	return (p0.y() - p1.y()) / (p0.x() - p1.x());
     } else {
 	// return 1.0e+999; // really big number
@@ -80,7 +80,7 @@ static bool intersects( Point3D p0, Point3D p1, double x, Point3D *result ) {
 
     double y;
 
-    if ( fabs(p0.x() - p1.x()) > FG_EPSILON ) {
+    if ( fabs(p0.x() - p1.x()) > SG_EPSILON ) {
 	y = p1.y() + (x - p1.x()) * (p0.y() - p1.y()) / (p0.x() - p1.x());
     } else {
 	return false;
@@ -994,8 +994,8 @@ FGPolygon remove_dups( const FGPolygon &poly ) {
 }
 
 
-// static const double tgAirportEpsilon = FG_EPSILON / 10.0;
-static const double tgAirportEpsilon = FG_EPSILON;
+// static const double tgAirportEpsilon = SG_EPSILON / 10.0;
+static const double tgAirportEpsilon = SG_EPSILON;
 
 
 // Find a point in the given node list that lies between start and
@@ -1041,8 +1041,8 @@ bool find_intermediate_node( const Point3D& start, const Point3D& end,
 	    // cout << i << endl;
 	    Point3D current = nodes[i];
 
-	    if ( (current.x() > (p_min.x() + FG_EPSILON)) 
-		 && (current.x() < (p_max.x() - FG_EPSILON)) ) {
+	    if ( (current.x() > (p_min.x() + SG_EPSILON)) 
+		 && (current.x() < (p_max.x() - SG_EPSILON)) ) {
 
 		// printf( "found a potential candidate %.7f %.7f %.7f\n",
 		//         current.x(), current.y(), current.z() );
@@ -1089,8 +1089,8 @@ bool find_intermediate_node( const Point3D& start, const Point3D& end,
 	for ( int i = 0; i < (int)nodes.size(); ++i ) {
 	    Point3D current = nodes[i];
 
-	    if ( (current.y() > (p_min.y() + FG_EPSILON)) 
-		 && (current.y() < (p_max.y() - FG_EPSILON)) ) {
+	    if ( (current.y() > (p_min.y() + SG_EPSILON)) 
+		 && (current.y() < (p_max.y() - SG_EPSILON)) ) {
 		
 		// printf( "found a potential candidate %.7f %.7f %.7f\n",
 		//         current.x(), current.y(), current.z() );
diff --git a/src/Lib/Geometry/trisegs.cxx b/src/Lib/Geometry/trisegs.cxx
index 79cefaee..6c3b67b3 100644
--- a/src/Lib/Geometry/trisegs.cxx
+++ b/src/Lib/Geometry/trisegs.cxx
@@ -123,8 +123,8 @@ void FGTriSegments::unique_divide_and_add( const point_list& nodes,
 	last = nodes.end();
 	counter = 0;
 	for ( ; current != last; ++current ) {
-	    if ( (current->x() > (p0.x() + FG_EPSILON)) 
-		 && (current->x() < (p1.x() - FG_EPSILON)) ) {
+	    if ( (current->x() > (p0.x() + SG_EPSILON)) 
+		 && (current->x() < (p1.x() - SG_EPSILON)) ) {
 
 		// if ( temp ) {
 		//   cout << counter << endl;
@@ -172,8 +172,8 @@ void FGTriSegments::unique_divide_and_add( const point_list& nodes,
 	last = nodes.end();
 	counter = 0;
 	for ( ; current != last; ++current ) {
-	    if ( (current->y() > (p0.y() + FG_EPSILON)) 
-		 && (current->y() < (p1.y() - FG_EPSILON)) ) {
+	    if ( (current->y() > (p0.y() + SG_EPSILON)) 
+		 && (current->y() < (p1.y() - SG_EPSILON)) ) {
 
 		x_err = fabs(current->x() - (m1 * current->y() + b1));
 
diff --git a/src/Lib/Polygon/polygon.cxx b/src/Lib/Polygon/polygon.cxx
index 8a2db32b..bf32dfde 100644
--- a/src/Lib/Polygon/polygon.cxx
+++ b/src/Lib/Polygon/polygon.cxx
@@ -108,7 +108,7 @@ double FGPolygon::minangle_contour( const int contour ) {
     int p1_index, p2_index, p3_index;
     point2d p1, p2, p3;
     double angle;
-    double min_angle = 2.0 * FG_PI;
+    double min_angle = 2.0 * SG_PI;
 
     for ( int i = 0; i < size; ++i ) {
 	p1_index = i - 1;
diff --git a/src/Prep/MergerClipper/merger.cxx b/src/Prep/MergerClipper/merger.cxx
index 0216c2f7..671ce6eb 100644
--- a/src/Prep/MergerClipper/merger.cxx
+++ b/src/Prep/MergerClipper/merger.cxx
@@ -110,8 +110,8 @@ bool FGMerger::load_polys(const string& path, FGPolyList& subject) {
       in >> lastx;
       in >> lasty;
       
-      if ( (fabs(startx - lastx) < FG_EPSILON) 
-	   && (fabs(starty - lasty) < FG_EPSILON) ) {
+      if ( (fabs(startx - lastx) < SG_EPSILON) 
+	   && (fabs(starty - lasty) < SG_EPSILON) ) {
 	// last point same as first, discard
       } else {
 	p = Point3D( lastx, lasty, 0.0 );