β¨ Feature Specification: OSNMA User Notification in PIC2BIM iOS#
π Objective#
Enhance the PIC2BIM iOS application by adding user-facing notifications and indicators for OSNMA-enabled GNSS satellite validation, aligning with the feature set found in the Android counterpart.
π§© Scope#
This specification introduces real-time OSNMA validation feedback to users during GNSS-based photo capture and general app operation.
π§ Target Files#
ViewControllers/CameraViewController.swift
ViewControllers/MainViewController.swift
ViewControllers/SettingViewController.swift
Model/Satellite.swift
(or equivalent)UI/Components/StatusBanner.swift
(new)Assets.xcassets
(icons for OSNMA status)
β Functional Requirements#
1. Real-Time OSNMA Status Indicator#
- Add a label or icon on the Camera and MainViewController UI to indicate:
- π’ "OSNMA Enabled" when at least one PRN is validated.
- π΄ "Unverified GNSS" if no OSNMA satellites are available.
- Update this every few seconds as GNSS data changes.
2. User Alerts#
- Add a non-intrusive toast or banner message when:
- A photo is taken without OSNMA validation.
- OSNMA signal is restored.
- Shown in both
CameraViewController
andMainViewController
.
3. Settings Toggle#
- In
SettingViewController.swift
, add: [x] Require OSNMA for Metadata
- If enabled, photo capture is blocked when no OSNMA satellites are validated.
π¦ Non-Functional Requirements#
- Performance: UI updates must not block camera or main GNSS UI.
- Battery: Should not excessively poll GNSS if backgrounded.
- Localization: OSNMA status messages should be translatable.
π± UI Design Recommendations#
State | UI Element | Description |
---|---|---|
OSNMA Valid | π’ Green check / βSecure GNSSβ | OSNMA PRN available |
OSNMA Invalid | π΄ Red warning / βUnverified GNSSβ | No valid PRN with OSNMA detected |
Warning | β οΈ Toast banner | Shown in Camera or MainViewController |
π§ͺ Test Cases#
- Simulate OSNMA-enabled PRNs with test GNSS data β Confirm green icon.
- Capture photo without valid PRN β Show warning in
CameraViewController
. - Navigate main screen with no OSNMA β Show alert in
MainViewController
. - Toggle setting βRequire OSNMAβ β Block capture if no PRNs.
π Follow-Up#
- After implementation, align with Android UI team to verify consistency.
- Document any iOS-specific logic or fallback paths for missing OSNMA.