Skip to content

Commit

Permalink
Remove altitude field for ships to get grey icons in skyaware
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrenton committed Jul 28, 2024
1 parent 5e8483c commit 415a2f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ais2adsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 415a2f3

Please sign in to comment.