Package ch.hevs.kart

Class KartRegisters.V1.Status.DistanceSensor

Enclosing class:

public static final class KartRegisters.V1.Status.DistanceSensor extends Object

Ultrasonic distance ranger value.

This status register reflects the actual measured value of by using the ultrasonic distance ranger. The sensor has to be connected to the connector labeled IN1 on the IO board.

The distance measure block in the sensors FPGA counts the ultrasonic pulse length in terms of the 10 MHz clock periods. The distance im meters (m) is thus given by distance = count * 0.000017 or for millimeters (mm) distance = count * 0.017. The register has a size of 16 bits, so values between 0 and 65353 and thus distances between 0m and 1.11m can theoretically be measured.

  • Field Details

  • Constructor Details

    • DistanceSensor

      public DistanceSensor()
  • Method Details

    • TO_M

      public static double TO_M(int registerValue)
    • TO_MM

      public static double TO_MM(int registerValue)