Qt Virtual Chart Table (QVCT)
|
(Geographical) Course data [bearing, horizontal/vertical speeds] More...
#include <data/CDataCourse.hpp>
Public Member Functions | |
CDataCourse () | |
CDataCourse (double _fdBearing, double _fdSpeed, double _fdSpeedVertical=UNDEFINED_SPEED) | |
CDataCourse (const CDataCourse &_roDataCourse) | |
virtual | ~CDataCourse () |
void | setCourse (double _fdBearing, double _fdSpeed, double _fdSpeedVertical=UNDEFINED_SPEED) |
Sets course values. More... | |
void | setCourse (const CDataCourse &_roDataCourse) |
Copy values from another course. More... | |
void | resetCourse () |
Resets all values (to an undefined course) More... | |
void | setBearing (double _fdBearing) |
Sets this course's bearing, in degrees. More... | |
void | resetBearing () |
Resets this course's bearing. More... | |
void | setSpeed (double _fdSpeed, double _fdSpeedVertical=UNDEFINED_SPEED) |
Sets this course's horizontal speed, in meters per second. More... | |
void | resetSpeed () |
Resets this course's horizontal speed. More... | |
void | setSpeedVertical (double _fdSpeedVertical) |
Sets this course's vertical speed, in meters per second. More... | |
void | resetSpeedVertical () |
Resets this course's vertical speed. More... | |
double | getBearing () const |
Returns this course's bearing, in degrees. More... | |
double | getSpeed () const |
Returns this course's horizontal speed, in meters per second. More... | |
double | getSpeedVertical () const |
Returns this course's vertical speed, in meters per second. More... | |
void | serialize (QDataStream &_rqDataStream) const |
Serializes (store) this object's data to binary format. More... | |
void | unserialize (QDataStream &_rqDataStream) |
Unserializes (restore) this object's data from binary format. More... | |
bool | operator== (const CDataCourse &_roCourse) const |
Equality operator. More... | |
bool | operator!= (const CDataCourse &_roCourse) const |
Inequality operator. More... | |
Static Public Member Functions | |
static bool | compareBearingAscending (const CDataCourse &_roCourse1, const CDataCourse &_roCourse2) |
Bearing (ascending sort) comparison operator. More... | |
static bool | compareBearingDescending (const CDataCourse &_roCourse1, const CDataCourse &_roCourse2) |
Bearing (descending sort) comparison operator. More... | |
static bool | compareSpeedAscending (const CDataCourse &_roCourse1, const CDataCourse &_roCourse2) |
Horizontal speed (ascending sort) comparison operator. More... | |
static bool | compareSpeedDescending (const CDataCourse &_roCourse1, const CDataCourse &_roCourse2) |
Horizontal speed (descending sort) comparison operator. More... | |
static bool | compareSpeedVerticalAscending (const CDataCourse &_roCourse1, const CDataCourse &_roCourse2) |
Vertical speed (ascending sort) comparison operator. More... | |
static bool | compareSpeedVerticalDescending (const CDataCourse &_roCourse1, const CDataCourse &_roCourse2) |
Vertical speed (descending sort) comparison operator. More... | |
Static Public Attributes | |
static constexpr double | UNDEFINED_BEARING = -999 |
Specific value for an undefined bearing. More... | |
static constexpr double | UNDEFINED_SPEED = -9999999 |
Specific value for an undefined speed. More... | |
static const CDataCourse | UNDEFINED |
Specific value for an undefined course. More... | |
Private Attributes | |
double | fdBearing |
Bearing, in degrees. More... | |
double | fdSpeed |
Horizontal speed, in meters per second. More... | |
double | fdSpeedVertical |
Vertical speed, in meters per second. More... | |
(Geographical) Course data [bearing, horizontal/vertical speeds]
This class gathers all components of a fully-qualified geographical course (bearing, horizontal/vertical speeds) in SI units (respectively degrees and meters per second).
Definition at line 33 of file CDataCourse.hpp.
CDataCourse::CDataCourse | ( | ) |
Definition at line 37 of file CDataCourse.cpp.
CDataCourse::CDataCourse | ( | double | _fdBearing, |
double | _fdSpeed, | ||
double | _fdSpeedVertical = UNDEFINED_SPEED |
||
) |
[in] | _fdBearing | Bearing, in degrees |
[in] | _fdSpeed | Horizontal speed, in meters per second |
[in] | _fdSpeedVertical | Vertical speed, in meters per second |
Definition at line 43 of file CDataCourse.cpp.
CDataCourse::CDataCourse | ( | const CDataCourse & | _roDataCourse | ) |
Definition at line 48 of file CDataCourse.cpp.
|
inlinevirtual |
Definition at line 76 of file CDataCourse.hpp.
void CDataCourse::setCourse | ( | double | _fdBearing, |
double | _fdSpeed, | ||
double | _fdSpeedVertical = UNDEFINED_SPEED |
||
) |
Sets course values.
[in] | _fdBearing | Bearing, in degrees |
[in] | _fdSpeed | Horizontal speed, in meters per second |
[in] | _fdSpeedVertical | Vertical speed, in meters per second |
Definition at line 72 of file CDataCourse.cpp.
void CDataCourse::setCourse | ( | const CDataCourse & | _roDataCourse | ) |
Copy values from another course.
Definition at line 87 of file CDataCourse.cpp.
void CDataCourse::resetCourse | ( | ) |
Resets all values (to an undefined course)
Definition at line 94 of file CDataCourse.cpp.
|
inline |
Sets this course's bearing, in degrees.
Definition at line 96 of file CDataCourse.hpp.
|
inline |
Resets this course's bearing.
Definition at line 99 of file CDataCourse.hpp.
|
inline |
Sets this course's horizontal speed, in meters per second.
Definition at line 101 of file CDataCourse.hpp.
|
inline |
Resets this course's horizontal speed.
Definition at line 104 of file CDataCourse.hpp.
|
inline |
Sets this course's vertical speed, in meters per second.
Definition at line 106 of file CDataCourse.hpp.
|
inline |
Resets this course's vertical speed.
Definition at line 109 of file CDataCourse.hpp.
|
inline |
Returns this course's bearing, in degrees.
Definition at line 114 of file CDataCourse.hpp.
|
inline |
Returns this course's horizontal speed, in meters per second.
Definition at line 116 of file CDataCourse.hpp.
|
inline |
Returns this course's vertical speed, in meters per second.
Definition at line 118 of file CDataCourse.hpp.
void CDataCourse::serialize | ( | QDataStream & | _rqDataStream | ) | const |
Serializes (store) this object's data to binary format.
Definition at line 105 of file CDataCourse.cpp.
void CDataCourse::unserialize | ( | QDataStream & | _rqDataStream | ) |
Unserializes (restore) this object's data from binary format.
Definition at line 110 of file CDataCourse.cpp.
bool CDataCourse::operator== | ( | const CDataCourse & | _roCourse | ) | const |
Equality operator.
This operator returns true if all components - bearing, horizontal speed and vertical speed - match.
Definition at line 130 of file CDataCourse.cpp.
bool CDataCourse::operator!= | ( | const CDataCourse & | _roCourse | ) | const |
Inequality operator.
This operator returns true if any components - bearing, horizontal speed and vertical speed - mismatch.
Definition at line 137 of file CDataCourse.cpp.
|
static |
Bearing (ascending sort) comparison operator.
Definition at line 148 of file CDataCourse.cpp.
|
static |
Bearing (descending sort) comparison operator.
Definition at line 153 of file CDataCourse.cpp.
|
static |
Horizontal speed (ascending sort) comparison operator.
Definition at line 158 of file CDataCourse.cpp.
|
static |
Horizontal speed (descending sort) comparison operator.
Definition at line 163 of file CDataCourse.cpp.
|
static |
Vertical speed (ascending sort) comparison operator.
Definition at line 168 of file CDataCourse.cpp.
|
static |
Vertical speed (descending sort) comparison operator.
Definition at line 173 of file CDataCourse.cpp.
|
staticconstexpr |
Specific value for an undefined bearing.
Definition at line 42 of file CDataCourse.hpp.
|
staticconstexpr |
Specific value for an undefined speed.
Definition at line 44 of file CDataCourse.hpp.
|
static |
Specific value for an undefined course.
Definition at line 46 of file CDataCourse.hpp.
|
private |
Bearing, in degrees.
Definition at line 56 of file CDataCourse.hpp.
|
private |
Horizontal speed, in meters per second.
Definition at line 59 of file CDataCourse.hpp.
|
private |
Vertical speed, in meters per second.
Definition at line 62 of file CDataCourse.hpp.