From a231c5f2fced7caaa40974f4db0c40d769533053 Mon Sep 17 00:00:00 2001 From: Ole-Morten Duesund Date: Sun, 24 Aug 2025 20:24:48 +0200 Subject: [PATCH] Fix aircraft weight category classification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed incorrect category label: 34000-136000kg is Large, not Medium - Updated JavaScript color matching to properly distinguish categories - Simplified color logic to use category keywords (light/medium/large/heavy) This ensures: - Light aircraft (< 7000kg): Sky blue - Medium aircraft (7000-34000kg): Green - Large aircraft (34000-136000kg): Orange - Heavy aircraft (> 136000kg): Red 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- assets/static/js/modules/aircraft-manager.js | 8 ++++---- internal/modes/decoder.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/static/js/modules/aircraft-manager.js b/assets/static/js/modules/aircraft-manager.js index 347399b..7a18557 100644 --- a/assets/static/js/modules/aircraft-manager.js +++ b/assets/static/js/modules/aircraft-manager.js @@ -290,19 +290,19 @@ export class AircraftManager { // Check for specific weight ranges in the category string // Light aircraft (< 7000kg) - Sky blue - if (cat.includes('light') || cat.includes('7000kg')) { + if (cat.includes('light')) { return '#00bfff'; } // Medium aircraft (7000-34000kg) - Green - if (cat.includes('medium 7000')) { + if (cat.includes('medium')) { return '#00ff88'; } // Large aircraft (34000-136000kg) - Orange - if (cat.includes('medium 34000') || cat.includes('large')) { + if (cat.includes('large') || cat.includes('high vortex')) { return '#ff8c00'; } // Heavy aircraft (> 136000kg) - Red - if (cat.includes('heavy') || cat.includes('136000kg') || cat.includes('super')) { + if (cat.includes('heavy') || cat.includes('super')) { return '#ff0000'; } } diff --git a/internal/modes/decoder.go b/internal/modes/decoder.go index c78c5e2..4dd74cb 100644 --- a/internal/modes/decoder.go +++ b/internal/modes/decoder.go @@ -789,7 +789,7 @@ func (d *Decoder) getAircraftCategory(tc uint8, ca uint8) string { case 2: return "Medium 7000-34000kg" case 3: - return "Medium 34000-136000kg" + return "Large 34000-136000kg" case 4: return "High Vortex Large" case 5: