Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

AshtechG12_GPS_PhysicalDevice::Position Struct Reference

#include <AshtechG12_GPS_PhysicalDevice.h>

List of all members.


Detailed Description

This structure holds all the data sent by a G12 in response to a position request.

Definition at line 60 of file AshtechG12_GPS_PhysicalDevice.h.

Public Member Functions

 Position ()
 Default Constructor.
 Position (const Position &other)
 Copy constructor.
 Position (const char *message)
 Constructs a Position object from a G12 $PASHR,POS message.
int SetFromPOS_Message (const char *message)
 Populates the Position object with the contents of a G12 $PASHR,POS message.
void toString (std::string &str) const
 Converts a Position message to a human-readable string.
std::string toString () const
 Converts a Position message to a human-readable string.
Positionoperator= (const Position &other)
 Assigns all fields in this Position object to those from another.
bool operator== (const Position &other) const
 The equality operator.

Public Attributes

unsigned char m_RTCM
 Indicates whether the position is a result of normal or RTCM operation.
int m_numSatellites
 The number of satellites that contributed to this reading.
float m_UTC_Timetag
 The UTC time of the reading Valid Range: 0 to 235959.50 seconds.
float m_latitude
 The latitude in degrees at the time of the reading.
char m_latitudeSector
 The sector in which the latitude measurement resides.
float m_longitude
 The longitude in degrees at the time of the reading.
char m_longitudeSector
 The sector in which the longitude measurement resides.
float m_altitude
 The ellipsoidal height in meters at the time of the reading.
float m_groundTrack
 The ground track in degrees from true north at the time of the reading.
float m_groundSpeed
 The ground speed in knots at the time of the reading.
float m_verticalVelocity
 The vertical velocity in meters per second at the time of the reading.
float m_PDOP
 The Position Dilution of Precision (PDOP) at the time of the reading.
float m_HDOP
 The Height Dilution of Precision (HDOP) at the time of the reading.
float m_VDOP
 The Vertical Dilution of Precision (VDOP) at the time of the reading.
float m_TDOP
 The Time Dilution of Precision (TDOP) at the time of the reading.


Constructor & Destructor Documentation

AshtechG12_GPS_PhysicalDevice::Position::Position  ) 
 

Default Constructor.

Initializes all fields to zero or the lowest sane value for fields where zero is not allowed.

Definition at line 368 of file AshtechG12_GPS_PhysicalDevice.cpp.

AshtechG12_GPS_PhysicalDevice::Position::Position const Position other  ) 
 

Copy constructor.

All fields are copied such that the equality operator would return true for the constructed object and the other.

Parameters:
other The Position object to be constructed

Definition at line 378 of file AshtechG12_GPS_PhysicalDevice.cpp.

AshtechG12_GPS_PhysicalDevice::Position::Position const char *  message  )  [explicit]
 

Constructs a Position object from a G12 $PASHR,POS message.

If the supplied message is improperly formatted or has a bad checksum, the position object is returned as if from the default constructor. To check for success of message parsing, the default constructor should be called followed by a call to SetFromPOS_Message(const char *).

Parameters:
message The G12 $PASHR,POS message
See also:
SetFromPOS_Message(const char *)

Definition at line 392 of file AshtechG12_GPS_PhysicalDevice.cpp.

References SetFromPOS_Message().


Member Function Documentation

AshtechG12_GPS_PhysicalDevice::Position & AshtechG12_GPS_PhysicalDevice::Position::operator= const Position other  ) 
 

Assigns all fields in this Position object to those from another.

Fields are assigned such that the equality operator would return true when comparing the two objects.

Parameters:
The Position object to be assigned to this one
Returns:
A reference to this object

Definition at line 520 of file AshtechG12_GPS_PhysicalDevice.cpp.

bool AshtechG12_GPS_PhysicalDevice::Position::operator== const Position other  )  const
 

The equality operator.

Compares all fields in this object to those in another Position object.

Returns:
true if all fields are equal, false otherwise

Definition at line 533 of file AshtechG12_GPS_PhysicalDevice.cpp.

int AshtechG12_GPS_PhysicalDevice::Position::SetFromPOS_Message const char *  message  ) 
 

Populates the Position object with the contents of a G12 $PASHR,POS message.

Parameters:
message The G12 $PASHR,POS message
Returns:
0=success, -1=invalid message structure, -2=bad or unreadable checksum

Definition at line 403 of file AshtechG12_GPS_PhysicalDevice.cpp.

References m_altitude, m_groundSpeed, m_groundTrack, m_HDOP, m_latitude, m_latitudeSector, m_longitude, m_longitudeSector, m_numSatellites, m_PDOP, m_RTCM, m_TDOP, m_UTC_Timetag, m_VDOP, m_verticalVelocity, and AshtechG12_GPS_PhysicalDevice::ValidateChecksum().

