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')
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;
_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)
{