]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/calc_loc.cxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / Airports / calc_loc.cxx
index 2d8bd68011622bf9839fb506167b76185251f489..dd45e41c3820aa5e8205c61886e4ed3c7b584e10 100644 (file)
@@ -1,21 +1,23 @@
 // Calculate ILS heading
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <simgear/compiler.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <iostream>
-#include STL_STRING
-
-#include <plib/sg.h>
+#include <string>
 
 #include <simgear/math/sg_geodesy.hxx>
 
 
-SG_USING_STD(string);
-SG_USING_STD(cout);
-SG_USING_STD(endl);
+using std::string;
+using std::cout;
+using std::endl;
 
 int main( int argc, char **argv ) {
 
@@ -40,7 +42,7 @@ int main( int argc, char **argv ) {
     }
 
     // calculate runway threshold point
-    double thresh_lat, thresh_lon, return_az;
+    double thresh_lat = 0.0, thresh_lon = 0.0, return_az = 0.0;
     geo_direct_wgs_84 ( 0.0, rwy_lat, rwy_lon, rwy_hdg, 
                         rwy_len / 2.0, &thresh_lat, &thresh_lon, &return_az );
     cout << "Threshold = " << thresh_lat << "," << thresh_lon << endl;
@@ -52,7 +54,7 @@ int main( int argc, char **argv ) {
     cout << "Distance = " << dist_m << endl;
 
     // back project that distance along the runway center line
-    double nloc_lat, nloc_lon;
+    double nloc_lat = 0.0, nloc_lon = 0.0;
     geo_direct_wgs_84 ( 0.0, thresh_lat, thresh_lon, rwy_hdg + 180.0, 
                         dist_m, &nloc_lat, &nloc_lon, &return_az );
     printf("New localizer = %.6f %.6f\n", nloc_lat, nloc_lon );