mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 13:15:39 +08:00
committed by
Lars Toenning
parent
5e5b3f830d
commit
7691e42a5b
@@ -37,8 +37,8 @@ namespace XSwiftBus
|
||||
XPLMUnregisterCommandHandler(m_command, callback, false, static_cast<void*>(this));
|
||||
}
|
||||
|
||||
//! Not copyable.
|
||||
//! @{
|
||||
//! Not copyable.
|
||||
CCommand(const CCommand &) = delete;
|
||||
CCommand &operator =(const CCommand &) = delete;
|
||||
//! @}
|
||||
|
||||
@@ -33,8 +33,8 @@ namespace XSwiftBus
|
||||
class CDBusMessage
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
//! @{
|
||||
//! Constructor
|
||||
CDBusMessage(DBusMessage *message);
|
||||
CDBusMessage(const CDBusMessage &other);
|
||||
//! @}
|
||||
@@ -69,8 +69,8 @@ namespace XSwiftBus
|
||||
//! Begin writing argument
|
||||
void beginArgumentWrite();
|
||||
|
||||
//! Append argument. Make sure to call \sa beginArgumentWrite() before.
|
||||
//! @{
|
||||
//! Append argument. Make sure to call \sa beginArgumentWrite() before.
|
||||
void appendArgument(bool value);
|
||||
void appendArgument(const char *value);
|
||||
void appendArgument(const std::string &value);
|
||||
@@ -84,8 +84,8 @@ namespace XSwiftBus
|
||||
//! Begin reading arguments
|
||||
void beginArgumentRead();
|
||||
|
||||
//! Read single argument. Make sure to call \sa beginArgumentRead() before.
|
||||
//! @{
|
||||
//! Read single argument. Make sure to call \sa beginArgumentRead() before.
|
||||
void getArgument(int &value);
|
||||
void getArgument(bool &value);
|
||||
void getArgument(double &value);
|
||||
|
||||
@@ -160,15 +160,15 @@ namespace XSwiftBus
|
||||
//! Get aircraft true heading in degrees
|
||||
double getTrueHeadingDeg() const { return m_heading.get(); }
|
||||
|
||||
//! Get aircraft local velocity in world coordinates meters per second
|
||||
//! @{
|
||||
//! Get aircraft local velocity in world coordinates meters per second
|
||||
double getLocalXVelocityMps() const { return isPaused() ? 0 : m_velocityX.get(); }
|
||||
double getLocalYVelocityMps() const { return isPaused() ? 0 : m_velocityY.get(); }
|
||||
double getLocalZVelocityMps() const { return isPaused() ? 0 : m_velocityZ.get(); }
|
||||
//! @}
|
||||
|
||||
//! Get aircraft angular velocity in radians per second
|
||||
//! @{
|
||||
//! Get aircraft angular velocity in radians per second
|
||||
double getPitchRadPerSec() const { return isPaused() ? 0 : m_pitchVelocity.get(); }
|
||||
double getRollRadPerSec() const { return isPaused() ? 0 : m_rollVelocity.get(); }
|
||||
double getHeadingRadPerSec() const { return isPaused() ? 0 : m_headingVelocity.get(); }
|
||||
@@ -183,8 +183,8 @@ namespace XSwiftBus
|
||||
//! Get elevation of ground under the plane in meters
|
||||
double getGroundElevation() const { return m_terrainProbe.getElevation(m_latitude.get(), m_longitude.get(), m_elevation.get())[0]; }
|
||||
|
||||
//! COM Selection 6/7
|
||||
//! @{
|
||||
//! COM Selection 6/7
|
||||
int getComSelection() const { return m_comAudioSelection.get(); }
|
||||
bool isCom1Selected() const { return this->getComSelection() == 6; }
|
||||
bool isCom2Selected() const { return this->getComSelection() == 7; }
|
||||
|
||||
@@ -27,16 +27,16 @@ namespace XSwiftBus
|
||||
//! Destructor;
|
||||
~CTerrainProbe();
|
||||
|
||||
//! Not copyable.
|
||||
//! @{
|
||||
//! Not copyable.
|
||||
CTerrainProbe(const CTerrainProbe &) = delete;
|
||||
CTerrainProbe &operator =(const CTerrainProbe &) = delete;
|
||||
//! @}
|
||||
|
||||
//! @{
|
||||
//! Get the elevation in meters at the given point in OpenGL space.
|
||||
//! \note Due to the Earth's curvature, the OpenGL vertical axis may not be exactly perpendicular to the surface of the geoid.
|
||||
//! \return NaN if no ground was detected.
|
||||
//! @{
|
||||
std::array<double, 3> getElevation(double degreesLatitude, double degreesLongitude, double metersAltitude) const;
|
||||
std::array<double, 3> getElevation(double degreesLatitude, double degreesLongitude, double metersAltitude, const std::string &callsign, bool &o_isWater) const;
|
||||
//! @}
|
||||
|
||||
@@ -213,28 +213,28 @@ namespace XSwiftBus
|
||||
};
|
||||
Labels m_labels { this };
|
||||
|
||||
//! Check functions
|
||||
//! @{
|
||||
//! Check functions
|
||||
static bool isPlusMinus180(float v);
|
||||
static bool isPlusMinus180(double v);
|
||||
//! @}
|
||||
|
||||
//! Normalize to (-180, 180] or [0, 360) degrees
|
||||
//! @{
|
||||
//! Normalize to (-180, 180] or [0, 360) degrees
|
||||
static float normalizeToPlusMinus180Deg(float v);
|
||||
static double normalizeToPlusMinus180Deg(double v);
|
||||
static float normalizeToZero360Deg(float v);
|
||||
static double normalizeToZero360Deg(double v);
|
||||
//! @}
|
||||
|
||||
//! Check the position if values are valid
|
||||
//! @{
|
||||
//! Check the position if values are valid
|
||||
static bool isValidPosition(const XPMPPlanePosition_t &position);
|
||||
static bool isValidPosition(const XPLMCameraPosition_t *camPos);
|
||||
//! @}
|
||||
|
||||
//! Pos as string
|
||||
//! @{
|
||||
//! Pos as string
|
||||
static std::string pos2String(const XPMPPlanePosition_t &position);
|
||||
static std::string pos2String(const XPLMCameraPosition_t *camPos);
|
||||
//! @}
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace XSwiftBus
|
||||
};
|
||||
}
|
||||
|
||||
//! Logger convenience macros
|
||||
//! @{
|
||||
//! Logger convenience macros
|
||||
// *INDENT-OFF*
|
||||
#define DEBUG_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg)))
|
||||
#define DEBUG_LOG_C(msg, doLog) ((doLog) ? XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg)) : static_cast<void>(0))
|
||||
|
||||
Reference in New Issue
Block a user