Fix issue #21 and add aircraft position tracking indicators #29

Merged
olemd merged 2 commits from feature/position-tracking-fixes into main 2025-08-31 11:41:48 +02:00
Owner

Summary

This PR addresses issue #21 and adds aircraft position tracking indicators as requested:

Fix issue #21: Debian package upgrade issue resolved by separating upgrade vs remove behavior in the prerm script. The package now properly preserves systemd service enabled state during upgrades.

Aircraft position tracking indicators: Enhanced statistics to show how many aircraft have position data vs those without. This information is now displayed in:

  • Header stats summary: "X positioned" indicator
  • Statistics view: Separate cards for "Aircraft with Position" and "Aircraft without Position"
  • Backend statistics include aircraft_with_position and aircraft_without_position counters

Technical Details

Issue #21 Fix

  • Updated debian/DEBIAN/prerm script to handle upgrade case separately from remove|deconfigure
  • During upgrades: only stop service, preserve enabled state
  • During removal: stop and disable service completely
  • Postinst script will restart service if it was previously enabled

Position Tracking Feature

  • Enhanced merger.GetStatistics() to count aircraft with/without valid position data
  • Updated frontend HTML to include new stat cards and header indicator
  • Modified ui-manager.js to display backend position statistics
  • Position validity determined by PositionValid flag and non-zero lat/lon coordinates

Test Plan

  • Application builds and runs successfully
  • Go code formatting and vet checks pass
  • Debian package builds without errors
  • Both Beast and VRS sources connect properly
  • Position tracking statistics display correctly in UI

Both fixes improve the user experience by providing better package upgrade behavior and enhanced visibility into aircraft tracking status.

## Summary This PR addresses issue #21 and adds aircraft position tracking indicators as requested: • **Fix issue #21**: Debian package upgrade issue resolved by separating upgrade vs remove behavior in the prerm script. The package now properly preserves systemd service enabled state during upgrades. • **Aircraft position tracking indicators**: Enhanced statistics to show how many aircraft have position data vs those without. This information is now displayed in: - Header stats summary: "X positioned" indicator - Statistics view: Separate cards for "Aircraft with Position" and "Aircraft without Position" - Backend statistics include `aircraft_with_position` and `aircraft_without_position` counters ## Technical Details ### Issue #21 Fix - Updated `debian/DEBIAN/prerm` script to handle `upgrade` case separately from `remove|deconfigure` - During upgrades: only stop service, preserve enabled state - During removal: stop and disable service completely - Postinst script will restart service if it was previously enabled ### Position Tracking Feature - Enhanced `merger.GetStatistics()` to count aircraft with/without valid position data - Updated frontend HTML to include new stat cards and header indicator - Modified `ui-manager.js` to display backend position statistics - Position validity determined by `PositionValid` flag and non-zero lat/lon coordinates ## Test Plan - [x] Application builds and runs successfully - [x] Go code formatting and vet checks pass - [x] Debian package builds without errors - [x] Both Beast and VRS sources connect properly - [x] Position tracking statistics display correctly in UI Both fixes improve the user experience by providing better package upgrade behavior and enhanced visibility into aircraft tracking status.
- Fix Debian package upgrade issue by separating upgrade vs remove behavior in prerm script
- Add aircraft position tracking statistics in merger GetStatistics() method
- Update frontend to display position tracking indicators in both header and stats view
- Format Go code to maintain consistency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The Beast decoder was not setting PositionValid=true after successfully
decoding aircraft positions, causing position tracking statistics to
show 0 positioned aircraft even when aircraft had valid coordinates.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
olemd merged commit ec676f678a into main 2025-08-31 11:41:48 +02:00
olemd deleted branch feature/position-tracking-fixes 2025-08-31 11:41:48 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: olemd/skyview#29
No description provided.