From 29aedb5b50f55a0f968a035fe30603984e150565 Mon Sep 17 00:00:00 2001 From: Ole-Morten Duesund Date: Sun, 24 Aug 2025 21:43:15 +0200 Subject: [PATCH] Remove arbitrary 600kt speed cap from Mode S decoder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The decoder was capping all speeds at 600kt before validation, which caused: 1. Corrupt helicopter data to show false 600kt readings 2. Legitimate high-speed aircraft to be incorrectly limited 3. Validation logic in merger to miss corrupt data detection The merger already has proper speed validation at 2000kt (Mach 3) and position-based validation that catches impossible speeds from corrupt data regardless of aircraft type. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/modes/decoder.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/modes/decoder.go b/internal/modes/decoder.go index 4dd74cb..97bafab 100644 --- a/internal/modes/decoder.go +++ b/internal/modes/decoder.go @@ -621,10 +621,6 @@ func (d *Decoder) decodeVelocity(data []byte, aircraft *Aircraft) { // Calculate ground speed in knots (rounded to integer) speedKnots := math.Sqrt(ewVel*ewVel + nsVel*nsVel) - // Validate speed range (0-600 knots for civilian aircraft) - if speedKnots > 600 { - speedKnots = 600 // Cap at reasonable maximum - } aircraft.GroundSpeed = int(math.Round(speedKnots)) // Calculate track in degrees (0-359)