Struct ImuPacket
Defined in File packet.h
Inheritance Relationships
Base Type
public ouster::sdk::core::Packet(Struct Packet)
Struct Documentation
-
struct ImuPacket : public ouster::sdk::core::Packet
Encapsulate an imu packet buffer and attributes associated with it.
Public Functions
-
ImuPacket(int size)
Construct a new Imu packet with a pre-allocated size.
- Parameters:
size[in] size in bytes to allocate
-
inline auto sys_ts() const
Read system timestamp from the packet.
Only available in PROFILE_IMU_LEGACY, otherwise returns 0.
- Returns:
system timestamp
-
inline auto accel_ts() const
Read accelerometer timestamp from the packet.
Only available in PROFILE_IMU_LEGACY, otherwise returns 0.
- Returns:
accelerometer timestamp
-
inline auto gyro_ts() const
Read gyroscope timestamp from the packet.
Only available in PROFILE_IMU_LEGACY, otherwise returns 0.
- Returns:
gyroscope timestamp
-
inline std::string nmea_sentence() const
Read NMEA sentence from an IMU buffer.
Only available in PROFILE_ACCEL32_GYRO32_NMEA.
- Returns:
nmea sentence string
-
inline uint64_t nmea_ts() const
Read nmea timestamp from the packet.
Only available in PROFILE_ACCEL32_GYRO32_NMEA, otherwise returns 0.
- Returns:
nmea timestamp
-
Eigen::Array<float, Eigen::Dynamic, 3> accel() const
Get acceleration reads from imu packet.
- Returns:
2d array of accel readings in m/s^2
-
Eigen::Array<float, Eigen::Dynamic, 3> gyro() const
Get angular velocity reads from imu packet.
- Returns:
2d array of angular velocity readings in rad/sec
-
Eigen::Array<uint16_t, Eigen::Dynamic, 1> status() const
Get status of reads from imu packet.
0x1 for valid. Always returns (1,1) array of 0x1 with UDPProfileIMU::LEGACY.
- Returns:
1d array of statuses
-
Eigen::Array<uint64_t, Eigen::Dynamic, 1> timestamp() const
Get read timestamps from imu packet.
Always returns (1,1) array of 0 with UDPProfileIMU::LEGACY.
- Returns:
1d array of timestamps
-
Eigen::Array<uint16_t, Eigen::Dynamic, 1> measurement_id() const
Get correlated measurement ids from imu packet.
Always returns (1,1) array of 0 with UDPProfileIMU::LEGACY.
- Returns:
1d array of measurement ids
-
inline auto la_x() const
Read acceleration in X direction from the packet.
Only works with UDPProfileIMU::LEGACY.
- Returns:
acceleration in the X direction
-
inline auto la_y() const
Read acceleration in Y direction from the packet.
Only works with UDPProfileIMU::LEGACY.
- Returns:
acceleration in the Y direction
-
inline auto la_z() const
Read acceleration in Z direction from the packet.
Only works with UDPProfileIMU::LEGACY.
- Returns:
acceleration in the Z direction
-
inline auto av_x() const
Read angular velocity on the X axis from the packet.
Only works with UDPProfileIMU::LEGACY.
- Returns:
angular velocity on the X axis
-
inline auto av_y() const
Read angular velocity on the Y axis from the packet.
Only works with UDPProfileIMU::LEGACY.
- Returns:
angular velocity on the Y axis
-
inline auto av_z() const
Read angular velocity on the Z axis from the packet.
Only works with PROFILE_IMU_LEGACY.
- Returns:
angular velocity on the Z axis
Public Static Attributes
-
static const PacketType MY_TYPE = PacketType::Imu
PacketType enum for this packet type.
- static OUSTER_DIAGNOSTIC_PUSH OUSTER_DIAGNOSTIC_IGNORE_UNUSED const PacketType my_type = PacketType::Imu
- Deprecated:
Use MY_TYPE instead. This will be removed in a future release.
-
ImuPacket(int size)