Ref T786, smaller improvements

* allow to use ICoordinateGeodetic, not the CCoordinateGeodetic implementation only
* allow to init weather grid by initial ICoordinateGeodetic
This commit is contained in:
Klaus Basan
2020-04-21 15:37:33 +02:00
committed by Mat Sutcliffe
parent 9235f3232e
commit e63129267d
5 changed files with 16 additions and 7 deletions

View File

@@ -41,6 +41,12 @@ namespace BlackMisc
CSequence<CGridPoint>(other)
{ }
CWeatherGrid::CWeatherGrid(const ICoordinateGeodetic &coordinate)
{
const CGridPoint p("GLOB", coordinate);
this->push_back(p);
}
CWeatherGrid CWeatherGrid::findWithinRange(const ICoordinateGeodetic &coordinate, const PhysicalQuantities::CLength &range) const
{
return findBy([&](const CGridPoint & gridPoint)
@@ -162,7 +168,7 @@ namespace BlackMisc
static const CGridPoint gridPointGLOB =
{
"GLOB",
{},
CCoordinateGeodetic::null(),
CCloudLayerList { cloudLayer },
CTemperatureLayerList { temperatureLayer },
CVisibilityLayerList { visibilityLayer },
@@ -214,7 +220,7 @@ namespace BlackMisc
static const CGridPoint gridPointGLOB
{
"GLOB",
{},
CCoordinateGeodetic::null(),
CCloudLayerList { cloudLayer1, cloudLayer2 },
CTemperatureLayerList { temperatureLayer },
CVisibilityLayerList { visibilityLayer },