Back to engineering work

Sensing + prototype firmware

IMU and LiDAR alignment prototype

A handheld target-alignment prototype combines IMU orientation with LiDAR range measurements. The firmware brings the two inputs into a consistent update sequence before producing feedback.

IMU and LiDAR target guidance firmwarePrototype firmware
The handheld IMU and LiDAR prototype
Recorded prototype, with orientation, range and visible target-state feedback.

Engineering scope

  • IMU orientation and LiDAR range acquisition
  • A consistent sensor update sequence
  • Filtering and bias handling before feedback

System flow

From two measurements to feedback

  1. Read orientationAcquire the IMU measurement.
  2. Read rangeAcquire the LiDAR distance.
  3. Process the measurementsApply filtering and bias handling.
  4. Update feedbackUse the processed values for target alignment.

Orientation and range inputs

The IMU provides orientation data and LiDAR measures distance. The alignment application uses both inputs to determine the feedback presented to the operator.

Acquisition and signal processing

The firmware reads inertial and range data in a consistent sequence. Filtering and bias handling process the raw measurements before they are used for feedback.

Prototype demonstration

The recording shows sensor acquisition and visible alignment feedback. Measured accuracy, field readiness and production validation are outside the documented scope.

Firmware flow

How the guidance prototype chooses feedback

Selected orientation and range alignment logic.

ActionCheck orientation against its tolerances
ActionCheck range when both distances exist
Action · YesSelect target-reached feedback
Action · NoOtherwise select orientation feedbackAligned orientation gets the aligned state; otherwise the misaligned state.
ResultUpdate the LED and buzzer

Compare orientation with its tolerances and compare range only when both distance values exist. Choose target-reached, orientation-aligned or misaligned feedback, then update the LED and buzzer.

This classifies the readings against configured tolerances. It does not establish physical accuracy, safety performance or a tested acquisition range.

Read the implementation

alignment feedback excerpt · selected source lines 423–445. Source inspection is not a hardware test.

  bool angAligned =
    (fabsf(errRoll)  <= ALIGN_ROLL_DEG)  &&
    (fabsf(errPitch) <= ALIGN_PITCH_DEG) &&
    (fabsf(errYaw)   <= ALIGN_YAW_DEG);

  bool distAligned = false;
  if (tfHasData && targetHasDist) {
    int32_t diff = (int32_t)tfDistCm - (int32_t)targetDistCm;
    if (diff < 0) diff = -diff;
    distAligned = (diff <= TARGET_DIST_TOL_CM);
  }

  if (angAligned && distAligned && tfHasData && targetHasDist) {
    trackState = TRACK_TARGET_REACHED;
  } else if (angAligned) {
    trackState = TRACK_LOCKED_ALIGNED;
  } else {
    trackState = TRACK_LOCKED_MISALIGNED;
  }

  updateLedForState();
  updateBuzzerForState();
}
Open the exact source-level diagram

Prototype demonstration.

Original project recording · 1:31
IMU and LiDAR prototype demonstration · 1:31. Open the original video file.
All projectsArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project