Navigation SDK Documentation

Functions

Functions

SDK_ERROR SDK_API SDK_OpenGPSDevice (const SDK_GPSConfig *pGPSConfig, SDK_INT4 *pAddInfo)
 
SDK_ERROR SDK_API SDK_QueryGPSDevice (SDK_GPSData *pGPSData, SDK_INT4 *pAddInfo)
 
SDK_ERROR SDK_API SDK_PushNMEA (const SDK_CHAR_T *pNMEAData)
 
SDK_ERROR SDK_API SDK_SetLocation (const SDK_GPSData *gpsData)
 
SDK_ERROR SDK_API SDK_GetSatelliteInfo (SDK_INT4 index, SDK_BOOL bInView, SDK_GPSSatInfo *pSatelliteInfo)
 
SDK_ERROR SDK_API SDK_CloseGPSDevice ()
 

Detailed Description

Functions for GPS.

Function Documentation

SDK_ERROR SDK_API SDK_OpenGPSDevice ( const SDK_GPSConfig pGPSConfig,
SDK_INT4 pAddInfo 
)

Open GPS (and TMC) device.

Open GPS and TMC devices so that data may be retrieved.

Any TMC functionality requires the suitable gpstmc.dll to be in the current/application's directory, or in libpath. Otherwise SDK_ERROR_MissingComponent is being returned.

This call may take a few seconds because of a) verifying that a valid device is attached, b) loading new (language) databases for TMC. It's important to evaluate the return values of this API before calling SDK_QueryGPSDevice().

Parameters
[in]pGPSConfigpointer to configuration struct to hold all information about the GPS device to be opened. See SDK_GPSConfig for information about the various configuration options.
[out]pAddInfoIf given it may be filled with additional information about the status of the GPS device. Those values are not documented but should be used for bug reports.
Returns
Error code (Errorcodes)
SDK_ERROR SDK_API SDK_QueryGPSDevice ( SDK_GPSData pGPSData,
SDK_INT4 pAddInfo 
)

Query GPS device for data.

Parameters
[out]pGPSDatapointer to structure to be filled with current GPS information
[out]pAddInfoIf given it may be filled with additional information about the status of the GPS device. Those values are not documented but should be used for bug reports and help the vendor in analyzing GPS/TMC problems.
Returns
Error code (Errorcodes) Note that SDK_ERROR_NoPositionData (valid data but w/o positional information) and SDK_ERROR_GPSNoData (could not read data, typical a pulsed data feed!) are error codes which should be treated as a non-critical situation at first. Applications may have to implement their own time-out mechanisms to detect real error situation if the GPS data feed is actually (permanently) broken.
SDK_ERROR SDK_API SDK_PushNMEA ( const SDK_CHAR_T pNMEAData)

Feed NMEA data to Navigation SDK.

By feeding (continuous) NMEA data the Navigation SDK is able to parse it and supply all relevant information via subsequent calls to SDK_QueryGPSDevice(). To use this call the device must be configured in "passive mode", check out the documentation for SDK_OpenGPSDevice() and SDK_GPSConfig.

Parameters
[in]pNMEADataValid excerpt of NMEA data. It doesn't have to be a complete sentence and can be trucated anywhere in the data stream. But it shall be a part of a proper NMEA data stream.
Returns
Error code (Errorcodes). SDK_ERROR_AlreadyInitialized indicates that the device is not configured in passive mode properly.
SDK_ERROR SDK_API SDK_SetLocation ( const SDK_GPSData gpsData)

Set the current location directly. The location is given as SDK_GPSData structure.

This interface is mainly used if the operating system provides some kind of location manager and you want to use this location data directly. To use this call the device must be configured in "passive mode", and the SDK_OpenGPSDevice has to be called with a SDK_GPSConfig structure for which the member useLocationDirectly is set to true. Otherwise the wrong type of Gps provider will be used.

Parameters
[in]gpsDataThe current location as SDK_GPSData data structure.
Returns
Error code (Errorcodes). If the input data is corrupt one of the following error codes could be delivered:
  • SDK_ERROR_InvalidParameter
  • SDK_ERROR_BasicTypeMismatch
  • SDK_ERROR_VersionMismatch
  • SDK_ERROR_BasicTypeMismatch
  • SDK_ERROR_VersionMismatch
  • SDK_ERROR_BasicTypeMismatch
  • SDK_ERROR_VersionMismatch
If the Gps devices is not initialized SDK_ERROR_NoGPSDevice will be returned and if the connection is not open SDK_ERROR_AlreadyInitialized will be returned.
SDK_ERROR SDK_API SDK_GetSatelliteInfo ( SDK_INT4  index,
SDK_BOOL  bInView,
SDK_GPSSatInfo pSatelliteInfo 
)

Query detail information about satellite info.

This interface returns information about a satellite currently in view.

Parameters
[in]indexThe number of the satellite to retrieve info for.
[in]bInViewIf true, return satellite in view with given index. If false, return satellite with given index that is used for gps position.
[out]pSatelliteInfoHolds the pointer to the returned SDK_GPSSatInfo
Returns
Error code (Errorcodes). SDK_ERROR_NoGPSDevice if GPS device is closed
SDK_ERROR SDK_API SDK_CloseGPSDevice ( )

Close GPS (and TMC) device.

After the GPS (TMC) device has been closed no more access to those devices via SDK_QueryGPSDevice() is possible. Application programmers may want to store the last position information just before calling this.

Returns
Error code

© PTV Group 2018 Generated on Mon Dec 17 2018 21:00:19 for NavigationSDK by doxygen 1.8.8