⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gps.h

📁 这是一个简单的软件开发包(SDK)
💻 H
字号:
/*
Module : GPS.H
Purpose: "C" style interface to GPS32
Created: PJN / 28-12-1997

Copyright (c) 1997 - 2001 by PJ Naughter.  (Web: www.naughter.com, Email: pjna@naughter.com)

All rights reserved.

Copyright / Usage Details:

You are allowed to include the source code in any product (commercial, shareware, freeware or otherwise) 
when your product is released in binary form. You are allowed to modify the source code in any way you want 
except you cannot modify the copyright details at the top of each module. If you want to distribute source 
code with your application, then you are only allowed to distribute versions released by the author. This is 
to maintain a single distribution point for the source code. 

*/

#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  WINAPI GpsShowControlPanel();
BOOL  WINAPI GpsCreateEntry(HWND hWnd);
DWORD WINAPI GpsGetNumDevices();
DWORD WINAPI GpsEnumDevices(LPGPSDEVINFO lpGpsDevInfo, DWORD dwRequestedDevices);
BOOL  WINAPI GpsDeleteEntry(LPCTSTR lpszEntry);
BOOL  WINAPI GpsRenameEntry(LPCTSTR lpszOldEntry, LPCTSTR lpszNewEntry);
BOOL  WINAPI GpsPropertiesDlg(HWND hWnd, LPCTSTR lpszEntry);
HGPS  WINAPI GpsOpen(LPCTSTR lpszEntry);
BOOL  WINAPI GpsClose(HGPS hEntry);
BOOL  WINAPI GpsGetPosition(HGPS hEntry, LPGPSPOSITION lpPosition);
DWORD WINAPI GpsGetVersion();
BOOL  WINAPI GpsDeviceNameAlreadyExists(LPCTSTR lpszEntry);
void  WINAPI GpsShowAboutBox(HWND hWnd);
BOOL  WINAPI GpsGetDevice(LPCTSTR lpszEntry, LPGPSDEVINFO lpGpsDevInfo);
BOOL  WINAPI GpsSetDevice(LPCTSTR lpszEntry, LPCGPSDEVINFO lpGpsDevInfo);

#ifdef __cplusplus
}
#endif


#endif //__GPS_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -