]> git.mxchange.org Git - simgear.git/blobdiff - simgear/environment/metar.hxx
Add a function to calculate the normalmap from a regular texture.
[simgear.git] / simgear / environment / metar.hxx
index 275c7cbe40b363782a6c941e9499e35de88e1b25..f6e0b6b08deb39d536d66b6073182f420c8bb650 100644 (file)
@@ -147,8 +147,7 @@ protected:
 
 class SGMetar {
 public:
-       SGMetar(const char *m);
-       SGMetar(const string m) { SGMetar(m.c_str()); }
+       SGMetar(const string& m, const string& proxy = "", const string& port = "", const string &auth = "");
        ~SGMetar();
 
        enum ReportType {
@@ -170,12 +169,12 @@ public:
 
        inline int      getWindDir()            const { return _wind_dir; }
        inline double   getWindSpeed_mps()      const { return _wind_speed; }
-       inline double   getWindSpeed_kmh()      const { return _wind_speed == NaN ? NaN : _wind_speed * 3.6; }
+       inline double   getWindSpeed_kmh()      const { return _wind_speed == NaN ? NaN : _wind_speed * SG_MPS_TO_KMH; }
        inline double   getWindSpeed_kt()       const { return _wind_speed == NaN ? NaN : _wind_speed * SG_MPS_TO_KT; }
        inline double   getWindSpeed_mph()      const { return _wind_speed == NaN ? NaN : _wind_speed * SG_MPS_TO_MPH; }
 
        inline double   getGustSpeed_mps()      const { return _gust_speed; }
-       inline double   getGustSpeed_kmh()      const { return _gust_speed == NaN ? NaN : _gust_speed * 3.6; }
+       inline double   getGustSpeed_kmh()      const { return _gust_speed == NaN ? NaN : _gust_speed * SG_MPS_TO_KMH; }
        inline double   getGustSpeed_kt()       const { return _gust_speed == NaN ? NaN : _gust_speed * SG_MPS_TO_KT; }
        inline double   getGustSpeed_mph()      const { return _gust_speed == NaN ? NaN : _gust_speed * SG_MPS_TO_MPH; }
 
@@ -201,6 +200,7 @@ public:
        inline vector<string>& getWeather()             { return _weather; }
 
 protected:
+       string  _url;
        int     _grpcount;
        char    *_data;
        char    *_m;
@@ -253,7 +253,7 @@ protected:
        int     scanNumber(char **str, int *num, int min, int max = 0);
        bool    scanBoundary(char **str);
        const struct Token *scanToken(char **str, const struct Token *list);
-       char    *loadData(const char *id);
+       char    *loadData(const char *id, const string& proxy, const string& port, const string &auth);
        void    normalizeData();
 };