LinksPoint GPS Toolkit Reference
GpsInitializeEx
gpsapi.h | Generic GPS Functions | See Also
Initializes the GPS Toolkit optionally via Windows Sockets instead of a serial port.
Parameters
Parameters Description
long lPort Specifies the communications port
unsigned long ulBaudRate Specifies the baud rate
GPSPROTOCOL gpProtocol Specifies the protocol
GPSENABLE geEnable GPSENABLE_TRUE enables the use of the GPS; GPSENABLE_FALSE disables it.
LPCTSTR lpszBluetoothAddress Specifies the Bluetooth address in the form "00.00.00.00.00.00" for the GPS if a connection is being made via Windows Sockets. If this valus is NULL, then lPort and ulBaudrate will be used instead for a seral connection.
unsigned short usChannel Specifies the Bluetooth channel number for the socket connection. Only used if lpszBluetooth is not NULL.
Return Value
If the GPS library is successfully initialized, then the return value will be GPSERROR_NONE. Otherwise, it will be one of the following error codes: GPSERROR_INVALID_PARAMETER, GPSERROR_MATHLIB (Palm OS)
Remarks
  • See the Autodetect topic for special settings to initiate an automatic GPS receiver detection.

  • Set geEnable to false and use GpsEnable to start the GPS later if the application needs to set up objects before the GPS communications start.
Windows

  • The iPort value should be 1 for COM1:, 2 for COM2:, etc.

  • When enabled with geEnable = GPSENABLE_TRUE, the GPS library will start a new thread that constantly monitors the GPS device.
Palm OS

  • The iPort value will represent the number of the port as reported by the GpsGetPortList function. For example, a value of 1 represents the first entry in the port list, 2 represents the second entry in the port list, etc.

  • The GpsInitialize function will also initialize the MathLib 1.1 library, allowing your application to use any of the MathLib 1.1 floating point functions.
See Also
Group
Declaration
GPSERROR GPSAPI GpsInitializeEx(long lPort, unsigned long ulBaudRate, GPSPROTOCOL gpProtocol, GPSENABLE geEnable, LPCTSTR lpszBluetoothAddress, unsigned short usChannel);
File
Links
Copyright ©1998-2005 Links Point Inc.