C++ SDK

◆ GetActualGpsPosition()

static int CApplicationAPI::GetActualGpsPosition ( LpError  lpError,
SGpsPosition lpGpsPosition,
BOOL  bSatellitesInfo,
DWORD  dwMaxTime = DEFAULT_MAX_TIME 
)
static

The function returns informations about actual GPS position.

Parameters
lpErrorAdditional error information returned from Drive.
lpGpsPositionReference to instance of SGpsPosition enum which contains informations about GPS position.
bSatellitesInfoFlag determining whether function should return satellites information.
dwMaxTimeMaximum time (in milliseconds) function can take. If dwMaxTime=0 function execution is not time limited.
Returns
1 if successful, other value otherwise.

The function GetActualGpsPosition needs Drive to have valid GPS position. If valid GPS position is not present GetActualGpsPosition returns 0 and GpsPosition (see SGpsPosition struct) members are set to 0.

Possible error codes returned from Drive are:

  • 0 - Function not succeeded.
  • 1 - Function succeeded.
  • 2 - Drive not succeeded.
  • 3 - Function reached timeout.
  • -1 - No fix.
  • -2 - GPS position not available.