Appearance
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
- Open a synced navigation bundle in the mobile app.
- Enable survey mode from the navigation screen.
- 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.
- Export the floor's samples as JSONL from the survey bar.
- 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- Copy the generated
floor_<floor_id>.jsonintomobile/assets/fingerprint_models/or place it in the app documents directory asfingerprint_model_floor_<floor_id>.json. - 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_samplesandfingerprint_observationstables in a server migration. - Add shared Valibot schemas in
lib/src/schemas.tsand web contracts inweb/src/lib/contracts.ts. - Add guarded HTTP endpoints such as
POST /api/v1/positioning/survey/samples,GET /api/v1/positioning/survey/samples, and optionallyPOST /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.