Skip to content

Feat/ble trilateration.#147

Open
MatteoCnda1 wants to merge 1 commit into
mainfrom
feat/ble-trilateration
Open

Feat/ble trilateration.#147
MatteoCnda1 wants to merge 1 commit into
mainfrom
feat/ble-trilateration

Conversation

@MatteoCnda1
Copy link
Copy Markdown

Summary

Add a BLE trilateration indoor positioning example using STM32duinoBLE. Closes #98

Changes

  • Added lib/ble/examples/BleTrilateration/BleTrilateration.ino
  • Scans 3 named beacons simultaneously (Beacon_M1, Beacon_M2, Beacon_M3)
  • Converts RSSI to distance using per-beacon log-distance path loss model:
    • RSSI_ref at 1m: M1=-75, M2=-75, M3=-80
    • Path loss n: M1=3.99, M2=4.32, M3=2.66
  • Trilaterates 2D position using least-squares circle intersection
  • Multi-layer filtering pipeline:
    • Moving average over 8 RSSI samples per beacon
    • Distance clamped to 430cm
    • Trilateration result rejected if too far from centroid (>550cm)
    • Exponential smoothing (alpha=0.15) with 15cm minimum movement threshold
  • Displays ASCII 2D map on Serial monitor (1 char = 10cm)
  • Position updated every 500ms, map every 2s

Checklist

  • make lint passes (clang-format)
  • make build passes (PlatformIO)
  • make test-native passes
  • [x ] make test-hardware passes on a connected STeaMi
  • [ x] README updated (if adding/changing public API)
  • Examples added (lib/ble/examples/BleTrilateration/BleTrilateration.ino)
  • Commit messages follow conventional commits format

@MatteoCnda1 MatteoCnda1 changed the title Feat/ble trilateration Feat/ble trilateration. Apr 23, 2026
@MatteoCnda1 MatteoCnda1 force-pushed the feat/ble-trilateration branch from a335a8c to 244fbc3 Compare April 23, 2026 12:57
@MatteoCnda1 MatteoCnda1 force-pushed the feat/ble-trilateration branch from 244fbc3 to c2edfa2 Compare April 23, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

examples(ble): Add BLE trilateration indoor positioning example.

2 participants