Classes | Public Types | Public Member Functions | Protected Attributes

JAUS::GlobalWaypoint Class Reference

A simple data structure for storing global waypoint data. More...

#include <globalwaypoint.h>

Inheritance diagram for JAUS::GlobalWaypoint:
JAUS::Waypoint JAUS::ReportGlobalWaypoint JAUS::SetGlobalWaypoint

List of all members.

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.
GlobalWaypointoperator= (const GlobalWaypoint &waypoint)
 Sets equal to.
GlobalWaypointoperator= (const ReportGlobalWaypoint &waypoint)
 Sets equal to.
GlobalWaypointoperator= (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.

Detailed Description

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.


Member Typedef Documentation

Short hand for a vector of waypoints.

Definition at line 64 of file globalwaypoint.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Returns:
Orientation Desired Roll(X), Pitch(Y), Yaw(Z) stored 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
Returns:
Current position data set in structure.

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.

Parameters:
[in]waypointWaypoint to compare with.
[in]errorInMetersTolerance for distance check in meters.
Returns:
True if the same, false otherwise.

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.

Parameters:
[in]valueDesired Altitude in meters [-10000, 35000].
Returns:
true on success, otherwise false.

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.

Parameters:
[in]degreesDesired latitude in degrees [-90, 90].
Returns:
true on success, otherwise false.

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.

Parameters:
[in]degreesDesired longitude in degrees [-180, 180].
Returns:
true on success, otherwise false.

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.

Parameters:
[in]valueDesired path tolerance in meters[0, 100000].
Returns:
true on success, otherwise false.

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.

Parameters:
[in]radiansDesired pitch in radians[-PI, PI].
Returns:
true on success, otherwise false.

Definition at line 251 of file globalwaypoint.cpp.

bool GlobalWaypoint::SetPosition ( const Wgs position )

Sets position data.

Parameters:
[in]positionPosition to set.
Returns:
true on success, otherwise false.

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.

Parameters:
[in]radiansDesired roll in radians[-PI, PI].
Returns:
true on success, otherwise false.

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.

Parameters:
[in]valueDesired waypoint tolerance in meters[0, 100].
Returns:
true on success, otherwise false.

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.

Parameters:
[in]radiansDesired pitch in radians[-PI, PI].
Returns:
true on success, otherwise false.

Definition at line 272 of file globalwaypoint.cpp.


Member Data Documentation

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.

Longitude in degrees [-180, 180].

Definition at line 138 of file globalwaypoint.h.

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.

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.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines