Defines A API for the GPSsensor.
Data Structures | |
| struct | dwGPSSignalValidityInfo |
| This structure contains validity of each signal provided by GPS sensors. More... | |
| struct | dwGPSFrame |
| A GPS packet containing localization information. More... | |
Typedefs | |
| typedef enum dwGPSTimestampFormat | dwGPSTimestampFormat |
| Timestamp format of the GPS sensor, should be identical to dwVioTimestampFormat(i.e. each field should have identical meaning and value). More... | |
| typedef enum dwGPSJamState | dwGPSJamState |
| The GPS jam state gives jamming state detected by the GNSS-receiver. More... | |
| typedef enum dwGPSSpoofState | dwGPSSpoofState |
| The GPS spoof state gives spoofing-state detected by the GNSS-receiver. More... | |
| typedef enum dwGPSMode | dwGPSMode |
| The GPS mode gives the status of the GNSS data. More... | |
| typedef enum dwGPSFixStatus | dwGPSFixStatus |
| GPS satellite fix status. More... | |
| typedef enum dwGPSTimestampQuality | dwGPSTimestampQuality |
| GPS timestamp quality. More... | |
| typedef enum dwGPSAlignmentStatus | dwGPSAlignmentStatus |
| High rate data output from GNSS-IMU device requires fusion of GNSS and IMU. More... | |
| typedef struct dwGPSSignalValidityInfo | dwGPSSignalValidityInfo |
| This structure contains validity of each signal provided by GPS sensors. More... | |
| typedef struct dwGPSFrame | dwGPSFrame |
| A GPS packet containing localization information. More... | |
Functions | |
| DW_API_PUBLIC dwStatus | dwSensorGPS_readFrame (dwGPSFrame *const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor) |
| Reads the next available GPS data frame with a given timeout. 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_popFrame (dwGPSFrame *const frame, dwSensorHandle_t const sensor) |
| Returns any GPS frame previously processed through RAW data stream. More... | |
| typedef enum dwGPSAlignmentStatus dwGPSAlignmentStatus |
High rate data output from GNSS-IMU device requires fusion of GNSS and IMU.
The data can only be accurate if the GNSS/IMU device has gone through an internal alignment initialization, which allows the device to know the orientation of the GPS. This status indicates the quality of GPS alignment.
| typedef enum dwGPSFixStatus dwGPSFixStatus |
GPS satellite fix status.
| typedef struct dwGPSFrame dwGPSFrame |
A GPS packet containing localization information.
Flags are used to define information available in this frame.
| typedef enum dwGPSJamState dwGPSJamState |
The GPS jam state gives jamming state detected by the GNSS-receiver.
The GPS mode gives the status of the GNSS data.
Note that modes 1-7 are increasing in accuracy. Modes 8 and 9 are not quite as good as 6 and 7, respectively.
| typedef struct dwGPSSignalValidityInfo dwGPSSignalValidityInfo |
This structure contains validity of each signal provided by GPS sensors.
Access fields in this structure with APIs provided by SignalStatus.h
| typedef enum dwGPSSpoofState dwGPSSpoofState |
The GPS spoof state gives spoofing-state detected by the GNSS-receiver.
| typedef enum dwGPSTimestampFormat dwGPSTimestampFormat |
Timestamp format of the GPS sensor, should be identical to dwVioTimestampFormat(i.e. each field should have identical meaning and value).
| typedef enum dwGPSTimestampQuality dwGPSTimestampQuality |
GPS timestamp quality.
| enum dwGPSAlignmentStatus |
High rate data output from GNSS-IMU device requires fusion of GNSS and IMU.
The data can only be accurate if the GNSS/IMU device has gone through an internal alignment initialization, which allows the device to know the orientation of the GPS. This status indicates the quality of GPS alignment.
Definition at line 169 of file GPSFrame.h.
| enum dwGPSFixStatus |
GPS satellite fix status.
| Enumerator | |
|---|---|
| DW_GPS_FIX_STATUS_NO_FIX | No fix. |
| DW_GPS_FIX_STATUS_2D_FIX | 2D fix |
| DW_GPS_FIX_STATUS_3D_FIX | 3D fix |
| DW_GPS_FIX_STATUS_FORCE32 | |
Definition at line 134 of file GPSFrame.h.
| enum dwGPSJamState |
The GPS jam state gives jamming state detected by the GNSS-receiver.
Definition at line 52 of file GPSFrame.h.
| enum dwGPSMode |
The GPS mode gives the status of the GNSS data.
Note that modes 1-7 are increasing in accuracy. Modes 8 and 9 are not quite as good as 6 and 7, respectively.
Definition at line 97 of file GPSFrame.h.
| enum dwGPSSpoofState |
The GPS spoof state gives spoofing-state detected by the GNSS-receiver.
Definition at line 74 of file GPSFrame.h.
| enum dwGPSTimestampFormat |
Timestamp format of the GPS sensor, should be identical to dwVioTimestampFormat(i.e. each field should have identical meaning and value).
Definition at line 33 of file GPSFrame.h.
GPS timestamp quality.
Definition at line 150 of file GPSFrame.h.
| 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.
@req{GID-AV_REQ-6792434}
This function returns only the first single decoded GPS frame from cached GPS frames(and removes it from cache). If no frames are available in queue, DW_NOT_AVAILABLE is returned and no GPS frame is returned.
This function should only be called after sensor is started. From above descriptions, this function requires previous callings to function dwSensorGPS_readFrame or dwSensorGPS_processRawData returns success otherwise this function will return DW_NOT_AVAILABLE.
This function is a synchronous function. Customers have to wait till the polling of GPS frame queue is finished.
| [out] | frame | Pointer to an GPS frame structure to be filled with new data. |
| [in] | sensor | Sensor handle of the sensor previously created with 'dwSAL_createSensor()'. |
| 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.
@req{GID-AV_REQ-6792439}
This API function will achieve functionality of this software unit:
This API function will push specified GPS sensor packet into its internal GPS decoders. Since internal GPS decoder will return once an GPS frame is decoded, or no GPS frames could be decoded from remaining bytes from specified GPS sensor packet, thus this API function will keep driving the decoder to return as many GPS frames as possible, until decoder could return no new GPS frames. All decoded GPS frames are cached internally and could be accessed by dwSensorGPS_readFrame() or dwSensorGPS_popFrame(). Based on sensor configuration value 'output-timestamp=', decoded GPS frames would be modified in their hostTimestamp field values accordingly.
This function should only be called after sensor is started, and with raw GPS sensor packet(s) returned from dwSensor_readRawData. After this raw sensor packet is processed by this function, user should also call dwSensor_returnRawData to return the memory block to SAL.
This function is a synchronous function. Customers have to wait till the raw GPS sensor data is processed.
| [in] | data | Undecoded gps data. |
| [in] | size | Size in bytes of the raw data. |
| [in] | sensor | Sensor handle of the sensor previously created with 'dwSAL_createSensor()'. |
| DW_API_PUBLIC dwStatus dwSensorGPS_readFrame | ( | dwGPSFrame *const | frame, |
| dwTime_t const | timeoutUs, | ||
| dwSensorHandle_t const | sensor | ||
| ) |
Reads the next available GPS data frame with a given timeout.
The method blocks until either a new valid frame is received from the sensor or the given timeout exceeds. Frames read from the sensor do not have to be returned because the messages are copied.
@req{GID-AV_REQ-6792427} @req{GID-AV_REQ-6792434} @req{GID-AV_REQ-6792439} @req{GID-AV_REQ-6792440} @req{GID-AV_REQ-6829678} @req{GID-AV_REQ-6792441}
This API function will achieve two functionalities of this software unit:
This API function will firstly check if there are already decoded GPS frames available, if there are decoded GPS frames then this API function returns the first decoded GPS frame then return; otherwise it will read GPS sensor packet then decode it and return first decoded GPS frames, or return DW_TIME_OUT if no GPS frames could be decoded till timeout is detected.
This function is only used after the GPS sensor is initialized and started successfully.
| [out] | frame | A pointer to a GPS frame structure to be filled with new localization data. |
| [in] | timeoutUs | Specify the timeout in us to wait for a new message. Special values:
|
| [in] | sensor | Specify the sensor handle of the GPS sensor previously created with 'dwSAL_createSensor()'. |