- update weather data
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6617 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 126fd6af9d47d0953e3f3675780d15fa4712aac5 Former-commit-id: a3244a8fd54d706a1fcfeed236d1cea545dd1c66
This commit is contained in:
parent
8fc6577673
commit
24c85c4df6
1 changed files with 33 additions and 7 deletions
|
@ -816,7 +816,10 @@ bool WebMetar::scanWeather()
|
|||
_rain = w.intensity;
|
||||
}
|
||||
else if (!strcmp(a->id, "SN"))
|
||||
{
|
||||
_snow = w.intensity;
|
||||
_rain = w.intensity;
|
||||
}
|
||||
}
|
||||
|
||||
if (!weather.length())
|
||||
|
@ -887,10 +890,7 @@ bool WebMetar::scanSkyCondition()
|
|||
return true;
|
||||
}
|
||||
|
||||
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
|
||||
if (!strncmp(m, "SKC", i = 3) // sky clear
|
||||
|| !strncmp(m, "CAVOK", i = 5)) // ceiling and visibility OK (implies 9999)
|
||||
{
|
||||
m += i;
|
||||
|
@ -915,12 +915,30 @@ bool WebMetar::scanSkyCondition()
|
|||
|
||||
if (!strncmp(m, "VV", i = 2)) // vertical visibility
|
||||
;
|
||||
else if (!strncmp(m, "CLR", i = 3))
|
||||
{
|
||||
cl._coverage = WebMetarCloud::COVERAGE_CIRRUS;
|
||||
_cloudnumber = _cloudnumber + 1;
|
||||
GfLogDebug("CLR / CIRRUS - cloudnumber = %i\n", _cloudnumber);
|
||||
}
|
||||
else if (!strncmp(m, "FEW", i = 3))
|
||||
{
|
||||
cl._coverage = WebMetarCloud::COVERAGE_FEW;
|
||||
_cloudnumber = _cloudnumber + 1;
|
||||
GfLogDebug("FEW - cloudnumber = %i\n", _cloudnumber);
|
||||
}
|
||||
else if (!strncmp(m, "NCD", i = 3))
|
||||
{
|
||||
cl._coverage = WebMetarCloud::COVERAGE_MANY;
|
||||
_cloudnumber = _cloudnumber + 1;
|
||||
GfLogDebug("NCD / MANY CLOUDS - cloudnumber = %i\n", _cloudnumber);
|
||||
}
|
||||
else if (!strncmp(m, "NSC", i = 3))
|
||||
{
|
||||
cl._coverage = WebMetarCloud::COVERAGE_CUMULUS;
|
||||
_cloudnumber = _cloudnumber + 1;
|
||||
GfLogDebug("NCD / MANY CLOUDS - cloudnumber = %i\n", _cloudnumber);
|
||||
}
|
||||
else if (!strncmp(m, "SCT", i = 3))
|
||||
{
|
||||
cl._coverage = WebMetarCloud::COVERAGE_SCATTERED;
|
||||
|
@ -950,7 +968,14 @@ bool WebMetar::scanSkyCondition()
|
|||
{
|
||||
_m = m;
|
||||
|
||||
return true; // ignore single OVC/BKN/...
|
||||
if (_cloudnumber > 0)
|
||||
{
|
||||
cl._altitude = 120 * 100 * 0.3048;
|
||||
i = -1;
|
||||
GfLogDebug("Cl.altitude = %.3f\n", cl._altitude);
|
||||
}
|
||||
else
|
||||
return true; // ignore single OVC/BKN/...
|
||||
}
|
||||
else if (!scanNumber(&m, &i, 3))
|
||||
i = -1;
|
||||
|
@ -971,7 +996,7 @@ bool WebMetar::scanSkyCondition()
|
|||
if (i != -1)
|
||||
cl._altitude = i * 100 * 0.3048;
|
||||
else
|
||||
cl._altitude = 3000;
|
||||
cl._altitude = 1500;
|
||||
|
||||
GfLogDebug("Alitude = %.3f i = %i\n", cl._altitude, i);
|
||||
|
||||
|
@ -988,7 +1013,8 @@ bool WebMetar::scanSkyCondition()
|
|||
m += 3;
|
||||
|
||||
if (!scanBoundary(&m))
|
||||
return false;
|
||||
if (_cloudnumber < 1)
|
||||
return false;
|
||||
|
||||
_clouds.push_back(cl);
|
||||
|
||||
|
|
Loading…
Reference in a new issue