Referenced by AshtechG12_GPS_PhysicalDevice::GetCurrentPosition(), and Position().

std::string AshtechG12_GPS_PhysicalDevice::Position::toString  )  const
 

Converts a Position message to a human-readable string.

Generates a string that can be read from a display -- it is not intended for re-parsing or interprocess communication.

Returns:
The position data as a human-readable string

Definition at line 510 of file AshtechG12_GPS_PhysicalDevice.cpp.

void AshtechG12_GPS_PhysicalDevice::Position::toString std::string &  str  )  const
 

Converts a Position message to a human-readable string.

Generates a string that can be read from a display -- it is not intended for re-parsing or interprocess communication.

Parameters:
str The string object to be populated with the Position object's contents

Definition at line 486 of file AshtechG12_GPS_PhysicalDevice.cpp.

References m_altitude, m_groundSpeed, m_groundTrack, m_HDOP, m_latitude, m_latitudeSector, m_longitude, m_longitudeSector, m_PDOP, m_TDOP, m_UTC_Timetag, m_VDOP, and m_verticalVelocity.


Member Data Documentation

float AshtechG12_GPS_PhysicalDevice::Position::m_altitude
 

The ellipsoidal height in meters at the time of the reading.

Valid Range: -3000.00 to +3000.00 meters (ellipsoidal)

Definition at line 169 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_groundSpeed
 

The ground speed in knots at the time of the reading.

Valid Range: 0 to 999.99 knots

Definition at line 179 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_groundTrack
 

The ground track in degrees from true north at the time of the reading.

Valid Range: 0.00 to 359.99 degrees true north reference

Definition at line 174 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_HDOP
 

The Height Dilution of Precision (HDOP) at the time of the reading.

Valid Range: 0 to 99.9 (higher=worse, <4 is nominal)

Definition at line 195 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_latitude
 

The latitude in degrees at the time of the reading.

Valid Range: 0 to 90 degrees, 0.00001 minute resolution

Definition at line 149 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().

char AshtechG12_GPS_PhysicalDevice::Position::m_latitudeSector
 

The sector in which the latitude measurement resides.

Valid Range: 'N' for north or 'S' for south

Definition at line 154 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_longitude
 

The longitude in degrees at the time of the reading.

Valid Range: 0 to 90 degrees, 0.00001 minute resolution

Definition at line 159 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().

char AshtechG12_GPS_PhysicalDevice::Position::m_longitudeSector
 

The sector in which the longitude measurement resides.

Valid Range: 'W' for west or 'E' for east

Definition at line 164 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().

int AshtechG12_GPS_PhysicalDevice::Position::m_numSatellites
 

The number of satellites that contributed to this reading.

Valid Range: 0 to 12

Definition at line 139 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), GPSObserver::Run(), and SetFromPOS_Message().

float AshtechG12_GPS_PhysicalDevice::Position::m_PDOP
 

The Position Dilution of Precision (PDOP) at the time of the reading.

PDOP = sqrt(HDOP^2 + VDOP^2) Valid Range: 0 to 99.9 (higher=worse, <6 is nominal)

Definition at line 190 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), and toString().

unsigned char AshtechG12_GPS_PhysicalDevice::Position::m_RTCM
 

Indicates whether the position is a result of normal or RTCM operation.

0 means normal, 1 means RTCM (differential).

Definition at line 133 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), and SetFromPOS_Message().

float AshtechG12_GPS_PhysicalDevice::Position::m_TDOP
 

The Time Dilution of Precision (TDOP) at the time of the reading.

Valid Range: 0 to 99.9 (higher=worse, <4 is nominal)

Definition at line 205 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_UTC_Timetag
 

The UTC time of the reading Valid Range: 0 to 235959.50 seconds.

Definition at line 144 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), GPSObserver::Run(), SetFromPOS_Message(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_VDOP
 

The Vertical Dilution of Precision (VDOP) at the time of the reading.

Valid Range: 0 to 99.9 (higher=worse, <4 is nominal)

Definition at line 200 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), and toString().

float AshtechG12_GPS_PhysicalDevice::Position::m_verticalVelocity
 

The vertical velocity in meters per second at the time of the reading.

Valid Range: -999.9 to +999.9 meters/second

Definition at line 184 of file AshtechG12_GPS_PhysicalDevice.h.

Referenced by GPSObserver::GPS2Screen(), SetFromPOS_Message(), OrbitController::TangentPlaneState(), and toString().


The documentation for this struct was generated from the following files:
Generated on Wed Sep 5 12:54:37 2007 for DSACSS Operational Code by  doxygen 1.3.9.1