DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Detailed Description

Defines the GPS sensor.

Note
SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Data Structures

struct  dwGPSFrame
 A GPS packet containing localization information. More...
 

Enumerations

enum  dwGPSFlags {
  DW_GPS_LAT = 1 << 0,
  DW_GPS_LON = 1 << 1,
  DW_GPS_ALT = 1 << 2,
  DW_GPS_COURSE = 1 << 3,
  DW_GPS_SPEED = 1 << 4,
  DW_GPS_CLIMB = 1 << 5,
  DW_GPS_HDOP = 1 << 6,
  DW_GPS_VDOP = 1 << 7,
  DW_GPS_HACC = 1 << 8,
  DW_GPS_VACC = 1 << 9
}
 Each flag shows if that value is valid in this GPS frame. More...
 

Functions

DW_API_PUBLIC dwStatus dwSensorGPS_popFrame (dwGPSFrame *frame, dwSensorHandle_t sensor)
 Returns any GPS frame previously processed through RAW data stream. More...
 
DW_API_PUBLIC dwStatus dwSensorGPS_processRawData (const uint8_t *data, size_t size, dwSensorHandle_t sensor)
 Decodes RAW data previously read. More...
 
DW_API_PUBLIC dwStatus dwSensorGPS_readFrame (dwGPSFrame *frame, dwTime_t timeout_us, dwSensorHandle_t sensor)
 Reads the next GPS packet with a given timeout. More...
 

Data Structure Documentation

◆ dwGPSFrame

struct dwGPSFrame
Data Fields
float64_t altitude Altitude over WGS84 ellipsoid [m].
float64_t climb Vertical speed [m/s].
float64_t course Course relative to true north [degree].
uint32_t flags The flags to show which values are valid in this GPS frame.
float64_t hacc Horizontal accuracy [m].
float64_t hdop Horizontal dilution of precision (HDOP).
float64_t latitude Latitude [degree].
float64_t longitude Longitude [degree].
float64_t speed Horizontal speed [m/s].
dwTime_t timestamp_us Timestamp of the message when first received [usec].
char utcDate[16] UTC date as provided in the GPS package [ddmmyy] (null terminated).
char utcTime[16] UTC time as provided in the GPS package [hhmmss.sss] (null terminated).
float64_t vacc Vertical accuracy [m].
float64_t vdop Vertical dilution of precision (VDOP).

Enumeration Type Documentation

◆ dwGPSFlags

enum dwGPSFlags

Each flag shows if that value is valid in this GPS frame.

Enumerator
DW_GPS_LAT 

Value of dwGPSFrame.latitude is valid.

DW_GPS_LON 

Value of dwGPSFrame.longitude is valid.

DW_GPS_ALT 

Value of dwGPSFrame.altitude is valid.

DW_GPS_COURSE 

Value of dwGPSFrame.course is valid.

DW_GPS_SPEED 

Value of dwGPSFrame.speed is valid.

DW_GPS_CLIMB 

Value of dwGPSFrame.climb is valid.

DW_GPS_HDOP 

Value of dwGPSFrame.hdop is valid.

DW_GPS_VDOP 

Value of dwGPSFrame.vdop is valid.

DW_GPS_HACC 

Value of dwGPSFrame.hacc is valid.

DW_GPS_VACC 

Value of dwGPSFrame.vacc is valid.

Definition at line 63 of file GPS.h.

Function Documentation

◆ dwSensorGPS_popFrame()

DW_API_PUBLIC dwStatus dwSensorGPS_popFrame ( dwGPSFrame frame,
dwSensorHandle_t  sensor 
)

Returns any GPS frame previously processed through RAW data stream.

This happens on the CPU thread where the function is called, incurring an additional load on that thread.

Parameters
[out]framePointer to an GPS frame structure to be filled with new data.
[in]sensorSensor handle of the sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_INVALID_HANDLE - if given sensor handle is invalid.
DW_INVALID_ARGUMENTS - if given arguments are invalid.
DW_NOT_AVAILABLE - if no more data is available
DW_SUCCESS

◆ dwSensorGPS_processRawData()

DW_API_PUBLIC dwStatus dwSensorGPS_processRawData ( const uint8_t *  data,
size_t  size,
dwSensorHandle_t  sensor 
)

Decodes RAW data previously read.

Any processed messages can be picked up using the dwSensorGPS_popMessage() method. This happens on the CPU thread where the function is called, incurring on additional load on that thread.

Parameters
[in]dataUndecoded gps data.
[in]sizeSize in bytes of the raw data.
[in]sensorSensor handle of the sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_INVALID_HANDLE - if given sensor handle is invalid,
DW_INVALID_ARGUMENTS - if given arguments are invalid,
DW_NOT_READY - if more data needs to be passed in (loop while it returns 'DW_NOT_READY').
DW_SUCCESS

◆ dwSensorGPS_readFrame()

DW_API_PUBLIC dwStatus dwSensorGPS_readFrame ( dwGPSFrame frame,
dwTime_t  timeout_us,
dwSensorHandle_t  sensor 
)

Reads the next GPS packet with a given timeout.

The method blocks until either a new valid frame is received from the sensor or the given timeout exceeds.

Parameters
[out]frameA pointer to a GPS frame structure to be filled with new localization data.
[in]timeout_usSpecifies the timeout in us to wait for a new message. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue.
[in]sensorSpecifies the sensor handle of the GPS sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_INVALID_HANDLE - if given sensor handle is invalid.
DW_INVALID_ARGUMENTS - if given arguments are invalid.
DW_TIME_OUT - if operation has timeout.
DW_NOT_AVAILABLE - if sensor has not been started or data is not available in polling mode.
DW_END_OF_STREAM - if end of stream reached (virtual sensor only).
DW_SAL_SENSOR_ERROR - if there was an i/o or bus error.
DW_SUCCESS