mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Changed interpolator (preliminary) to work with PQs and new classes, added stubs for unit tests in BlackCore
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 VATSIM Community
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@@ -32,12 +32,14 @@ public:
|
||||
* \brief Default constructor: 0 heading true
|
||||
*/
|
||||
CHeading() : CAngle(0, BlackMisc::PhysicalQuantities::CAngleUnit::rad()), m_magnetic(true) {}
|
||||
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* \param value
|
||||
* \param magnetic
|
||||
* \param unit
|
||||
*/
|
||||
|
||||
CHeading(double value, bool magnetic, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit), m_magnetic(magnetic) {}
|
||||
/*!
|
||||
* \brief Constructor
|
||||
@@ -46,53 +48,68 @@ public:
|
||||
* \param unit
|
||||
*/
|
||||
CHeading(int value, bool magnetic, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit), m_magnetic(magnetic) {}
|
||||
|
||||
/*!
|
||||
* \brief Constructor by CAngle
|
||||
* \param heading
|
||||
* \param magnetic
|
||||
*/
|
||||
CHeading(CAngle heading, bool magnetic) : CAngle(), m_magnetic(magnetic) {
|
||||
CHeading(CAngle heading, bool magnetic) : CAngle(), m_magnetic(magnetic)
|
||||
{
|
||||
CAngle::operator =(heading);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Copy constructor
|
||||
* \param otherHeading
|
||||
*/
|
||||
CHeading(const CHeading &otherHeading) : CAngle(otherHeading), m_magnetic(otherHeading.m_magnetic) {}
|
||||
|
||||
/*!
|
||||
* \brief Assignment operator =
|
||||
* \param otherHeading
|
||||
* @return
|
||||
*/
|
||||
CHeading &operator =(const CHeading &otherHeading);
|
||||
|
||||
/*!
|
||||
* \brief Equal operator ==
|
||||
* \param otherHeading
|
||||
* @return
|
||||
*/
|
||||
bool operator ==(const CHeading &otherHeading);
|
||||
|
||||
/*!
|
||||
* \brief Unequal operator ==
|
||||
* \param otherHeading
|
||||
* @return
|
||||
*/
|
||||
bool operator !=(const CHeading &otherHeading);
|
||||
|
||||
/*!
|
||||
* \brief Magnetic heading?
|
||||
* \return
|
||||
*/
|
||||
bool isMagneticHeading() const {
|
||||
return this->m_magnetic;
|
||||
}
|
||||
bool isMagneticHeading() const { return this->m_magnetic; }
|
||||
|
||||
/*!
|
||||
* \brief True heading?
|
||||
* \return
|
||||
*/
|
||||
bool isTrueHeading() const {
|
||||
return !this->m_magnetic;
|
||||
bool isTrueHeading() const { return !this->m_magnetic; }
|
||||
|
||||
/*!
|
||||
* \brief Switch heading unit
|
||||
* \param newUnit
|
||||
* \return
|
||||
*/
|
||||
CHeading &switchUnit(const BlackMisc::PhysicalQuantities::CAngleUnit &newUnit)
|
||||
{
|
||||
CAngle::switchUnit(newUnit);
|
||||
return (*this);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
#endif // BLACKMISC_AVHEADING_H
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user