Classes | Public Member Functions | Protected Attributes

JAUS::SetLocalWaypoint Class Reference

This message is used to set waypoint data based on the local coordinate system. A local waypoint can have up to six fields to describe it completely. The waypoint is defined in the global coordinate system using the X, Y, and Z fields. The desired orientation of the platform at the waypoint is defined using the roll, pitch, and yaw fields. Only fields 1-3 (presence vector, latitude, and longitude are required for each waypoint. The presence vector is used to specify if the remaining fields, i.e., Z, roll, pitch, and yaw, are used to further describe orientation at that point. More...

#include <setlocalwaypoint.h>

Inheritance diagram for JAUS::SetLocalWaypoint:
JAUS::Message

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 Member Functions

 SetLocalWaypoint (const Address &dest=Address(), const Address &src=Address())
 Constructor, initializes default values.
 SetLocalWaypoint (const SetLocalWaypoint &message)
 Copy constructor.
 ~SetLocalWaypoint ()
 Destructor.
bool SetX (const double value)
 Sets the latitude and updates the presence vector for the message.
bool SetY (const double value)
 Sets the longitude and updates the presence vector for the message.
bool SetZ (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 GetX () const
double GetY () const
double GetZ () const
double GetRoll () const
double GetPitch () const
double GetYaw () const
double GetWaypointTolerance () const
double GetPathTolerance () const
virtual bool IsCommand () const
virtual int WriteMessageBody (Packet &packet) const
 Writes message payload to the packet.
virtual int ReadMessageBody (const Packet &packet)
 Reads message payload from the packet.
virtual MessageClone () const
virtual UInt GetPresenceVector () const
virtual UInt GetPresenceVectorSize () const
virtual UInt GetPresenceVectorMask () const
virtual UShort GetMessageCodeOfResponse () const
virtual std::string GetMessageName () const
virtual void ClearMessageBody ()
 Clears message payload data.
virtual bool IsLargeDataSet (const unsigned int maxPayloadSize=1437) const
virtual int RunTestCase () const
 Runs a test case to validate the message class.
void PrintMessageBody () const
 Prints data to console.
SetLocalWaypointoperator= (const SetLocalWaypoint &message)
 Sets equal to.

Protected Attributes

Byte mPresenceVector
 Bit vector for fields present.
double mX
 X in meters [-100000, 100000].
double mY
 Y in meters [-100000, 100000].
double mZ
 Z in meters [-100000, 100000].
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, 10000], 0 used for infinite tolerance.

Detailed Description

This message is used to set waypoint data based on the local coordinate system. A local waypoint can have up to six fields to describe it completely. The waypoint is defined in the global coordinate system using the X, Y, and Z fields. The desired orientation of the platform at the waypoint is defined using the roll, pitch, and yaw fields. Only fields 1-3 (presence vector, latitude, and longitude are required for each waypoint. The presence vector is used to specify if the remaining fields, i.e., Z, roll, pitch, and yaw, are used to further describe orientation at that point.

Definition at line 63 of file setlocalwaypoint.h.


Constructor & Destructor Documentation

SetLocalWaypoint::SetLocalWaypoint ( const Address dest = Address(),
const Address src = Address() 
)

Constructor, initializes default values.

Parameters:
[in]srcSource ID of message sender.
[in]destDestination ID of message.

Definition at line 65 of file setlocalwaypoint.cpp.

SetLocalWaypoint::SetLocalWaypoint ( const SetLocalWaypoint message )

Copy constructor.

Definition at line 84 of file setlocalwaypoint.cpp.

SetLocalWaypoint::~SetLocalWaypoint (  )

Destructor.

Definition at line 95 of file setlocalwaypoint.cpp.


Member Function Documentation

void SetLocalWaypoint::ClearMessageBody (  ) [virtual]

Clears message payload data.

Implements JAUS::Message.

Definition at line 392 of file setlocalwaypoint.cpp.

virtual Message* JAUS::SetLocalWaypoint::Clone (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 123 of file setlocalwaypoint.h.

virtual UShort JAUS::SetLocalWaypoint::GetMessageCodeOfResponse (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 127 of file setlocalwaypoint.h.

virtual std::string JAUS::SetLocalWaypoint::GetMessageName (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 128 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetPathTolerance (  ) const [inline]

Definition at line 119 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetPitch (  ) const [inline]

Definition at line 116 of file setlocalwaypoint.h.

virtual UInt JAUS::SetLocalWaypoint::GetPresenceVector (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 124 of file setlocalwaypoint.h.

virtual UInt JAUS::SetLocalWaypoint::GetPresenceVectorMask (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 126 of file setlocalwaypoint.h.

virtual UInt JAUS::SetLocalWaypoint::GetPresenceVectorSize (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 125 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetRoll (  ) const [inline]

Definition at line 115 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetWaypointTolerance (  ) const [inline]

Definition at line 118 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetX (  ) const [inline]

Definition at line 112 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetY (  ) const [inline]

Definition at line 113 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetYaw (  ) const [inline]

Definition at line 117 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::GetZ (  ) const [inline]

Definition at line 114 of file setlocalwaypoint.h.

virtual bool JAUS::SetLocalWaypoint::IsCommand (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 120 of file setlocalwaypoint.h.

virtual bool JAUS::SetLocalWaypoint::IsLargeDataSet ( const unsigned int  maxPayloadSize = 1437 ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 130 of file setlocalwaypoint.h.

SetLocalWaypoint & SetLocalWaypoint::operator= ( const SetLocalWaypoint message )

Sets equal to.

Definition at line 464 of file setlocalwaypoint.cpp.

void SetLocalWaypoint::PrintMessageBody (  ) const [virtual]

Prints data to console.

Reimplemented from JAUS::Message.

Definition at line 441 of file setlocalwaypoint.cpp.

int SetLocalWaypoint::ReadMessageBody ( const Packet packet ) [virtual]

Reads message payload from the packet.

Message contents are read from the packet following the JAUS standard.

Parameters:
[in]packetPacket containing message payload data to read.
Returns:
-1 on error, otherwise number of bytes written.

Implements JAUS::Message.

Definition at line 339 of file setlocalwaypoint.cpp.

int SetLocalWaypoint::RunTestCase (  ) const [virtual]

Runs a test case to validate the message class.

Returns:
1 on success, otherwise 0.

Reimplemented from JAUS::Message.

Definition at line 413 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::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 257 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::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 192 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::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 171 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::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 235 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::SetX ( const double  value )

Sets the latitude and updates the presence vector for the message.

Parameters:
[in]valueDesired X in meters [-100000, 100000].
Returns:
true on success, otherwise false.

Definition at line 109 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::SetY ( const double  value )

Sets the longitude and updates the presence vector for the message.

Parameters:
[in]valueDesired Y in meters [-100000, 100000].
Returns:
true on success, otherwise false.

Definition at line 129 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::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 213 of file setlocalwaypoint.cpp.

bool SetLocalWaypoint::SetZ ( const double  value )

Sets the altitude and updates the presence vector for the message.

Parameters:
[in]valueDesired Z in meters [-100000, 100000].
Returns:
true on success, otherwise false.

Definition at line 150 of file setlocalwaypoint.cpp.

int SetLocalWaypoint::WriteMessageBody ( Packet packet ) const [virtual]

Writes message payload to the packet.

Message contents are written to the packet following the JAUS standard.

Parameters:
[out]packetPacket to write payload to.
Returns:
-1 on error, otherwise number of bytes written.

Implements JAUS::Message.

Definition at line 280 of file setlocalwaypoint.cpp.


Member Data Documentation

Path tolerance in meters [0, 10000], 0 used for infinite tolerance.

Definition at line 143 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::mPitch [protected]

Pitch in radians [-PI, PI].

Definition at line 140 of file setlocalwaypoint.h.

Bit vector for fields present.

Definition at line 135 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::mRoll [protected]

Roll in radians [-PI, PI].

Definition at line 139 of file setlocalwaypoint.h.

Waypoint tolerance in meters [0, 100].

Definition at line 142 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::mX [protected]

X in meters [-100000, 100000].

Definition at line 136 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::mY [protected]

Y in meters [-100000, 100000].

Definition at line 137 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::mYaw [protected]

Yaw in radians [-PI, PI].

Definition at line 141 of file setlocalwaypoint.h.

double JAUS::SetLocalWaypoint::mZ [protected]

Z in meters [-100000, 100000].

Definition at line 138 of file setlocalwaypoint.h.


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