mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 06:25:33 +08:00
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:
committed by
Mat Sutcliffe
parent
9235f3232e
commit
e63129267d
@@ -21,13 +21,13 @@ namespace BlackMisc
|
||||
namespace Weather
|
||||
{
|
||||
CGridPoint::CGridPoint(const QString &identifier,
|
||||
const Geo::CCoordinateGeodetic &position) :
|
||||
const ICoordinateGeodetic &position) :
|
||||
m_identifier(identifier),
|
||||
m_position(position)
|
||||
{ }
|
||||
|
||||
CGridPoint::CGridPoint(const QString &identifier,
|
||||
const Geo::CCoordinateGeodetic &position,
|
||||
const Geo::ICoordinateGeodetic &position,
|
||||
const CCloudLayerList &cloudLayers,
|
||||
const CTemperatureLayerList &temperatureLayers,
|
||||
const CVisibilityLayerList &visibilityLayers,
|
||||
|
||||
@@ -54,11 +54,11 @@ namespace BlackMisc
|
||||
|
||||
//! Constructor
|
||||
CGridPoint(const QString &identifier,
|
||||
const Geo::CCoordinateGeodetic &position);
|
||||
const Geo::ICoordinateGeodetic &position);
|
||||
|
||||
//! Constructor
|
||||
CGridPoint(const QString &identifier,
|
||||
const Geo::CCoordinateGeodetic &position,
|
||||
const Geo::ICoordinateGeodetic &position,
|
||||
const CCloudLayerList &cloudLayers,
|
||||
const CTemperatureLayerList &temperatureLayers,
|
||||
const CVisibilityLayerList &visibilityLayers,
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -43,6 +43,9 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CWeatherGrid(const CSequence<CGridPoint> &other);
|
||||
|
||||
//! Grid with an initial point at coordinates given
|
||||
CWeatherGrid(const BlackMisc::Geo::ICoordinateGeodetic &coordinate);
|
||||
|
||||
//! \copydoc Geo::IGeoObjectList::findWithinRange
|
||||
CWeatherGrid findWithinRange(const BlackMisc::Geo::ICoordinateGeodetic &coordinate, const BlackMisc::PhysicalQuantities::CLength &range) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user