RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_Tracker_GPS.h
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
18class VRPN_API vrpn_Connection;
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_Connection.h:562
定义 vrpn_Tracker_GPS.h:20
unsigned char buffer[VRPN_TRACKER_BUF_SIZE *10]
定义 vrpn_Tracker_GPS.h:44
virtual int get_report(void)
virtual void reset()
Reset the tracker.
定义 vrpn_Tracker.h:144