]> git.mxchange.org Git - flightgear.git/commitdiff
make the metar command line tool case insensitive
authorTorsten Dreyer <Torsten@t3r.de>
Thu, 26 Sep 2013 14:49:27 +0000 (16:49 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Thu, 26 Sep 2013 14:49:27 +0000 (16:49 +0200)
src/Main/metar_main.cxx

index 9158dc89a1ec891d2ec1112003f2c3f44fb76e4a..40883409ed609a5a29396f44d8dfd90fa61e20a1 100644 (file)
@@ -28,6 +28,8 @@
 #include <cstdlib>
 #include <cstdio>
 
+#include <boost/algorithm/string.hpp>
+
 #include <simgear/debug/logstream.hxx>
 #include <simgear/environment/metar.hxx>
 #include <simgear/structure/exception.hxx>
@@ -49,7 +51,7 @@ public:
     bool fromProxy;
     
     MetarRequest(const std::string& stationId) : 
-        HTTP::Request("http://weather.noaa.gov/pub/data/observations/metar/stations/" + stationId + ".TXT"),
+        HTTP::Request("http://weather.noaa.gov/pub/data/observations/metar/stations/" + boost::to_upper_copy(stationId) + ".TXT"),
         complete(false),
         failed(false)
     {