mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Ref T778, utility functions
This commit is contained in:
committed by
Mat Sutcliffe
parent
004173b052
commit
cfa96a3aeb
@@ -103,6 +103,11 @@ namespace BlackMisc
|
||||
return a;
|
||||
}
|
||||
|
||||
double CElevationPlane::getAltitudeValue(const CLengthUnit &unit) const
|
||||
{
|
||||
return this->getAltitude().value(unit);
|
||||
}
|
||||
|
||||
bool CElevationPlane::isNull() const
|
||||
{
|
||||
return m_radius.isNull() || CCoordinateGeodetic::isNull();
|
||||
|
||||
@@ -94,6 +94,9 @@ namespace BlackMisc
|
||||
//! Altitude (synonym for geodetic height)
|
||||
Aviation::CAltitude getAltitudeInUnit(const PhysicalQuantities::CLengthUnit &unit) const;
|
||||
|
||||
//! Altitude (synonym for geodetic height)
|
||||
double getAltitudeValue(const PhysicalQuantities::CLengthUnit &unit) const;
|
||||
|
||||
//! Existing value?
|
||||
virtual bool isNull() const override;
|
||||
|
||||
|
||||
@@ -257,6 +257,12 @@ namespace BlackMisc
|
||||
return m_cgsPerCallsign.remove(cs);
|
||||
}
|
||||
|
||||
void ISimulationEnvironmentProvider::removePendingElevationRequest(const CCallsign &cs)
|
||||
{
|
||||
QWriteLocker l(&m_lockElvCoordinates);
|
||||
m_pendingElevationRequests.remove(cs);
|
||||
}
|
||||
|
||||
CLength ISimulationEnvironmentProvider::minRange(const CLength &range)
|
||||
{
|
||||
return (range.isNull() || range < CElevationPlane::singlePointRadius()) ?
|
||||
|
||||
@@ -274,6 +274,11 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
int removeSimulatorCG(const Aviation::CCallsign &cs);
|
||||
|
||||
//! Remove pending timestamp
|
||||
//! \threadsafe
|
||||
//! \remark useful if we ignore the probe response on sim. side
|
||||
void removePendingElevationRequest(const Aviation::CCallsign &cs);
|
||||
|
||||
//! Min.range considered as single point
|
||||
static PhysicalQuantities::CLength minRange(const PhysicalQuantities::CLength &range);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user