DriveWorks SDK Reference
5.8.83 Release
For Test and Development only

IMU.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2016-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
47#ifndef DW_SENSORS_IMU_IMU_H_
48#define DW_SENSORS_IMU_IMU_H_
49
50#include <dw/core/base/Config.h>
52#include <dw/core/base/Types.h>
53
54#include <dw/sensors/Sensors.h>
55
56#ifdef __cplusplus
57extern "C" {
58#endif
59
61typedef enum dwIMUFlags {
62
63 DW_IMU_HEADING = 1U << 1,
64
65 DW_IMU_ROLL = 1U << 2,
66 DW_IMU_PITCH = 1U << 3,
67 DW_IMU_YAW = 1U << 4,
68
73
74 DW_IMU_ROLL_RATE = 1U << 9,
75 DW_IMU_PITCH_RATE = 1U << 10,
76 DW_IMU_YAW_RATE = 1U << 11,
77
81
85 DW_IMU_ALIGNMENTSTATUS = 1U << 18
86
88
90typedef enum dwIMUHeadingType {
91
94
97
99
105
116
121typedef struct dwIMUFrame
122{
124 uint32_t flags;
125
128
131
134
137
140
143
146
149
152
153} dwIMUFrame;
154
170
184 // Sensor overloaded
186 // Sensor out of operating temperature
190
204 // Sensor overloaded
206 // Sensor out of operating temperature
210
224 // Sensor overloaded
226 // Sensor out of operating temperature
230
240
241typedef enum dwIMUImuStatus {
254 DW_IMU_IMU_STATUS_FORCE32 = 0x7FFFFFFF
256
260typedef struct dwIMUFrameNew
261{
262 struct
263 {
286
292
298
304
310
316
322
328
334
340
346
352
367
384
401
408
425
437
451
454
458
459 uint8_t reserved[508];
461
480dwStatus dwSensorIMU_readFrame(dwIMUFrame* const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor);
481
498dwStatus dwSensorIMU_processRawData(uint8_t const* const data, size_t const size, dwSensorHandle_t const sensor);
499
515
533dwStatus dwSensorIMU_readFrameNew(dwIMUFrameNew* const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor);
534
550dwStatus dwSensorIMU_processRawDataNew(uint8_t const* const data, size_t const size, dwSensorHandle_t const sensor);
551
566
567#ifdef __cplusplus
568}
569#endif
571#endif // DW_SENSORS_IMU_IMU_H_
NVIDIA DriveWorks API: Sensors
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Exports
#define DW_API_PUBLIC
Definition: Exports.h:54
uint8_t dwSignalValidity
The type of the encoded status field.
Definition: SignalStatus.h:57
dwStatus
Status definition.
Definition: Status.h:171
float float32_t
Specifies POD types.
Definition: Types.h:70
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
double float64_t
Definition: Types.h:71
Defines a double-precision quaternion.
Definition: Types.h:501
dwIMUImuTurnrateAccelQuality imuTurnrateAccelQuality[3]
Definition: IMU.h:424
dwQuaterniond orientationQuaternion
Quaternion representation (x, y, z, w) of the orientation returned by the IMU.
Definition: IMU.h:133
float64_t turnrateOffset[3]
Definition: IMU.h:345
float64_t turnrate[3]
Definition: IMU.h:309
dwIMUImuTempQuality imuTempQuality
Definition: IMU.h:366
uint8_t sequenceCounter
Definition: IMU.h:457
dwTime_t timestamp_us
Timestamp for the current message. Indicates when it's first received [usec].
Definition: IMU.h:127
float64_t acceleration[3]
Acceleration in X, Y, and Z directions [m/s^2].
Definition: IMU.h:139
dwIMUHeadingType headingType
Type of the heading information.
Definition: IMU.h:148
struct dwIMUFrameNew::@4 validityInfo
float64_t accelerationOffset[3]
Definition: IMU.h:339
float64_t orientation[3]
Definition: IMU.h:297
float64_t heading
Definition: IMU.h:327
float64_t acceleration[3]
Definition: IMU.h:315
float64_t magnetometer[3]
Measurement of the magnetometer unit in X, Y, and Z directions [utesla].
Definition: IMU.h:142
dwIMUImuAccelerationQuality imuAccelerationQuality[3]
Definition: IMU.h:383
dwTime_t timestamp_us
Definition: IMU.h:291
dwQuaterniond orientationQuaternion
Definition: IMU.h:303
dwIMUImuStatus imuStatus
Definition: IMU.h:450
float64_t heading
Heading of the IMU measured in respect to the ENU system [degrees], i.e., compass.
Definition: IMU.h:145
float64_t magnetometer[3]
Definition: IMU.h:321
dwIMUAlignmentStatus alignmentStatus
Alignment status.
Definition: IMU.h:151
float64_t orientation[3]
Roll, pitch, and yaw angle of the orientation returned by the IMU [degree].
Definition: IMU.h:130
uint8_t reserved[508]
Definition: IMU.h:459
float64_t turnrateAccel[3]
Definition: IMU.h:351
uint8_t imuTurnrateOffsetQuality[3]
Definition: IMU.h:407
float64_t turnrate[3]
Roll, pitch, and yaw turn rate (i.e., gyroscope)[rad/s].
Definition: IMU.h:136
float32_t temperature
Definition: IMU.h:333
dwIMUImuTurnrateQuality imuTurnrateQuality[3]
Definition: IMU.h:400
dwIMUImuTimestampQuality imuTimestampQuality
Definition: IMU.h:436
uint32_t flags
The flags to show which values are valid in this IMU frame.
Definition: IMU.h:124
dwIMUAlignmentStatus alignmentStatus
Alignment status.
Definition: IMU.h:453
DW_API_PUBLIC dwStatus dwSensorIMU_processRawData(uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
Reads the IMU frame from raw data.
dwIMUAlignmentStatus
High rate data output from GNSS-IMU device requires fusion of GNSS and IMU.
Definition: IMU.h:104
dwIMUFlags
Each flag shows if that value is valid in this IMU frame.
Definition: IMU.h:61
dwIMUImuTurnrateQuality
Definition: IMU.h:191
dwIMUImuStatus
Definition: IMU.h:241
dwIMUImuTempQuality
Definition: IMU.h:155
DW_API_PUBLIC dwStatus dwSensorIMU_processRawDataNew(uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
Reads the IMU frame New from raw data.
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.
dwIMUImuTimestampQuality
Definition: IMU.h:231
DW_API_PUBLIC dwStatus dwSensorIMU_popFrameNew(dwIMUFrameNew *const frame, dwSensorHandle_t const sensor)
Returns any IMU Frame New previously processed through the raw data stream.
dwIMUImuTurnrateAccelQuality
Definition: IMU.h:211
dwIMUHeadingType
Types of the heading degree.
Definition: IMU.h:90
dwIMUImuAccelerationQuality
Definition: IMU.h:171
DW_API_PUBLIC dwStatus dwSensorIMU_readFrameNew(dwIMUFrameNew *const frame, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
Reads the next IMU frame New from the sensor within a given timeout.
DW_API_PUBLIC dwStatus dwSensorIMU_popFrame(dwIMUFrame *const frame, dwSensorHandle_t const sensor)
Returns any IMU data previously processed through the raw data stream.
@ DW_IMU_ALIGNMENT_STATUS_INVALID
Invalid means the IMU alignment is not yet valid, and the output data is not accurate.
Definition: IMU.h:109
@ DW_IMU_ALIGNMENT_STATUS_UNKNOWN
Unknown status means the device does not or has not yet provided this information.
Definition: IMU.h:107
@ DW_IMU_ALIGNMENT_STATUS_FORCE32
Definition: IMU.h:114
@ DW_IMU_ALIGNMENT_STATUS_COARSE
Coarse means the IMU is roughly aligned, so the data is useful, but not of the highest quality.
Definition: IMU.h:111
@ DW_IMU_ALIGNMENT_STATUS_FINE
Fine means the IMU alignment is complete, and the device can output high quality data.
Definition: IMU.h:113
@ DW_IMU_QUATERNION_X
Definition: IMU.h:69
@ DW_IMU_ROLL
Value of dwIMUFrame.orientation[0] is valid.
Definition: IMU.h:65
@ DW_IMU_MAGNETOMETER_X
Value of dwIMUFrame.magnetometer[0] is valid.
Definition: IMU.h:82
@ DW_IMU_ROLL_RATE
!< Value of dwIMUFrame.orientationQuaternion.w is valid.
Definition: IMU.h:74
@ DW_IMU_HEADING
Value of dwIMUFrame.heading is valid.
Definition: IMU.h:63
@ DW_IMU_ALIGNMENTSTATUS
Value of dwIMUFrame.alignmentStatus is valid.
Definition: IMU.h:85
@ DW_IMU_MAGNETOMETER_Z
Value of dwIMUFrame.magnetometer[2] is valid.
Definition: IMU.h:84
@ DW_IMU_QUATERNION_Z
!< Value of dwIMUFrame.orientationQuaternion.y is valid.
Definition: IMU.h:71
@ DW_IMU_QUATERNION_Y
!< Value of dwIMUFrame.orientationQuaternion.x is valid.
Definition: IMU.h:70
@ DW_IMU_YAW
Value of dwIMUFrame.orientation[2] is valid.
Definition: IMU.h:67
@ DW_IMU_PITCH_RATE
Value of dwIMUFrame.turnrate[1] is valid.
Definition: IMU.h:75
@ DW_IMU_ACCELERATION_Z
Value of dwIMUFrame.acceleration[2] is valid.
Definition: IMU.h:80
@ DW_IMU_ACCELERATION_X
Value of dwIMUFrame.acceleration[0] is valid.
Definition: IMU.h:78
@ DW_IMU_PITCH
Value of dwIMUFrame.orientation[1] is valid.
Definition: IMU.h:66
@ DW_IMU_YAW_RATE
Value of dwIMUFrame.turnrate[2] is valid.
Definition: IMU.h:76
@ DW_IMU_QUATERNION_W
!< Value of dwIMUFrame.orientationQuaternion.z is valid.
Definition: IMU.h:72
@ DW_IMU_ACCELERATION_Y
Value of dwIMUFrame.acceleration[1] is valid.
Definition: IMU.h:79
@ DW_IMU_MAGNETOMETER_Y
Value of dwIMUFrame.magnetometer[1] is valid.
Definition: IMU.h:83
@ DW_IMU_IMU_TURNRATE_QUALITY_FORCE32
Definition: IMU.h:208
@ DW_IMU_IMU_TURNRATE_QUALITY_INIT
Signal initializing.
Definition: IMU.h:193
@ DW_IMU_IMU_TURNRATE_QUALITY_PRMNT_FAIL
Signal permanent failure.
Definition: IMU.h:201
@ DW_IMU_IMU_TURNRATE_QUALITY_TEMPERATURE
Definition: IMU.h:207
@ DW_IMU_IMU_TURNRATE_QUALITY_OK
Signal in specification.
Definition: IMU.h:197
@ DW_IMU_IMU_TURNRATE_QUALITY_TMP_FAIL
Signal temporary failure.
Definition: IMU.h:199
@ DW_IMU_IMU_TURNRATE_QUALITY_OVERLOAD
Definition: IMU.h:205
@ DW_IMU_IMU_TURNRATE_QUALITY_SENS_NOT_INST
Sensor not installed.
Definition: IMU.h:203
@ DW_IMU_IMU_TURNRATE_QUALITY_UNCALIB
Sensor uncalibrated.
Definition: IMU.h:195
@ DW_IMU_IMU_STATUS_PRMNT_FAIL
Signal permanent failure.
Definition: IMU.h:251
@ DW_IMU_IMU_STATUS_UNCALIB
Sensor uncalibrated.
Definition: IMU.h:245
@ DW_IMU_IMU_STATUS_FORCE32
Definition: IMU.h:254
@ DW_IMU_IMU_STATUS_SENS_NOT_INST
Sensor not installed.
Definition: IMU.h:253
@ DW_IMU_IMU_STATUS_OK
Signal in specification.
Definition: IMU.h:247
@ DW_IMU_IMU_STATUS_TMP_FAIL
Signal temporary failure.
Definition: IMU.h:249
@ DW_IMU_IMU_STATUS_INIT
Signal initializing.
Definition: IMU.h:243
@ DW_IMU_IMU_TEMP_QUALITY_FORCE32
Definition: IMU.h:168
@ DW_IMU_IMU_TEMP_QUALITY_SENS_NOT_INST
Sensor not installed.
Definition: IMU.h:167
@ DW_IMU_IMU_TEMP_QUALITY_TMP_FAIL
Signal temporary failure.
Definition: IMU.h:163
@ DW_IMU_IMU_TEMP_QUALITY_INIT
Signal initializing.
Definition: IMU.h:157
@ DW_IMU_IMU_TEMP_QUALITY_UNCALIB
Sensor uncalibrated.
Definition: IMU.h:159
@ DW_IMU_IMU_TEMP_QUALITY_OK
Signal in specification.
Definition: IMU.h:161
@ DW_IMU_IMU_TEMP_QUALITY_PRMNT_FAIL
Signal permanent failure.
Definition: IMU.h:165
@ DW_IMU_IMU_TIMESTAMP_QUALITY_SYNC_LOST
Synchronization lost.
Definition: IMU.h:237
@ DW_IMU_IMU_TIMESTAMP_QUALITY_NOT_INIT
Not Initialized. still initializing.
Definition: IMU.h:233
@ DW_IMU_IMU_TIMESTAMP_QUALITY_FORCE32
Definition: IMU.h:238
@ DW_IMU_IMU_TIMESTAMP_QUALITY_OK
Normal Operation. Functional and Electrical Checks Passed.
Definition: IMU.h:235
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_OK
Signal in specification.
Definition: IMU.h:217
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_TEMPERATURE
Definition: IMU.h:227
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_TMP_FAIL
Signal temporary failure.
Definition: IMU.h:219
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_INIT
Signal initializing.
Definition: IMU.h:213
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_SENS_NOT_INST
Sensor not installed.
Definition: IMU.h:223
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_OVERLOAD
Definition: IMU.h:225
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_UNCALIB
Sensor uncalibrated.
Definition: IMU.h:215
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_FORCE32
Definition: IMU.h:228
@ DW_IMU_IMU_TURNRATE_ACCEL_QUALITY_PRMNT_FAIL
Signal permanent failure.
Definition: IMU.h:221
@ DW_IMU_HEADING_TRUE
True heading.
Definition: IMU.h:93
@ DW_IMU_HEADING_MAGNETIC
Magnetic heading.
Definition: IMU.h:96
@ DW_IMU_IMU_ACCELERATION_QUALITY_TEMPERATURE
Definition: IMU.h:187
@ DW_IMU_IMU_ACCELERATION_QUALITY_INIT
Signal initializing.
Definition: IMU.h:173
@ DW_IMU_IMU_ACCELERATION_QUALITY_SENS_NOT_INST
Sensor not installed.
Definition: IMU.h:183
@ DW_IMU_IMU_ACCELERATION_QUALITY_TMP_FAIL
Signal temporary failure.
Definition: IMU.h:179
@ DW_IMU_IMU_ACCELERATION_QUALITY_UNCALIB
Sensor uncalibrated.
Definition: IMU.h:175
@ DW_IMU_IMU_ACCELERATION_QUALITY_FORCE32
Definition: IMU.h:188
@ DW_IMU_IMU_ACCELERATION_QUALITY_PRMNT_FAIL
Signal permanent failure.
Definition: IMU.h:181
@ DW_IMU_IMU_ACCELERATION_QUALITY_OK
Signal in specification.
Definition: IMU.h:177
@ DW_IMU_IMU_ACCELERATION_QUALITY_OVERLOAD
Definition: IMU.h:185
An IMU frame containing sensor readings from the IMU sensor.
Definition: IMU.h:122
This structure contains one frame of data from a IMU sensor.
Definition: IMU.h:261
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:86