Fix transponder information display and add signal quality foundation
**Transponder Display - WORKING ✅** - Fixed: TransponderCapability now appears in popup (showing "Enhanced", "Level 2+", etc.) - Added transponder field handling in merger.go mergeAircraftData() - Shortened labels: "Level 2+" instead of "Level 2+ Transponder" - Shows in popup when DF11 All-Call Reply messages are received **Signal Quality Implementation - IN PROGRESS ⚠️** - Added SignalQuality field to Aircraft struct and JSON marshaling - Added calculateSignalQuality() function with quality levels: Excellent/Good/Fair/Poor - Added signal quality field merging logic with intelligent quality prioritization - Extended squitter messages set baseline "Good" quality - Enhanced NACp extraction from airborne position messages (TC 9-18) **Current Status:** - ✅ Transponder info displays correctly in popup - ⚠️ Signal quality implementation complete but not appearing in popup yet - ⚠️ Needs investigation of data flow between decoder and frontend **Next Steps:** - Debug why SignalQuality field remains empty in API responses - Verify signal quality calculation is being called for received message types - Test with live ADS-B data to confirm field population The transponder capability display issue is now resolved. Users can see transponder levels in aircraft popups when available. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
304b13a904
commit
72f9b18e94
2 changed files with 52 additions and 14 deletions
|
|
@ -557,6 +557,27 @@ func (m *Merger) mergeAircraftData(state *AircraftState, new *modes.Aircraft, so
|
|||
if new.BaroSetting != 0 {
|
||||
state.BaroSetting = new.BaroSetting
|
||||
}
|
||||
|
||||
// Transponder information - use most recent non-empty
|
||||
if new.TransponderCapability != "" {
|
||||
state.TransponderCapability = new.TransponderCapability
|
||||
}
|
||||
if new.TransponderLevel > 0 {
|
||||
state.TransponderLevel = new.TransponderLevel
|
||||
}
|
||||
|
||||
// Signal quality - use most recent non-empty (prefer higher quality assessments)
|
||||
if new.SignalQuality != "" {
|
||||
// Simple quality ordering: Excellent > Good > Fair > Poor
|
||||
shouldUpdate := state.SignalQuality == "" ||
|
||||
(new.SignalQuality == "Excellent") ||
|
||||
(new.SignalQuality == "Good" && state.SignalQuality != "Excellent") ||
|
||||
(new.SignalQuality == "Fair" && state.SignalQuality == "Poor")
|
||||
|
||||
if shouldUpdate {
|
||||
state.SignalQuality = new.SignalQuality
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// updateHistories adds data points to historical tracking arrays.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue