mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Define precipitation rate default unit to mm/h
There was a misalignment in precipitation rate units across the code. GFS values are in kg m-2 s-1 which is equal to mm/s, but the default unit seems to be mm/h in many weather documents.
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f75a9ac476
commit
2616f94f2d
@@ -297,7 +297,10 @@ namespace BlackWxPlugin
|
||||
cloudLayer.setCoveragePercent(cloudLayerIt.value().totalCoverage);
|
||||
if (gfsGridPoint.surfaceSnow > 0.0) { cloudLayer.setPrecipitation(CCloudLayer::Snow); }
|
||||
if (gfsGridPoint.surfaceRain > 0.0) { cloudLayer.setPrecipitation(CCloudLayer::Rain); }
|
||||
cloudLayer.setPrecipitationRate(gfsGridPoint.surfacePrecipitationRate);
|
||||
|
||||
// Precipitation rate is in kg m-2 s-1, which is equal to mm/s
|
||||
// Multiply with 3600 to convert to mm/h
|
||||
cloudLayer.setPrecipitationRate(gfsGridPoint.surfacePrecipitationRate * 3600.0);
|
||||
cloudLayer.setClouds(CCloudLayer::CloudsUnknown);
|
||||
cloudLayers.insert(cloudLayer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user