Add verbose debug output for MSG,3 parsing

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
James Smith
2025-12-22 13:04:14 +00:00
parent 8c77ae5655
commit acbe51e149
+17 -15
View File
@@ -12104,21 +12104,23 @@ def parse_sbs_stream(service_addr):
aircraft['callsign'] = callsign aircraft['callsign'] = callsign
# MSG,3: position (alt, lat, lon) # MSG,3: position (alt, lat, lon)
elif msg_type == '3' and len(parts) > 15: elif msg_type == '3':
if parts[11]: print(f"[ADS-B] MSG,3 received: parts={len(parts)}, lat={parts[14] if len(parts)>14 else 'N/A'}, lon={parts[15] if len(parts)>15 else 'N/A'}")
try: if len(parts) > 15:
aircraft['altitude'] = int(float(parts[11])) if parts[11]:
except: try:
pass aircraft['altitude'] = int(float(parts[11]))
if parts[14] and parts[15]: except:
try: pass
lat = float(parts[14]) if parts[14] and parts[15]:
lon = float(parts[15]) try:
aircraft['lat'] = lat lat = float(parts[14])
aircraft['lon'] = lon lon = float(parts[15])
print(f"[ADS-B] Position: {icao} at {lat:.4f}, {lon:.4f}") aircraft['lat'] = lat
except: aircraft['lon'] = lon
pass print(f"[ADS-B] Position SET: {icao} at {lat:.4f}, {lon:.4f}")
except Exception as e:
print(f"[ADS-B] Position parse error: {e}")
# MSG,4: velocity (speed, heading) # MSG,4: velocity (speed, heading)
elif msg_type == '4' and len(parts) > 13: elif msg_type == '4' and len(parts) > 13: