mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T171, utility functions for interpolator hints/setup
This commit is contained in:
@@ -23,6 +23,10 @@ namespace BlackMisc
|
||||
CInterpolationHints::CInterpolationHints(bool isVtolAircraft) : m_isVtol(isVtolAircraft)
|
||||
{ }
|
||||
|
||||
CInterpolationHints::CInterpolationHints(bool isVtolAircraft, bool hasParts, bool log) :
|
||||
m_isVtol(isVtolAircraft), m_hasParts(hasParts), m_logInterpolation(log)
|
||||
{ }
|
||||
|
||||
CAltitude CInterpolationHints::getGroundElevation(const Aviation::CAircraftSituation &situation) const
|
||||
{
|
||||
if (m_elevationProvider) { return m_elevationProvider(situation); }
|
||||
|
||||
@@ -41,6 +41,9 @@ namespace BlackMisc
|
||||
//! Constructor
|
||||
CInterpolationHints(bool isVtolAircraft);
|
||||
|
||||
//! Constructor
|
||||
CInterpolationHints(bool isVtolAircraft, bool hasParts, bool log);
|
||||
|
||||
//! Get elevation
|
||||
const BlackMisc::Geo::CElevationPlane &getElevationPlane() const { return m_elevationPlane;}
|
||||
|
||||
@@ -116,9 +119,9 @@ namespace BlackMisc
|
||||
bool m_isVtol = false; //!< VTOL aircraft?
|
||||
bool m_hasParts = false; //!< Has valid aircraft parts?
|
||||
bool m_logInterpolation = false; //!< log interpolation
|
||||
BlackMisc::Aviation::CAircraftParts m_aircraftParts; //!< Aircraft parts
|
||||
BlackMisc::Geo::CElevationPlane m_elevationPlane; //!< aircraft's elevation if available
|
||||
ElevationProvider m_elevationProvider; //!< Provider of ground elevation (lazy computation)
|
||||
BlackMisc::Aviation::CAircraftParts m_aircraftParts; //!< Aircraft parts
|
||||
BlackMisc::Geo::CElevationPlane m_elevationPlane; //!< aircraft's elevation if available
|
||||
ElevationProvider m_elevationProvider; //!< Provider of ground elevation (lazy computation)
|
||||
BlackMisc::PhysicalQuantities::CLength m_cgAboveGround { 0, nullptr }; //!< center of gravity above ground
|
||||
|
||||
BLACK_METACLASS(
|
||||
|
||||
@@ -156,6 +156,11 @@ namespace BlackMisc
|
||||
return m_callsignsToLog;
|
||||
}
|
||||
|
||||
bool CInterpolationAndRenderingSetup::logCallsign(const Aviation::CCallsign &callsign) const
|
||||
{
|
||||
return m_callsignsToLog.contains(callsign);
|
||||
}
|
||||
|
||||
QString CInterpolationAndRenderingSetup::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
|
||||
@@ -113,6 +113,9 @@ namespace BlackMisc
|
||||
//! Callsigns for logging
|
||||
BlackMisc::Aviation::CCallsignSet getLogCallsigns() const;
|
||||
|
||||
//! Log the given callsign?
|
||||
bool logCallsign(const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::String::toQString
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user