From 415a2f39c3dcc8dcf9cbb85d685b8feb0ea6a080 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Sun, 28 Jul 2024 10:25:00 +0100 Subject: [PATCH] Remove altitude field for ships to get grey icons in skyaware --- ais2adsb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ais2adsb.py b/ais2adsb.py index 5a937ef..5bd2f8e 100755 --- a/ais2adsb.py +++ b/ais2adsb.py @@ -148,10 +148,11 @@ def sendBaseStation(decoded): tstr = now_utc.strftime("%H:%M:%S.%f")[:-3] callsign = "V:" + ("00000" + str(decoded['mmsi']) )[-6:] ground_flag = 1 if alt < 1 else 0 + alt_str = "" if alt < 1 else str(alt) global client_socket - spos = f'MSG,2,1,0,{ICAO},1,{dstr},{tstr},{dstr},{tstr},,{alt},{speed},{heading},{lat},{lon},,,,,,{ground_flag}\n' + spos = f'MSG,2,1,0,{ICAO},1,{dstr},{tstr},{dstr},{tstr},,{alt_str},{speed},{heading},{lat},{lon},,,,,,{ground_flag}\n' scs = f'MSG,1,1,0,{ICAO},1,{dstr},{tstr},{dstr},{tstr},{callsign},,,,,,,,,,,\n' if client_socket == None: