vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_Tracker_GPS.h
Go to the documentation of this file.
1// vrpn_Tracker_GPS.h
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.
5
6#ifndef VRPN_TRACKER_GPS_H
7#define VRPN_TRACKER_GPS_H
8
9#include "vrpn_Configure.h" // for VRPN_API
10
11#include <stdio.h> // for FILE
12
13#include "gpsnmealib/nmeaParser.h" // for NMEAData, NMEAParser
14#include "gpsnmealib/utmCoord.h" // for UTMCoord
15#include "vrpn_Shared.h" // for timeval
16#include "vrpn_Tracker.h" // for VRPN_TRACKER_BUF_SIZE, etc
17
19
21
22 public:
23
24 vrpn_Tracker_GPS(const char *name,
26 const char *port = "/dev/ttyS1",
27 long baud = 4800,
28 int utmFlag = 1, // report in UTM coordinates if possible
29 int testFileFlag = 0,
30 const char* startStr = "RMC"); // the sentence to use as the "start" of a sequence
31
33
34
39
40 // virtual void mainloop();
41
42 protected:
43 // need a bigger buffer
44 unsigned char buffer[VRPN_TRACKER_BUF_SIZE*10];// Characters read in from the tracker so far
45
46 virtual int get_report(void);
47 virtual void reset();
48
49 struct timeval reset_time;
50
51 FILE *testfile;
52 char testfilename[256];
53
54 // an nmeaParser object and associated data objects
55 NMEAData nmeaData;
56 NMEAParser nmeaParser;
57 UTMCoord utmCoord;
58 int useUTM;
59};
60
61#endif
Generic connection class not specific to the transport mechanism.
vrpn_Tracker_GPS(const char *name, vrpn_Connection *c, const char *port="/dev/ttyS1", long baud=4800, int utmFlag=1, int testFileFlag=0, const char *startStr="RMC")
struct timeval reset_time
virtual int get_report(void)
Gets a report if one is available, returns 0 if not, 1 if complete report.
virtual void reset()
Reset the tracker.
unsigned char buffer[VRPN_TRACKER_BUF_SIZE *10]
This function should be called each time through the main loop of the server code....
#define VRPN_API
#define VRPN_TRACKER_BUF_SIZE