Ref T259, Ref T243 removed interpolation hints

* no longer needed with providers in that form
* pure refactoring commit, just guarantees compilation
* already minor adjustments to use providers
This commit is contained in:
Klaus Basan
2018-03-20 20:15:26 +01:00
parent 476768f6ec
commit 0c06ac26f7
37 changed files with 140 additions and 586 deletions

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
return this->rememberGroundElevation(elevationPlane, elevationPlane.getRadius());
}
bool ISimulationEnvironmentProvider::insertCG(const CLength &cg, const Aviation::CCallsign &cs)
bool ISimulationEnvironmentProvider::insertCG(const CLength &cg, const CCallsign &cs)
{
if (cs.isEmpty()) { return false; }
const bool remove = cg.isNull();
@@ -77,7 +77,7 @@ namespace BlackMisc
return delta;
}
CElevationPlane ISimulationEnvironmentProvider::findClosestElevationWithinRange(const ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range)
CElevationPlane ISimulationEnvironmentProvider::findClosestElevationWithinRange(const ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range) const
{
return this->getElevationCoordinates().findClosestWithinRange(reference, range);
}
@@ -153,7 +153,7 @@ namespace BlackMisc
this->clearCGs();
}
CElevationPlane CSimulationEnvironmentAware::findClosestElevationWithinRange(const ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range)
CElevationPlane CSimulationEnvironmentAware::findClosestElevationWithinRange(const ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range) const
{
if (!this->hasProvider()) { return CElevationPlane::null(); }
return this->provider()->findClosestElevationWithinRange(reference, range);
@@ -177,6 +177,12 @@ namespace BlackMisc
return this->provider()->getDefaultModel();
}
CLength CSimulationEnvironmentAware::getCG(const CCallsign &callsign) const
{
if (!this->hasProvider()) { return CLength::null(); }
return this->provider()->getCG(callsign);
}
bool CSimulationEnvironmentAware::hasCG(const CCallsign &callsign) const
{
if (!this->hasProvider()) { return false; }