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

Single scan from a planar laser range-finder.

## Fields

- `angle_min` - Start angle of scan in radians
- `angle_max` - End angle of scan in radians
- `angle_increment` - Angular distance between measurements in radians
- `time_increment` - Time between measurements in seconds
- `scan_time` - Time between scans in seconds
- `range_min` - Minimum range value in metres
- `range_max` - Maximum range value in metres
- `ranges` - Range data in metres (values < range_min or > range_max are invalid)
- `intensities` - Intensity data (device-specific units, optional)

## Examples

    alias BB.Message.Sensor.LaserScan

    {:ok, msg} = LaserScan.new(:laser_frame,
      angle_min: -1.57,
      angle_max: 1.57,
      angle_increment: 0.01,
      time_increment: 0.0001,
      scan_time: 0.1,
      range_min: 0.1,
      range_max: 10.0,
      ranges: [1.0, 1.1, 1.2, 1.3]
    )

# `t`

```elixir
@type t() :: %BB.Message.Sensor.LaserScan{
  angle_increment: float(),
  angle_max: float(),
  angle_min: float(),
  intensities: [float()],
  range_max: float(),
  range_min: float(),
  ranges: [float()],
  scan_time: float(),
  time_increment: float()
}
```

# `new`

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

---

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