Aria  2.7.5.2
ArTrimbleGPS Class Reference

GPS subclass to support the Trimble AgGPS and other Trimble GPS devices. More...

#include <ArTrimbleGPS.h>

Inherits ArGPS.

Public Member Functions

bool sendTSIPCommand (char command, const char *data, size_t dataLen)
 
- Public Member Functions inherited from ArGPS
void addNMEAHandler (const char *message, ArNMEAParser::Handler *handler)
 
bool blockingConnect (unsigned long connectTimeout=10000)
 
virtual bool connect (unsigned long connectTimeout=10000)
 Check that the device connection (e.g. serial port) is open, and that data is being received from GPS. More...
 
double getAltimeter () const
 
double getAltitude () const
 Calculated from GPS.
 
ArDeviceConnectiongetDeviceConnection () const
 Return device connection in use (or NULL if none)
 
double getHDOP () const
 
double getMeanSNR () const
 dB
 
double getPDOP () const
 
double getVDOP () const
 
bool haveAltimeter () const
 
bool haveAltitude () const
 Calculated from GPS.
 
bool haveHDOP () const
 
bool havePDOP () const
 
bool haveSNR () const
 
bool haveVDOP () const
 
void lock ()
 
void logData () const
 Log last received data using ArLog.
 
void printData (bool labels=true) const
 
void printDataLabelsHeader () const
 
virtual int read (unsigned long maxTime=0)
 Read some data from the device connection, and update stored data as complete messages are received. More...
 
int readWithLock (unsigned int maxTime)
 
void removeNMEAHandler (const char *message)
 
void setDeviceConnection (ArDeviceConnection *deviceConn)
 Set device connection to use.
 
void setIgnoreChecksum (bool ignore)
 Set whether checksum sent with NMEA messages is ignored.
 
void unlock ()
 
bool haveBeaconInfo () const
 
double getBeaconSignalStrength () const
 dB
 
double getBeaconSNR () const
 dB
 
double getBeaconFreq () const
 kHz
 
unsigned short getBecaonBPS () const
 bitrate (bits per second)
 
unsigned short getBeaconChannel () const
 
bool haveErrorEllipse () const
 
ArPose getErrorEllipse () const
 
bool haveLatLonError () const
 
ArPose getLatLonError () const
 
double getLatitudeError () const
 
double getLongitudeError () const
 
bool haveAltitudeError () const
 
double getAltitudeError () const
 Standard deviation of altitude error, meters.
 
bool haveInputsRMS () const
 
double getInputsRMS () const
 
const ArGPS::Data & getCurrentDataRef () const
 
FixType getFixType () const
 
const char * getFixTypeName () const
 
bool havePosition () const
 
bool haveLatitude () const
 
bool haveLongitude () const
 
double getLatitude () const
 
double getLongitude () const
 
ArTime getTimeReceivedPosition () const
 
bool haveSpeed () const
 
double getSpeed () const
 
ArTime getGPSPositionTimestamp () const
 
int getNumSatellitesTracked () const
 
bool haveDGPSStation () const
 
unsigned short getDGPSStationID () const
 
bool haveGarminPositionError () const
 
double getGarminPositionError () const
 
bool haveGarminVerticalPositionError () const
 
double getGarminVerticalPositionError () const
 GPS device's error estimation in meters.
 
bool haveCompassHeadingMag () const
 Have a compass heading value relative to magnetic north.
 
