Defines A API for the IMU sensor.
Data Structures | |
| struct | dwIMUSignalValidityInfo |
| This structure contains validity of each signal provided by IMU sensors. More... | |
| struct | dwIMUFrame |
| This structure contains one frame of data from a IMU sensor. More... | |
Typedefs | |
| typedef enum dwIMUTimestampFormat | dwIMUTimestampFormat |
| Timestamp format of the IMU sensor. Should be identical to dwVioTimestampFormat(i.e. each field should have identical meaning and value). More... | |
| typedef enum dwIMUImuTempQuality | dwIMUImuTempQuality |
| typedef enum dwIMUImuAccelerationQuality | dwIMUImuAccelerationQuality |
| typedef enum dwIMUImuTurnrateQuality | dwIMUImuTurnrateQuality |
| typedef enum dwIMUImuTurnrateAccelQuality | dwIMUImuTurnrateAccelQuality |
| typedef enum dwIMUImuTimestampQuality | dwIMUImuTimestampQuality |
| typedef enum dwIMUImuStatus | dwIMUImuStatus |
| typedef struct dwIMUSignalValidityInfo | dwIMUSignalValidityInfo |
| This structure contains validity of each signal provided by IMU sensors. More... | |
| typedef struct dwIMUFrame | dwIMUFrame |
| This structure contains one frame of data from a IMU sensor. More... | |
Functions | |
| DW_API_PUBLIC dwStatus | dwSensorIMU_readFrame (dwIMUFrame *const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor) |
| Reads the next IMU frame from the sensor within a given timeout. More... | |
| DW_API_PUBLIC dwStatus | dwSensorIMU_processRawData (uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor) |
| Decodes IMU frames from received IMU sensor raw data/packets. More... | |
| DW_API_PUBLIC dwStatus | dwSensorIMU_popFrame (dwIMUFrame *const frame, dwSensorHandle_t const sensor) |
| Returns the earliest IMU frame previously processed from previous IMU sensor packets. More... | |
| enum dwIMUAlignmentStatus | DW_DEPRECATED ("REL_26_03 - dwIMUAlignmentStatus is deprecated and will be removed in the future. Read alignmentStatus value from GPS frames instead") |
| High rate data output from GNSS-IMU device requires fusion of GNSS and IMU. More... | |
| typedef struct dwIMUFrame dwIMUFrame |
This structure contains one frame of data from a IMU sensor.
| typedef enum dwIMUImuAccelerationQuality dwIMUImuAccelerationQuality |
| typedef enum dwIMUImuStatus dwIMUImuStatus |
| typedef enum dwIMUImuTempQuality dwIMUImuTempQuality |
| typedef enum dwIMUImuTimestampQuality dwIMUImuTimestampQuality |
| typedef enum dwIMUImuTurnrateAccelQuality dwIMUImuTurnrateAccelQuality |
| typedef enum dwIMUImuTurnrateQuality dwIMUImuTurnrateQuality |
| typedef struct dwIMUSignalValidityInfo dwIMUSignalValidityInfo |
This structure contains validity of each signal provided by IMU sensors.
Access fields in this structure with APIs provided by SignalStatus.h
| typedef enum dwIMUTimestampFormat dwIMUTimestampFormat |
Timestamp format of the IMU sensor. Should be identical to dwVioTimestampFormat(i.e. each field should have identical meaning and value).
| enum dwIMUAlignmentStatus |
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 IMU. This status indicates the quality of IMU alignment.
| Enumerator | |
|---|---|
| DW_DEPRECATED_ENUMERATOR | Unknown status means the device does not or has not yet provided this information. Fine means the IMU alignment is complete, and the device can output high quality data. Coarse means the IMU is roughly aligned, so the data is useful, but not of the highest quality. Invalid means the IMU alignment is not yet valid, and the output data is not accurate.
|
| DW_DEPRECATED_ENUMERATOR | Unknown status means the device does not or has not yet provided this information. Fine means the IMU alignment is complete, and the device can output high quality data. Coarse means the IMU is roughly aligned, so the data is useful, but not of the highest quality. Invalid means the IMU alignment is not yet valid, and the output data is not accurate.
|
| DW_DEPRECATED_ENUMERATOR | Unknown status means the device does not or has not yet provided this information. Fine means the IMU alignment is complete, and the device can output high quality data. Coarse means the IMU is roughly aligned, so the data is useful, but not of the highest quality. Invalid means the IMU alignment is not yet valid, and the output data is not accurate.
|
| DW_DEPRECATED_ENUMERATOR | Unknown status means the device does not or has not yet provided this information. Fine means the IMU alignment is complete, and the device can output high quality data. Coarse means the IMU is roughly aligned, so the data is useful, but not of the highest quality. Invalid means the IMU alignment is not yet valid, and the output data is not accurate.
|
Definition at line 60 of file IMUTypes.h.
Definition at line 111 of file IMUTypes.h.
| enum dwIMUImuStatus |
Definition at line 225 of file IMUTypes.h.
| enum dwIMUImuTempQuality |
Definition at line 87 of file IMUTypes.h.
Definition at line 210 of file IMUTypes.h.
Definition at line 177 of file IMUTypes.h.
Definition at line 144 of file IMUTypes.h.
| enum dwIMUTimestampFormat |
Timestamp format of the IMU sensor. Should be identical to dwVioTimestampFormat(i.e. each field should have identical meaning and value).
Definition at line 37 of file IMUTypes.h.
| enum dwIMUAlignmentStatus DW_DEPRECATED | ( | "REL_26_03 - dwIMUAlignmentStatus is deprecated and will be removed in the future. Read alignmentStatus value from GPS frames instead" | ) |
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 IMU. This status indicates the quality of IMU alignment.
| DW_API_PUBLIC dwStatus dwSensorIMU_popFrame | ( | dwIMUFrame *const | frame, |
| dwSensorHandle_t const | sensor | ||
| ) |
Returns the earliest IMU frame previously processed from previous IMU sensor packets.
@req{GID-AV_REQ-6774977} @req{GID-AV_REQ-6774978}
This function returns only the first single decoded IMU frame from cached IMU frames(and removes it from cache). If no frames are available in queue, DW_NOT_AVAILABLE is returned and no IMU frame is returned.
This function should only be called after sensor is started. From above descriptions, this function requires previous callings to function dwSensorIMU_readFrame or dwSensorIMU_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 IMU frame queue is finished.
| [out] | frame | Pointer to an IMU frame structure to be filled with new data. |
| [in] | sensor | Sensor handle of the sensor previously created with 'dwSAL_createSensor()'. |
| DW_API_PUBLIC dwStatus dwSensorIMU_processRawData | ( | uint8_t const *const | data, |
| size_t const | size, | ||
| dwSensorHandle_t const | sensor | ||
| ) |
Decodes IMU frames from received IMU sensor raw data/packets.
Any processed messages can be picked up using dwSensorIMU_readFrame() or dwSensorIMU_popFrame() function.
@req{GID-AV_REQ-6774978}
This API function will achieve functionality of this software unit:
This API function will push specified IMU sensor packet into its internal IMU decoders. Since internal IMU decoder will return once an IMU frame is decoded, or no IMU frames could be decoded from remaining bytes from specified IMU sensor packet, thus this API function will keep driving the decoder to return as many IMU frames as possible, until decoder could return no new IMU frames. All decoded IMU frames are cached internally and could be accessed by dwSensorIMU_readFrame() or dwSensorIMU_popFrame(). Based on sensor configuration value 'output-timestamp=', decoded IMU frames would be modified in their hostTimestamp field values accordingly.
This function should only be called after sensor is started, and with raw IMU 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 IMU sensor data is processed.
| [in] | data | Undecoded imu data. Non-null pointer |
| [in] | size | Size in bytes of the raw data. Range: (0, INT_MAX]. Note 0 will result in DW_NOT_READY return value. |
| [in] | sensor | Sensor handle of the sensor previously created with 'dwSAL_createSensor()'. |
| DW_API_PUBLIC dwStatus dwSensorIMU_readFrame | ( | dwIMUFrame *const | frame, |
| dwTime_t const | timeoutUs, | ||
| dwSensorHandle_t const | sensor | ||
| ) |
Reads the next IMU frame from the sensor within a given timeout.
@req{GID-AV_REQ-6774977} @req{GID-AV_REQ-6774976} @req{GID-AV_REQ-6774980} @req{GID-AV_REQ-6774981} @req{GID-AV_REQ-6826484}
This API function will achieve two functionalities of this software unit:
This API function will firstly check if there are already decoded IMU frames available, if there are decoded IMU frames then this API function returns the first decoded IMU frame then return; otherwise it will read IMU sensor packet then decode it and return first decoded IMU frames, or return DW_TIME_OUT if no IMU frames could be decoded till timeout is detected.
This function could only be called after an IMU sensor is instantiated, started and is running.
| [out] | frame | A pointer to an IMU frame structure to be filled with new data. |
| [in] | timeoutUs | Timeout, in us, to wait for a new message. Range: [0, INT_MAX] Special values:
|
| [in] | sensor | Sensor handle of the IMU sensor previously created with dwSAL_createSensor(). |