]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/atis.cxx
Moved JSBSim.hxx to src/FDM/JSBSim/
[flightgear.git] / src / ATC / atis.cxx
index c8522f1a8bf73cac01df04b4d71e916e70d64da3..cb39c09c2caea5a4298141618a14f83a60fa1d7e 100644 (file)
@@ -39,11 +39,11 @@ SG_USING_STD(cout);
 //#include <simgear/misc/sgstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 
-//#ifndef FG_OLD_WEATHER
+//#ifndef FG_NEW_ENVIRONMENT
 //sorry, that works only with the new weather system
 #include <WeatherCM/FGLocalWeatherDatabase.h>
 //#else
-//#  include <Weather/weather.hxx>
+//#  include <Environment/environment.hxx>
 //#endif
 
 #include <Main/fg_props.hxx>
@@ -96,6 +96,7 @@ FGATIS::~FGATIS() {
 
 string FGATIS::get_transmission() {
 //void FGATIS::get_transmission() {
+#if !defined(FG_NEW_ENVIRONMENT)
 
     string transmission = "";
     double visibility;
@@ -143,7 +144,7 @@ string FGATIS::get_transmission() {
        sprintf(buf, "%i", int(stationweather.Temperature - 273.15));
        transmission += "  Temperature ";
        transmission += buf;
-       transmission += " degrees Celcius";
+       transmission += " degrees Celsius";
 
        // Get the pressure / altimeter
         // pressure is: stationweather.AirPressure in Pascal
@@ -197,7 +198,7 @@ string FGATIS::get_transmission() {
            transmission += buf2;
        }
 
-       string rwy_no = runways.search(ident, hdg);
+       string rwy_no = runways.search(ident, int(hdg));
        if(rwy_no != (string)"NN") {
            transmission += "  Landing and departing runway ";
            transmission += rwy_no;
@@ -218,4 +219,7 @@ string FGATIS::get_transmission() {
 //    }
 
     return(transmission);
+#else
+    return "Station unavailable (not supported by FG_NEW_ENVIRONMENT)";
+#endif // FG_NEW_ENVIRONMENT
 }