bool haveCompassHeadingTrue () const
 Have a compass heading value relative to true north (using device's configured declination)
 
double getCompassHeadingMag () const
 Heading from magnetic north.
 
double getCompassHeadingTrue () const
 Heading from true north.
 
void setCompassHeadingMag (double val)
 
void setCompassHeadingTrue (double val)
 
void setCompassHeadingMagWithLock (double val)
 
void setCompassHeadingTrueWithLock (double val)
 

Protected Member Functions

virtual bool initDevice ()
 
- Protected Member Functions inherited from ArGPS
void handleGPGGA (ArNMEAParser::Message msg)
 
void handleGPGSA (ArNMEAParser::Message msg)
 
void handleGPGST (ArNMEAParser::Message msg)
 
void handleGPGSV (ArNMEAParser::Message msg)
 
void handleGPMSS (ArNMEAParser::Message msg)
 
void handleGPRMC (ArNMEAParser::Message msg)
 
void handleHCHDx (ArNMEAParser::Message msg)
 
void handlePGRME (ArNMEAParser::Message msg)
 
void handlePGRMZ (ArNMEAParser::Message msg)
 
void parseGPRMC (const ArNMEAParser::Message &msg, double &latitudeResult, double &longitudeResult, bool &qualityFlagResult, bool &gotPosition, ArTime &timeGotPositionResult, ArTime &gpsTimestampResult, bool &gotSpeedResult, double &speedResult)
 
bool readFloatFromString (std::string &str, double *target, double(*convf)(double)=NULL) const
 
bool readFloatFromStringVec (std::vector< std::string > *vec, size_t i, double *target, double(*convf)(double)=NULL) const
 
bool readTimeFromString (const std::string &s, ArTime *time) const
 
bool readUShortFromString (std::string &str, unsigned short *target, unsigned short(*convf)(unsigned short)=NULL) const
 
bool readUShortFromStringVec (std::vector< std::string > *vec, size_t i, unsigned short *target, unsigned short(*convf)(unsigned short)=NULL) const
 
bool waitForData (unsigned long timeout)
 

Additional Inherited Members

- Public Types inherited from ArGPS
enum  { ReadFinished = ArNMEAParser::ParseFinished, ReadError = ArNMEAParser::ParseError, ReadData = ArNMEAParser::ParseData, ReadUpdated = ArNMEAParser::ParseUpdated }
 Flags to indicates what the read() method did. i.e. If nothing was done, then the result will be 0. To check a read() return result result to see if data was updated, use (result & ReadUpdated). To check if there was an error, use (result & ReadError). More...
 
enum  FixType {
  NoFix, BadFix, GPSFix, DGPSFix,
  PPSFix, RTKinFix, FloatRTKinFix, DeadReckFix,
  ManualFix, SimulatedFix, UnknownFixType, OmnistarConverging = FloatRTKinFix,
  OmnistarConverged = RTKinFix
}
 Access the last received data from the GPS. More...
 
- Static Public Member Functions inherited from ArGPS
static const char * getFixTypeName (FixType type)
 
- Public Attributes inherited from ArGPS
enum ArGPS:: { ... }  ReadFlags
 Flags to indicates what the read() method did. i.e. If nothing was done, then the result will be 0. To check a read() return result result to see if data was updated, use (result & ReadUpdated). To check if there was an error, use (result & ReadError). More...
 
- Static Protected Member Functions inherited from ArGPS
static double feetToMeters (double f)
 
static double gpsDegminToDegrees (double degmin)
 
static double knotsToMPS (double knots)
 
static double metersToFeet (double m)
 
static double mpsToMph (double mps)
 
- Protected Attributes inherited from ArGPS
ArArgumentParsermyArgParser
 
bool myCreatedOwnDeviceCon
 
Data myData
 
ArDeviceConnectionmyDevice
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myGPGGAHandler
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myGPGSAHandler
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myGPGSTHandler
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myGPGSVHandler
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myGPMSSHandler
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myGPRMCHandler
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myHCHDxHandler
 
ArMutex myMutex
 
ArNMEAParser myNMEAParser
 
ArRetFunctorC< bool, ArGPSmyParseArgsCallback
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myPGRMEHandler
 
ArFunctor1C< ArGPS,
ArNMEAParser::Message
myPGRMZHandler
 
unsigned short mySNRNum
 
unsigned int mySNRSum
 

Detailed Description

GPS subclass to support the Trimble AgGPS and other Trimble GPS devices.

This subclass extends ArGPS to send initialization commands specific to Trimble GPS devices, and to handle the PTNLAG001 message which is specific to the Trimble GPS (this message contains data received from an auxilliary device connected to the GPS; ArTrimbleGPS simply parses its contents as a new NMEA message; i.e. data received by the Trimble is assumed to be NMEA messages that it forwards via the PTNLAG001 message.)

Note
You must also configure the ports using the Trimble AgRemote program (http://www.trimble.com/support_trl.asp?pt=AgRemote&Nav=Collection-1545). Enable the following messages on whichever GPS port the computer is connected to: GPRMC, GPGGA, GPGSA, GPGSV, GPGST, GPMSS, and set input (I) protocol to TSIP 38k baud, and output protocol (O) to NMEA 38k baud. This configuration is done by MobileRobots when shipping a Trimble AgGPS but you may need to do this if the GPS loses its configuration or after changing any other settings (Note that AgRemote resets the port settings each time it connects, so you must reset them each time before exiting AgRemote!)
Since
2.6.0

Member Function Documentation

bool ArTrimbleGPS::sendTSIPCommand ( char  command,
const char *  data,
size_t  dataLen 
)

Send a TSIP command to the Trimble GPS. See the TSIP Reference guide for details. Note, the data must be 66 characters or less.


The documentation for this class was generated from the following files: