OCR GPS auto-save + MSFS asset enrichment #45

Closed
opened 2026-05-29 02:28:51 +00:00 by shawn · 0 comments
Owner

Changes

OCR → GPS Auto-Save

When a technician uses OCR to scan a machine sticker and the photo has EXIF GPS, the server now auto-saves those coordinates to the asset's latitude/longitude fields if they are currently blank. This means the first photo scan at a machine permanently records its location.

MSFS Data Enrichment

GET /api/assets/{id} now includes an msfs block enriched from the merged Dynamics 365 Field Service data (loaded from merged-assets.json at server start). Fields: equipment_id, connect_id, compass_asset_number, manufacturer, model_text, dex_model, install_date, software_version, canteen_connect_guid, work_order_count.

Frontend

  • New "Field Service Data" card in asset detail view showing MSFS enrichment
  • "📍 GPS saved to asset" confirmation shown in OCR result when GPS was auto-saved

Files Changed

  • server.py — GPS auto-save in /api/ocr, MSFS data loading at startup, enrichment in get_asset()
  • static/index.html — MSFS card in detail view, gps_saved confirmation flag

Verification

  • 1,834 MSFS entries loaded and matched on startup
  • MSFS enrichment verified on asset #5 (machine 99660) — shows manufacturer VENDO, 2 work orders, Connect ID
  • Backend tests pass (pre-existing failures unrelated)
## Changes ### OCR → GPS Auto-Save When a technician uses OCR to scan a machine sticker and the photo has EXIF GPS, the server now auto-saves those coordinates to the asset's `latitude`/`longitude` fields if they are currently blank. This means the first photo scan at a machine permanently records its location. ### MSFS Data Enrichment `GET /api/assets/{id}` now includes an `msfs` block enriched from the merged Dynamics 365 Field Service data (loaded from merged-assets.json at server start). Fields: equipment_id, connect_id, compass_asset_number, manufacturer, model_text, dex_model, install_date, software_version, canteen_connect_guid, work_order_count. ### Frontend - New **"Field Service Data"** card in asset detail view showing MSFS enrichment - **"📍 GPS saved to asset"** confirmation shown in OCR result when GPS was auto-saved ## Files Changed - `server.py` — GPS auto-save in `/api/ocr`, MSFS data loading at startup, enrichment in `get_asset()` - `static/index.html` — MSFS card in detail view, `gps_saved` confirmation flag ## Verification - 1,834 MSFS entries loaded and matched on startup - MSFS enrichment verified on asset #5 (machine 99660) — shows manufacturer VENDO, 2 work orders, Connect ID - Backend tests pass (pre-existing failures unrelated)
shawn closed this issue 2026-05-29 02:29:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-asset-tracker#45