Cloud layers have a base and a top

refs #579
This commit is contained in:
Roland Winklmeier
2016-03-01 23:48:13 +01:00
parent fe9c8ca3de
commit 48fdfbea3e
9 changed files with 46 additions and 41 deletions

View File

@@ -128,7 +128,7 @@ namespace BlackSimPlugin
{
NewVis vis;
vis.LowerAlt = visibilityLayer.getBase().value(CLengthUnit::m());
vis.UpperAlt = visibilityLayer.getCeiling().value(CLengthUnit::m());
vis.UpperAlt = visibilityLayer.getTop().value(CLengthUnit::m());
vis.Range = visibilityLayer.getVisibility().value(CLengthUnit::mi()) * 100;
nw.Vis = vis;
}
@@ -179,7 +179,7 @@ namespace BlackSimPlugin
default: cloud.Type = 0;
}
cloud.UpperAlt = cloudLayer.getCeiling().value(CLengthUnit::m());
cloud.UpperAlt = cloudLayer.getBase().value(CLengthUnit::m());
nw.Cloud[nw.nCloudsCtr++] = cloud;
}

View File

@@ -544,7 +544,7 @@ namespace BlackSimPlugin
for (const auto &cloudLayer : cloudLayers)
{
int base = cloudLayer.getBase().value(CLengthUnit::m());
int top = cloudLayer.getCeiling().value(CLengthUnit::m());
int top = cloudLayer.getTop().value(CLengthUnit::m());
int coverage = 0;
switch(cloudLayer.getCoverage())

View File

@@ -263,7 +263,7 @@ namespace BlackWxPlugin
{
CCloudLayer cloudLayer;
cloudLayer.setBase(CAltitude(cloudLayerIt.value().bottomLevel, CAltitude::MeanSeaLevel, CLengthUnit::ft()));
cloudLayer.setCeiling(CAltitude(cloudLayerIt.value().topLevel, CAltitude::MeanSeaLevel, CLengthUnit::ft()));
cloudLayer.setTop(CAltitude(cloudLayerIt.value().topLevel, CAltitude::MeanSeaLevel, CLengthUnit::ft()));
cloudLayer.setCoveragePercent(cloudLayerIt.value().totalCoverage);
cloudLayers.insert(cloudLayer);
}