Skip to content

Add terrain and traffic alerts/warnings, track log, distance rings - #12

Merged
h2orules merged 3 commits into
mainfrom
user/h2orules/traffic-and-terrain
Jul 13, 2026
Merged

h2orules merged 3 commits into
mainfrom
user/h2orules/traffic-and-terrain

Conversation

@h2orules

Copy link
Copy Markdown
Owner

This pull request introduces a comprehensive path-prediction, conflict, and terrain alerting engine to the app, along with related architectural and documentation updates. It adds new stores and services for path prediction, track logging, and terrain scanning, and updates the UI overlays and documentation to reflect these features. The change also expands test coverage and clarifies the app’s advisory-only status regarding conflict information.

Major feature: Path prediction, conflict, and terrain alerting engine

  • Architecture & State Management

    • Added a new path store to Zustand, updated the store count in both documentation and code structure references, and included new shared types for path prediction. [1] [2]
    • Introduced new geo functions and services for prediction, hold entry, conflicts, terrain scanning, TCAS tables, range rings, track logging, and terrain elevation.
  • Path Prediction & Alerting Engine

    • Implemented a per-poll path prediction engine (usePathEngine.ts) that predicts aircraft positions, detects hold entries, evaluates traffic conflicts (TCAS TA/RA, radar tiers), and performs terrain scanning with MVA and DEM data. Results are stored in the new path store and drive overlays and alert UI.
    • Ensured terrain alerting loads MVA sectors and prefetches nearby DEM tiles independently of display toggles, with efficient cache and async fetch behavior.
    • Added a real-time, imperative RangeRingsLayer overlay that tracks the selected aircraft’s interpolated position every frame, alongside overlays for track logs, hold entries, and predicted paths. [1] [2]
  • UI & Documentation Updates

    • Updated the documentation to describe the new overlays, their order, and how they interact with aircraft selection and alerting. Clarified that overlays and data blocks now render traffic/terrain alert chrome.
    • Clarified in the Not For Navigation disclaimer that while conflict indicators are shown, separation and deconfliction are not guaranteed.
    • Added CSS documentation for label separation logic in conflict pairs.
  • Configuration & Testing

    • Documented new configuration groups for the path-prediction engine (e.g., TRACKLOG_*, PREDICT_*, HOLD_ENTRY_*, CONFLICT_*, RADAR_*, TERRAIN_*, RING_ZOOM_BUCKETS) and updated test coverage expectations for the new logic.
    • Increased the documented test count to reflect new unit tests for the path-prediction and alerting logic.
  • CIFP Parser Version Bump

    • Bumped the CIFP parser version from 21 to 23 to invalidate stale/buggy parses after parser logic changes.

h2orules added 3 commits July 12, 2026 20:53
- Implemented terrain elevation service with caching and LRU eviction.
- Added decoding logic for terrain-rgb tiles and elevation calculations.
- Created tests for terrain elevation functions including decoding, fetching, and caching behavior.

feat: add track log service and tests

- Introduced track log service to record and manage aircraft track points.
- Implemented deduplication of points based on polling time and capacity management.
- Added tests to verify track log functionality including recording, retrieval, and pruning.

feat: add known airports service

- Created a service to manage known US airport data with warming and proximity querying.
- Implemented functions to fetch and normalize airport data from static sources.

feat: add path store with Zustand

- Implemented a Zustand store for managing path predictions, hold entries, alerts, and conflict pairs.
- Added functionality for setting results and clearing state with revision tracking.

test: add unit tests for path store

- Created tests for the path store to verify state management and result handling.
- Ensured correct behavior for setting results and clearing the store.
- Implemented a toggle for displaying predicted hold-entry paths in the HoldEntryLayer component, defaulting to off.
- Enhanced PathControls to include a button for toggling hold entries visibility.
- Updated the settings store to manage the new hold entry toggle state.
- Introduced constants for hold entry confirmation and abandonment criteria to improve entry prediction accuracy.
- Modified the hold entry logic to require multiple consecutive qualifying polls before drawing an entry, preventing transient qualifications from causing visual artifacts.
- Updated terrain scanning logic to ensure proper handling of MVA sectors and DEM ground clearance, improving safety alerts.
- Added tests to validate the new hold entry confirmation logic and ensure correct behavior under various conditions.
@h2orules
h2orules merged commit 58cc12c into main Jul 13, 2026
3 checks passed
@h2orules
h2orules deleted the user/h2orules/traffic-and-terrain branch July 13, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant