Initial commit of files
This commit is contained in:
70
include/libgps++/GpsdClient.h
Normal file
70
include/libgps++/GpsdClient.h
Normal file
@ -0,0 +1,70 @@
|
||||
//
|
||||
// Linux GPS
|
||||
//
|
||||
|
||||
/* prevent multiple inclusions */
|
||||
#ifndef __GpsdClient__
|
||||
#define __GpsdClient__
|
||||
|
||||
/* includes *****************************************************************/
|
||||
|
||||
#include "TcpClient.h"
|
||||
#include "netlib.h"
|
||||
|
||||
/* defines ******************************************************************/
|
||||
|
||||
/* macros *******************************************************************/
|
||||
|
||||
/* structs & typedefs *******************************************************/
|
||||
|
||||
/* c class definitions ******************************************************/
|
||||
|
||||
//
|
||||
// Connect to http://gpsd.berlios.de/ GPSD
|
||||
//
|
||||
class GpsdClient : public TcpClient {
|
||||
// public data
|
||||
public:
|
||||
int Fix;
|
||||
int Satellites;
|
||||
|
||||
struct timespec Time;
|
||||
double Latitude;
|
||||
double Longitude;
|
||||
double Elevation;
|
||||
double Heading;
|
||||
double Speed;
|
||||
|
||||
// protected data
|
||||
protected:
|
||||
|
||||
// private data
|
||||
private:
|
||||
|
||||
// static data
|
||||
|
||||
// private methods
|
||||
|
||||
// public methods
|
||||
public:
|
||||
// constructors
|
||||
GpsdClient();
|
||||
GpsdClient( const char *host );
|
||||
|
||||
// destructor
|
||||
virtual ~GpsdClient();
|
||||
|
||||
// virtual functions
|
||||
|
||||
// public methods
|
||||
int GpsdParse( char *msg );
|
||||
int GpsdConnect( const char *host = "localhost" );
|
||||
|
||||
int GpsdRead( void );
|
||||
int GpsdWrite( const char *msg, int max );
|
||||
|
||||
int Gpsd2Vii( char *buf, int max );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user