Add types and altitudes to SIG Ref lookups

This commit is contained in:
Ian Renton
2026-08-14 14:57:48 +01:00
parent 605b629d43
commit e94d4bd927
29 changed files with 69 additions and 23 deletions
+4
View File
@@ -29,6 +29,7 @@ def get_sig_ref_info(sig, ref_id):
# If the SIG is HEMA, we have no current lookup for this so just skip the lookup here.
if sig.upper() == "HEMA":
sig_ref.type = "Summit"
return sig_ref
### PROGRAMMATIC DATA GENERATION INSTEAD OF LOOKUPS ###
@@ -37,6 +38,7 @@ def get_sig_ref_info(sig, ref_id):
# calculate all the information we are going to get directly.
if sig.upper() == "TILES":
# Tiles on the Air just uses Maidenhead 6-digit squares, so ID, Name and Grid are all the same
sig_ref.type = "Grid"
if not sig_ref.name:
sig_ref.name = sig_ref.id
if not sig_ref.grid:
@@ -48,6 +50,7 @@ def get_sig_ref_info(sig, ref_id):
return sig_ref
elif sig.upper() == "WAB" or sig.upper() == "WAI":
sig_ref.type = "Grid"
ll = wab_wai_square_to_lat_lon(ref_id)
if ll:
sig_ref.name = ref_id
@@ -61,6 +64,7 @@ def get_sig_ref_info(sig, ref_id):
elif sig.upper() == "BOTA":
# For BOTA all we can ever generate is the URL, there is no data file or lookup for lat/longs
sig_ref.type = "Beach"
if not sig_ref.name:
sig_ref.name = sig_ref.id
sig_ref.url = "https://www.beachesontheair.com/beaches/" + sig_ref.name.lower().replace(" ", "-")