Skip to content

POC replay ​

Lab walk-through to replay the hospital-quadrant POC: position on the map plus magnetometer heading. Pair store / Internal Ariadne to https://safecall-lab.sourcectl.com (Mobile Access QR). No product code. Do not commit floor rasters or mar.json. Do not paste mobile keys, passwords, or tokens into git.

Importer how-to: Hansel import. Lab host: lab-server.md. Raster copy + import is OA-AT-lab-maps-import; the phone walk is OA-AT-maps (still pending until Internal 1.0.2 is on a phone; #148 stays open).

Primary site: CEDR floor 4. NP (quadrants 4A–4D). Import the whole CEDR project.json. Copy at least the 4. NP rasters.

1. Copy rasters ​

Lab maps directory is {server_root}/maps/:

  • Repo-dev: server/maps/
  • Installed server: next to the binary (same tree as db/safecall.db)

Canonical archive (prefer this server images dir; back/projects/AKESO-CEDR/images/ is incomplete and mostly 1. NP PNGs):

/Users/tmin/Code/archive/old_safecall_files/legacy/hansel/server/projects/AKESO-CEDR/images/

Copy at least:

RoleFilename
4. NP deploymentCEDR_4NP_deployment-map.png
4. NP end-userMap_CEDR_4NP.png

Other CEDR floors are optional for this replay. A floor with no assigned map will fail map download (blank floor), which is expected.

2. Import project.json ​

From the safecall repo root. --db is the lab database (server_db_path is db/safecall.db, so repo-dev is typically server/db/safecall.db):

sh
bun server/scripts/import_hansel_project.ts \
  --json /Users/tmin/Code/archive/old_safecall_files/legacy/hansel/server/projects/AKESO-CEDR/project.json \
  --db <lab-safecall.db> \
  [--replace]
  • Location name is CEDR.
  • Floor 4. NP already has compass_angle 129 and Hansel map_scale / ruler_width on the floor row.
  • The importer does not insert maps rows or set floors.map_id. Stdout lists filenames to copy; attaching them is the next step.
  • --replace rebuilds an existing CEDR location. Without it, the script aborts if that name exists.

Do not import an unconverted CEDR editor file and do not re-run Hansel convert_coords.js.

3. Attach maps ​

Ariadne only downloads a floor image when that floor has a map assigned.

  1. Admin Maps → Create Map: upload CEDR_4NP_deployment-map.png, location CEDR. That writes maps.path and copies the file into {server_root}/maps/ if it was not already there.
  2. Admin Navigation → Edit Floor on 4. NP: select that map (floors.map_id).
  3. There is no web field for maps.end_user_path. After Map_CEDR_4NP.png is in {server_root}/maps/, set it on the lab DB:
sh
sqlite3 <lab-safecall.db> \
  "UPDATE maps SET end_user_path = 'Map_CEDR_4NP.png' WHERE path = 'CEDR_4NP_deployment-map.png';"

Restart the lab server if it does not pick up the file immediately.

Without end_user_path, Ariadne falls back to the deployment PNG. That is still enough for pose and heading.

4. Pair Ariadne ​

  1. On https://safecall-lab.sourcectl.com, open Mobile Access and scan the Ariadne QR ({ url, mobile_key }) with a Play Internal / TestFlight Internal Ariadne install. Do not scan Keryx or Theseus. Do not use a debug sideload for this OA.
  2. Connect → Sync.
  3. Pick location CEDR, floor 4. NP.

Expect the visitor map if end_user_path is set, otherwise the deployment map. Corridor graph lines should appear (4. NP has 44 snapped path segments).

5. Pass / fail ​

CheckPassFail / blocked
HeadingPhysical phone with a magnetometer: player arrow rotates as the device turns. Floor 4. NP uses compass_angle 129.Simulator / no compass: pin, no rotation (expected, not a software fail). Arrow stuck while the phone turns on a real compass: fail.
PositionBLE on, at least one imported WTK_ in range. Stand by a known 4A beacon (example from CEDR JSON: 4A.Chodba 4AD_1 / WTK_0E47EA). Marker sits near that beacon’s map x/y, not across a quadrant.No matching radio in range: blocked on hardware, not a software fail. Marker on the wrong quadrant with a loud nearby beacon: fail.
Map4. NP shows a floor plan after sync.Floor has no map_id: map download 400 / blank floor.

Optional: Multiscan ​

If CEDR rasters are unavailable:

  • JSON: /Users/tmin/Code/active/gretel/lib/project.json (editor shape: active_regions, no paths)
  • Rasters: /Users/tmin/Code/archive/old_safecall_files/legacy/hansel/back/projects/999/images/ (JPGs, no end-user maps)

Same attach + pair steps. Do not re-run convert_coords.js. Position still needs an imported WTK_ in range.