2
// This file contains the header for the VRPN GPS server. This server
3
// reads NMEA messages from a serial GPS.
4
// This implementation can convert to UTM meter-based coordinates.
6
#ifndef VRPN_TRACKER_GPS_H
7
#define VRPN_TRACKER_GPS_H
17
#include "vrpn_Tracker.h"
18
#include "vrpn_Button.h"
19
#include "vrpn_Analog.h"
21
#include "gpsnmealib/nmeaParser.h"
22
#include "gpsnmealib/utmCoord.h"
23
#include "gpsnmealib/latLonCoord.h" //-eb
25
class vrpn_Tracker_GPS: public vrpn_Tracker_Serial {
29
vrpn_Tracker_GPS(const char *name,
31
const char *port = "/dev/ttyS1",
33
int utmFlag = 1, // report in UTM coordinates if possible
35
const char* startStr = "RMC"); // the sentence to use as the "start" of a sequence
40
/// This function should be called each time through the main loop
41
/// of the server code. It polls for a report from the tracker and
42
/// sends it if there is one. It will reset the tracker if there is
43
/// no data from it for a few seconds.
45
// virtual void mainloop();
48
// need a bigger buffer
49
unsigned char buffer[VRPN_TRACKER_BUF_SIZE*10];// Characters read in from the tracker so far
51
virtual int get_report(void);
54
struct timeval reset_time;
57
char testfilename[256];
59
// an nmeaParser object and associated data objects
61
NMEAParser nmeaParser;