DriveWorks SDK Reference
5.12.103 Release
For Test and Development only

Detailed Description

Defines the GPS sensor.

Data Structures

struct  dwGPSFrameNew
 This structure contains one frame of data from an GPS/GNSS sensor. More...
 

Functions

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

Data Structure Documentation

◆ dwGPSFrameNew

struct dwGPSFrameNew
Data Fields
float64_t altitude
Note
ID VS-91040
description Altitude over WGS-84 ellipsoid.
min nan max nan
freq 4 unit m
float64_t climb
Note
ID VS-91070
description Vertical speed.
min nan max nan
freq 4 unit m/s
float64_t course
Note
ID VS-91050
description Course relative to true north.
min nan max nan
freq 4 unit deg
dwGPSFixStatus fixStatus
Note
ID VS-91150
description 2D or 3D fix.
TODO: Backend not yet implemented
min nan max nan
freq 4 unit -
*** valid values**: { DW_GPS_FIX_STATUS_NO_FIX, DW_GPS_FIX_STATUS_2D_FIX, DW_GPS_FIX_STATUS_3D_FIX }
float64_t hacc
Note
ID VS-91110
description Horizontal Accuracy of Solution.
min nan max nan
freq 4 unit m
float64_t hdop
Note
ID VS-91080
description Horizontal Dilution of Precision.
min nan max nan
freq 4 unit unitless
float64_t latitude
Note
ID VS-91020
description Latitude in WGS-84.
min nan max nan
freq 4 unit deg
float64_t longitude
Note
ID VS-91030
description Longitude in WGS-84.
min nan max nan
freq 4 unit deg
dwGPSMode mode
Note
ID VS-91175
description GPS mode.
TODO: Backend not yet implemented
min nan max nan
freq 4 unit -
*** valid values**: { DW_GPS_MODE_UNKNOWN, DW_GPS_MODE_INVALID_GPS, DW_GPS_MODE_DEAD_RECKONING, DW_GPS_MODE_STAND_ALONE, DW_GPS_MODE_PRECISE_POINT, DW_GPS_MODE_CODE_DIFFERENTIAL, DW_GPS_MODE_RTK_FLOAT, DW_GPS_MODE_RTK_FIXED, DW_GPS_MODE_PPP_CONVERGING, DW_GPS_MODE_PPP_CONVERGED }
float64_t pdop
Note
ID VS-91100
description Position Dilution of Precision.
min nan max nan
freq 4 unit unitless
uint8_t reserved[508] Reserved space.
uint8_t satelliteCount
Note
ID VS-91140
description Number of satellites in view.
TODO: Backend not yet implemented
min nan max nan
freq 4 unit unitless
float64_t speed
Note
ID VS-91060
description Horizontal speed.
min nan max nan
freq 4 unit m/s
dwTime_t timestamp_us
Note
ID VS-91010
description Timestamp of the message when first received.
min nan max nan
freq 4 unit us
dwGPSTimestampQuality timestampQuality
Note
ID VS-91170
description GNSS Timestamp Quality.
TODO: Backend not yet implemented
min nan max nan
freq 4 unit -
*** valid values**: { DW_GPS_TIMESTAMP_QUALITY_NOT_INIT, DW_GPS_TIMESTAMP_QUALITY_OK, DW_GPS_TIMESTAMP_QUALITY_SYNC_LOST, }
dwTime_t utcTime
Note
ID VS-91130
description UTC time.
min nan max nan
freq 4 unit us
float64_t vacc
Note
ID VS-91120
description Vertical Accuracy of Solution.
min nan max nan
freq 4 unit m
dwGPSSignalValidityInfo validityInfo Signal validity information.
float64_t vdop
Note
ID VS-91090
description Vertical Dilution of Precision.
min nan max nan
freq 4 unit unitless

Function Documentation

◆ dwSensorGPS_popFrame()

DW_API_PUBLIC dwStatus dwSensorGPS_popFrame ( dwGPSFrame *const  frame,
dwSensorHandle_t const  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_popFrameNew()

DW_API_PUBLIC dwStatus dwSensorGPS_popFrameNew ( dwGPSFrameNew *const  frame,
dwSensorHandle_t const  sensor 
)

Returns any GPS frame New 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 New 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 ( uint8_t const *const  data,
size_t const  size,
dwSensorHandle_t const  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_processRawDataNew()

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

Decodes RAW data previously read.

Any processed messages can be picked up using the dwSensorGPS_popMessageNew() 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 *const  frame,
dwTime_t const  timeoutUs,
dwSensorHandle_t const  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]timeoutUsSpecifies 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

◆ dwSensorGPS_readFrameNew()

DW_API_PUBLIC dwStatus dwSensorGPS_readFrameNew ( dwGPSFrameNew *const  frame,
dwTime_t const  timeoutUs,
dwSensorHandle_t const  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 New structure to be filled with new localization data.
[in]timeoutUsSpecifies 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