mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +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;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double CElevationPlane::getAltitudeValue(const CLengthUnit &unit) const
|
||||||
|
{
|
||||||
|
return this->getAltitude().value(unit);
|
||||||
|
}
|
||||||
|
|
||||||
bool CElevationPlane::isNull() const
|
bool CElevationPlane::isNull() const
|
||||||
{
|
{
|
||||||
return m_radius.isNull() || CCoordinateGeodetic::isNull();
|
return m_radius.isNull() || CCoordinateGeodetic::isNull();
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ namespace BlackMisc
|
|||||||
//! Altitude (synonym for geodetic height)
|
//! Altitude (synonym for geodetic height)
|
||||||
Aviation::CAltitude getAltitudeInUnit(const PhysicalQuantities::CLengthUnit &unit) const;
|
Aviation::CAltitude getAltitudeInUnit(const PhysicalQuantities::CLengthUnit &unit) const;
|
||||||
|
|
||||||
|
//! Altitude (synonym for geodetic height)
|
||||||
|
double getAltitudeValue(const PhysicalQuantities::CLengthUnit &unit) const;
|
||||||
|
|
||||||
//! Existing value?
|
//! Existing value?
|
||||||
virtual bool isNull() const override;
|
virtual bool isNull() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -257,6 +257,12 @@ namespace BlackMisc
|
|||||||
return m_cgsPerCallsign.remove(cs);
|
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)
|
CLength ISimulationEnvironmentProvider::minRange(const CLength &range)
|
||||||
{
|
{
|
||||||
return (range.isNull() || range < CElevationPlane::singlePointRadius()) ?
|
return (range.isNull() || range < CElevationPlane::singlePointRadius()) ?
|
||||||
|
|||||||
@@ -274,6 +274,11 @@ namespace BlackMisc
|
|||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
int removeSimulatorCG(const Aviation::CCallsign &cs);
|
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
|
//! Min.range considered as single point
|
||||||
static PhysicalQuantities::CLength minRange(const PhysicalQuantities::CLength &range);
|
static PhysicalQuantities::CLength minRange(const PhysicalQuantities::CLength &range);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user