A simple data structure for storing global waypoint data. More...
#include <globalwaypoint.h>
Classes | |
class | Limits |
Contains constants for limit values of data members of class. More... | |
class | PresenceVector |
This class contains bit masks for bitwise operations on the presence vector for this message. More... | |
Public Types | |
typedef std::vector < GlobalWaypoint > | List |
Short hand for a vector of waypoints. | |
Public Member Functions | |
GlobalWaypoint () | |
Constructor, initializes default values. | |
GlobalWaypoint (const GlobalWaypoint &waypoint) | |
Copy constructor. | |
GlobalWaypoint (const ReportGlobalWaypoint &waypoint) | |
Copy constructor. | |
GlobalWaypoint (const SetGlobalWaypoint &waypoint) | |
Copy constructor. | |
virtual | ~GlobalWaypoint () |
Destructor. | |
bool | SetPosition (const Wgs &position) |
Sets position data. | |
bool | SetLatitude (const double degrees) |
Sets the latitude and updates the presence vector for the message. | |
bool | SetLongitude (const double degrees) |
Sets the longitude and updates the presence vector for the message. | |
bool | SetAltitude (const double value) |
Sets the altitude and updates the presence vector for the message. | |
bool | SetRoll (const double radians) |
Sets the roll and updates the presence vector for the message. | |
bool | SetPitch (const double radians) |
Sets the pitch value and updates the presence vector for the message. | |
bool | SetYaw (const double radians) |
Sets the yaw value and updates the presence vector for the message. | |
bool | SetWaypointTolerance (const double value) |
Sets the waypoint tolerance value and updates the presence vector for the message. | |
bool | SetPathTolerance (const double value) |
Sets the path tolerance value and updates the presence vector for the message. | |
double | GetLatitude () const |
double | GetLongitude () const |
double | GetAltitude () const |
double | GetRoll () const |
double | GetPitch () const |
double | GetYaw () const |
double | GetWaypointTolerance () const |
double | GetPathTolerance () const |
Wgs | GetPosition () const |
Point3D | GetOrientation () const |
Gets Roll, Pitch, Yaw as a Point3D. | |
virtual void | Print () const |
Prints data to console. | |
virtual UInt | GetPresenceVector () const |
virtual bool | IsSameAs (const Waypoint *waypoint, const double errorInMeters=1.0) const |
Method to check if the waypoints are the same by comparing distance between locations only. | |
GlobalWaypoint & | operator= (const GlobalWaypoint &waypoint) |
Sets equal to. | |
GlobalWaypoint & | operator= (const ReportGlobalWaypoint &waypoint) |
Sets equal to. | |
GlobalWaypoint & | operator= (const SetGlobalWaypoint &waypoint) |
Sets equal to. | |
Protected Attributes | |
Byte | mPresenceVector |
Bit vector for fields present. | |
double | mLatitude |
Latitude in degrees [-90, 90]. | |
double | mLongitude |
Longitude in degrees [-180, 180]. | |
double | mAltitude |
Altitude in meters [-10000, 35000]. | |
double | mRoll |
Roll in radians [-PI, PI]. | |
double | mPitch |
Pitch in radians [-PI, PI]. | |
double | mYaw |
Yaw in radians [-PI, PI]. | |
double | mWaypointTolerance |
Waypoint tolerance in meters [0, 100]. | |
double | mPathTolerance |
Path tolerance in meters [0, 100000], 0 used for infinite tolerance. |
A simple data structure for storing global waypoint data.
This structure contains data common to all waypoints, but not necessarily data included in any message structures.
Definition at line 61 of file globalwaypoint.h.
typedef std::vector<GlobalWaypoint> JAUS::GlobalWaypoint::List |
Short hand for a vector of waypoints.
Definition at line 64 of file globalwaypoint.h.
GlobalWaypoint::GlobalWaypoint | ( | ) |
Constructor, initializes default values.
Definition at line 67 of file globalwaypoint.cpp.
GlobalWaypoint::GlobalWaypoint | ( | const GlobalWaypoint & | waypoint ) |
Copy constructor.
Definition at line 124 of file globalwaypoint.cpp.
GlobalWaypoint::GlobalWaypoint | ( | const ReportGlobalWaypoint & | waypoint ) |
Copy constructor.
Definition at line 86 of file globalwaypoint.cpp.
GlobalWaypoint::GlobalWaypoint | ( | const SetGlobalWaypoint & | waypoint ) |
Copy constructor.
Definition at line 105 of file globalwaypoint.cpp.
GlobalWaypoint::~GlobalWaypoint | ( | ) | [virtual] |
Destructor.
Definition at line 135 of file globalwaypoint.cpp.
double JAUS::GlobalWaypoint::GetAltitude | ( | ) | const [inline] |
Definition at line 121 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::GetLatitude | ( | ) | const [inline] |
Definition at line 119 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::GetLongitude | ( | ) | const [inline] |
Definition at line 120 of file globalwaypoint.h.
Point3D GlobalWaypoint::GetOrientation | ( | ) | const |
Gets Roll, Pitch, Yaw as a Point3D.
Definition at line 346 of file globalwaypoint.cpp.
double JAUS::GlobalWaypoint::GetPathTolerance | ( | ) | const [inline] |
Definition at line 126 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::GetPitch | ( | ) | const [inline] |
Definition at line 123 of file globalwaypoint.h.
Wgs GlobalWaypoint::GetPosition | ( | ) | const |
Definition at line 333 of file globalwaypoint.cpp.
virtual UInt JAUS::GlobalWaypoint::GetPresenceVector | ( | ) | const [inline, virtual] |
Reimplemented in JAUS::ReportGlobalWaypoint, and JAUS::SetGlobalWaypoint.
Definition at line 130 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::GetRoll | ( | ) | const [inline] |
Definition at line 122 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::GetWaypointTolerance | ( | ) | const [inline] |
Definition at line 125 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::GetYaw | ( | ) | const [inline] |
Definition at line 124 of file globalwaypoint.h.
bool GlobalWaypoint::IsSameAs | ( | const Waypoint * | waypoint, |
const double | errorInMeters = 1.0 |
||
) | const [virtual] |
Method to check if the waypoints are the same by comparing distance between locations only.
[in] | waypoint | Waypoint to compare with. |
[in] | errorInMeters | Tolerance for distance check in meters. |
Implements JAUS::Waypoint.
Definition at line 388 of file globalwaypoint.cpp.
GlobalWaypoint & GlobalWaypoint::operator= | ( | const GlobalWaypoint & | waypoint ) |
Sets equal to.
Reimplemented in JAUS::ReportGlobalWaypoint, and JAUS::SetGlobalWaypoint.
Definition at line 408 of file globalwaypoint.cpp.
GlobalWaypoint & GlobalWaypoint::operator= | ( | const ReportGlobalWaypoint & | waypoint ) |
Sets equal to.
Reimplemented in JAUS::ReportGlobalWaypoint.
Definition at line 457 of file globalwaypoint.cpp.
GlobalWaypoint & GlobalWaypoint::operator= | ( | const SetGlobalWaypoint & | waypoint ) |
Sets equal to.
Reimplemented in JAUS::SetGlobalWaypoint.
Definition at line 434 of file globalwaypoint.cpp.
void GlobalWaypoint::Print | ( | ) | const [virtual] |
Prints data to console.
Definition at line 359 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetAltitude | ( | const double | value ) |
Sets the altitude and updates the presence vector for the message.
[in] | value | Desired Altitude in meters [-10000, 35000]. |
Definition at line 209 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetLatitude | ( | const double | degrees ) |
Sets the latitude and updates the presence vector for the message.
[in] | degrees | Desired latitude in degrees [-90, 90]. |
Definition at line 168 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetLongitude | ( | const double | degrees ) |
Sets the longitude and updates the presence vector for the message.
[in] | degrees | Desired longitude in degrees [-180, 180]. |
Definition at line 188 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetPathTolerance | ( | const double | value ) |
Sets the path tolerance value and updates the presence vector for the message.
[in] | value | Desired path tolerance in meters[0, 100000]. |
Definition at line 316 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetPitch | ( | const double | radians ) |
Sets the pitch value and updates the presence vector for the message.
[in] | radians | Desired pitch in radians[-PI, PI]. |
Definition at line 251 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetPosition | ( | const Wgs & | position ) |
Sets position data.
[in] | position | Position to set. |
Definition at line 149 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetRoll | ( | const double | radians ) |
Sets the roll and updates the presence vector for the message.
[in] | radians | Desired roll in radians[-PI, PI]. |
Definition at line 230 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetWaypointTolerance | ( | const double | value ) |
Sets the waypoint tolerance value and updates the presence vector for the message.
[in] | value | Desired waypoint tolerance in meters[0, 100]. |
Definition at line 294 of file globalwaypoint.cpp.
bool GlobalWaypoint::SetYaw | ( | const double | radians ) |
Sets the yaw value and updates the presence vector for the message.
[in] | radians | Desired pitch in radians[-PI, PI]. |
Definition at line 272 of file globalwaypoint.cpp.
double JAUS::GlobalWaypoint::mAltitude [protected] |
Altitude in meters [-10000, 35000].
Definition at line 139 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::mLatitude [protected] |
Latitude in degrees [-90, 90].
Definition at line 137 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::mLongitude [protected] |
Longitude in degrees [-180, 180].
Definition at line 138 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::mPathTolerance [protected] |
Path tolerance in meters [0, 100000], 0 used for infinite tolerance.
Definition at line 144 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::mPitch [protected] |
Pitch in radians [-PI, PI].
Definition at line 141 of file globalwaypoint.h.
Byte JAUS::GlobalWaypoint::mPresenceVector [protected] |
Bit vector for fields present.
Definition at line 136 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::mRoll [protected] |
Roll in radians [-PI, PI].
Definition at line 140 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::mWaypointTolerance [protected] |
Waypoint tolerance in meters [0, 100].
Definition at line 143 of file globalwaypoint.h.
double JAUS::GlobalWaypoint::mYaw [protected] |
Yaw in radians [-PI, PI].
Definition at line 142 of file globalwaypoint.h.