skyview/internal
Ole-Morten Duesund 10508c2dc6 fix: Implement dynamic age calculation for aircraft tracking
Resolves issue #3 where aircraft age field was always showing 0 seconds.

Backend Changes:
- Fix MarshalJSON in merger.go to calculate age dynamically using time.Since(a.LastUpdate)
- Add comprehensive tests for age calculation in merger_test.go

Frontend Changes:
- Add calculateAge() utility method to both aircraft-manager.js and ui-manager.js
- Update popup content and aircraft table to use client-side age calculation
- Implement real-time age updates every second in app.js
- Add updateOpenPopupAges() function to refresh popup displays

Key Benefits:
- Aircraft age now shows actual seconds since last transmission
- Real-time updates in UI without requiring new WebSocket data
- Proper data staleness indicators for aviation tracking
- No additional server load - client-side calculation using last_update timestamp

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 10:29:35 +02:00
..
beast Clean up codebase and fix server host binding for IPv6 support 2025-08-24 18:36:14 +02:00
client Fix issue #21 and add aircraft position tracking indicators 2025-08-31 11:25:42 +02:00
database style: Apply code formatting with go fmt 2025-09-01 10:05:29 +02:00
icao Clean up codebase and fix server host binding for IPv6 support 2025-08-24 18:36:14 +02:00
merger fix: Implement dynamic age calculation for aircraft tracking 2025-09-01 10:29:35 +02:00
modes Implement transponder code (squawk) lookup and textual descriptions 2025-08-31 12:02:02 +02:00
server style: Apply code formatting with go fmt 2025-09-01 10:05:29 +02:00
squawk style: Apply code formatting with go fmt 2025-09-01 10:05:29 +02:00
vrs Fix issue #21 and add aircraft position tracking indicators 2025-08-31 11:25:42 +02:00