# `BB.Message.Sensor.Imu`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/message/sensor/imu.ex#L5)

Inertial Measurement Unit data.

## Fields

- `orientation` - Orientation as `BB.Quaternion.t()`
- `angular_velocity` - Angular velocity as `BB.Vec3.t()` in rad/s
- `linear_acceleration` - Linear acceleration as `BB.Vec3.t()` in m/s²

## Examples

    alias BB.Message.Sensor.Imu
    alias BB.{Vec3, Quaternion}

    {:ok, msg} = Imu.new(:imu_link,
      orientation: Quaternion.identity(),
      angular_velocity: Vec3.zero(),
      linear_acceleration: Vec3.new(0.0, 0.0, 9.81)
    )

# `t`

```elixir
@type t() :: %BB.Message.Sensor.Imu{
  angular_velocity: BB.Math.Vec3.t(),
  linear_acceleration: BB.Math.Vec3.t(),
  orientation: BB.Math.Quaternion.t()
}
```

# `new`

```elixir
@spec new(
  atom(),
  keyword()
) :: {:ok, BB.Message.t()} | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
