Skip to content

RSSI Fingerprint Positioning Prototype

This prototype estimates a mobile user's floor-map position from WiFi and ambient BLE RSSI fingerprints. It is Android-first because Android exposes WiFi scan results to apps with the right location permissions; iOS support will need a separate feasibility pass.

Workflow

  1. Open a synced navigation bundle in the mobile app.
  2. Enable survey mode from the navigation screen.
  3. Tap known positions on the floor map. Each tap stores the map pixel coordinate, floor ID, device info, WiFi observations, and unfiltered BLE observations in local SQLite.
  4. Export the floor's samples as JSONL from the survey bar.
  5. Train a model:
sh
bun scripts/ml/fingerprint_train.ts \
  --input fingerprint_samples_location_1_floor_1.jsonl \
  --output mobile/assets/fingerprint_models \
  --floor 1
  1. Copy the generated floor_<floor_id>.json into mobile/assets/fingerprint_models/ or place it in the app documents directory as fingerprint_model_floor_<floor_id>.json.
  2. Switch the navigation screen to RSSI fingerprint mode and start scanning. The existing map dot will use the fingerprint model when a matching floor model is available.

Model Format

The baseline model is a per-floor k-NN JSON artifact:

json
{
  "version": 1,
  "generated_at": 1781340000000,
  "floor_id": 1,
  "k": 5,
  "missing_rssi": -100,
  "features": ["wifi:aa:bb:cc:dd:ee:ff", "ble:11:22:33:44:55:66"],
  "samples": [
    {
      "x": 120.0,
      "y": 240.0,
      "features": {
        "wifi:aa:bb:cc:dd:ee:ff": -61,
        "ble:11:22:33:44:55:66": -78
      }
    }
  ]
}

Optional Server and Admin Extensions

Centralized surveys can be added later without changing the mobile prototype shape:

  • Add fingerprint_samples and fingerprint_observations tables in a server migration.
  • Add shared Valibot schemas in lib/src/schemas.ts and web contracts in web/src/lib/contracts.ts.
  • Add guarded HTTP endpoints such as POST /api/v1/positioning/survey/samples, GET /api/v1/positioning/survey/samples, and optionally POST /api/v1/positioning/predict.
  • Add an admin visualization, preferably as a new tool or Zones Debug extension, to overlay survey coverage, held-out error points, and live predictions on the floor map.