]> git.mxchange.org Git - simgear.git/blobdiff - simgear/environment/metar.cxx
clouds: remove unused bump mapping flags.
[simgear.git] / simgear / environment / metar.cxx
index 949995b226e936f0887ababae4425ca1cda2ddb5..c15c4a7286074115f2598aee51703be58b2de24e 100644 (file)
@@ -596,7 +596,7 @@ bool SGMetar::scanRwyVisRange()
        r._max_visibility._distance = to;
 
        if (*m == '/')                                  // this is not in the spec!
-               *m++;
+               m++;
        if (*m == 'D')
                m++, r._min_visibility._tendency = SGMetarVisibility::DECREASING;
        else if (*m == 'N')
@@ -767,6 +767,7 @@ bool SGMetar::scanSkyCondition()
 
        if (!strncmp(m, "CLR", i = 3)                           // clear
                        || !strncmp(m, "SKC", i = 3)            // sky clear
+                       || !strncmp(m, "NCD", i = 3)            // nil cloud detected
                        || !strncmp(m, "NSC", i = 3)            // no significant clouds
                        || !strncmp(m, "CAVOK", i = 5)) {       // ceiling and visibility OK (implies 9999)
                m += i;
@@ -1212,6 +1213,22 @@ void SGMetarCloud::set(double alt, Coverage cov)
                _coverage = cov;
 }
 
+SGMetarCloud::Coverage SGMetarCloud::getCoverage( const std::string & coverage ) 
+{
+       if( coverage == "clear" ) return COVERAGE_CLEAR;
+       if( coverage == "few" ) return COVERAGE_FEW;
+       if( coverage == "scattered" ) return COVERAGE_SCATTERED;
+       if( coverage == "broken" ) return COVERAGE_BROKEN;
+       if( coverage == "overcast" ) return COVERAGE_OVERCAST;
+       return COVERAGE_NIL;
+}
+
+const char * SGMetarCloud::COVERAGE_NIL_STRING = "nil";
+const char * SGMetarCloud::COVERAGE_CLEAR_STRING = "clear";
+const char * SGMetarCloud::COVERAGE_FEW_STRING = "few";
+const char * SGMetarCloud::COVERAGE_SCATTERED_STRING = "scattered";
+const char * SGMetarCloud::COVERAGE_BROKEN_STRING = "broken";
+const char * SGMetarCloud::COVERAGE_OVERCAST_STRING = "overcast";
 
 void SGMetarVisibility::set(double dist, int dir, int mod, int tend)
 {