gps.h
来自「GPS定位系统,可以与GPS相连接,也可以与与电子地图等相连接.」· C头文件 代码 · 共 109 行
H
109 行
/*
Module : GPS.H
Purpose: "C" style interface to GPS32
Created: PJN / 28-12-1997
History: None
Copyright (c) 1997 by PJ Naughter.
All rights reserved.
*/
#ifndef __GPS_H__
#define __GPS_H__
#ifdef __cplusplus
extern "C" {
#endif
#define GPS_MaxDeviceName 256
DECLARE_HANDLE( HGPS );
#define LPHGPS HGPS*
#define GpsQualityFixNotAvailable 0
#define GpsQualityFix 1
#define GpsQualityDifferentialFix 2
#define GpsParityNone 0
#define GpsParityOdd 1
#define GpsParityEven 2
#define GpsStopBits1 0
#define GpsStopBits1Point5 1
#define GpsStopBits2 2
typedef struct tagGPSDEVINFO
{
TCHAR szDeviceName[ GPS_MaxDeviceName + 1 ]; /* Name of the GPS Device */
BOOL bDefaultReceiver; /* Is this GPS Device the default receiver */
WORD wCommPort; /* What Comms Port is being used */
DWORD dwCommBaudRate; /* Baud rate of the comms port being used */
WORD wCommDataBits; /* Data bits of the comms port being used */
WORD wCommParity; /* enum of the type of parity of the comms port being used */
WORD wCommStopBits; /* enum of the stop bits of the comms port being used */
} GPSDEVINFO, *PGPSDEVINFO, NEAR *NGPSDEVINFO, FAR *LPGPSDEVINFO;
typedef CONST FAR GPSDEVINFO *LPCGPSDEVINFO;
typedef struct tagGPSPOSITION
{
/* Latitude information (From GPRMC) */
BOOL bNorthing; /* TRUE if North, FALSE if south of equator */
DWORD dwLatitude; /* latitude in hundreths of seconds of a degree */
/* longitude information (From GPRMC) */
BOOL bEasting; /* TRUE if east, FALSE if west of Greenwich Prime Meridian */
DWORD dwLongitude; /* longitude in hundreths of seconds of a degree */
/* Bearing information (From GPRMC) */
DWORD dwBearing; /* bearing in hundreths of degrees East of North */
/* Speed information (From GPRMC) */
DWORD dwSpeed; /* Speed in Centimeters / Hour */
/* Time of fix (from GPRMC) */
WORD wFixYear;
WORD wFixMonth;
WORD wFixDay;
WORD wFixHour;
WORD wFixMinute;
WORD wFixSecond;
/* Satellite info (from GPGGA) */
WORD nSatellites; /* Number of satellites in view
/* altitude information (From GPGGA) */
DWORD dwAntennaAltitude; /* Altitude in Centimeters above mean sea level */
//Quality Indicator (from GPGGA)
WORD wQualityIndicator; /* enum of the GPS Quality Indicator */
} GPSPOSITION, *PGPSPOSITION, NEAR *NGPSPOSITION, FAR *LPGPSPOSITION;
typedef CONST FAR GPSPOSITION *LPCGPSPOSITION;
BOOL GpsShowControlPanel();
BOOL GpsCreateEntry(HWND hWnd);
DWORD GpsGetNumDevices();
DWORD GpsEnumDevices(LPGPSDEVINFO lpGpsDevInfo, DWORD dwRequestedDevices);
BOOL GpsDeleteEntry(LPCTSTR lpszEntry);
BOOL GpsRenameEntry(LPCTSTR lpszOldEntry, LPCTSTR lpszNewEntry);
BOOL GpsPropertiesDlg(HWND hWnd, LPCTSTR lpszEntry);
HGPS GpsOpen(LPCTSTR lpszEntry);
BOOL GpsClose(HGPS hEntry);
BOOL GpsGetPosition(HGPS hEntry, LPGPSPOSITION lpPosition);
DWORD GpsGetVersion();
BOOL GpsDeviceNameAlreadyExists(LPCTSTR lpszEntry);
void GpsShowAboutBox(HWND hWnd);
BOOL GpsGetDevice(LPCTSTR lpszEntry, LPGPSDEVINFO lpGpsDevInfo);
BOOL GpsSetDevice(LPCTSTR lpszEntry, LPCGPSDEVINFO lpGpsDevInfo);
#ifdef __cplusplus
}
#endif
#endif //__GPS_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?