TFR context overide variable fix
This commit is contained in:
parent
148b40ddba
commit
fb4ed68b15
|
@ -765,7 +765,6 @@ class Plane:
|
|||
return tfr_map_filename
|
||||
|
||||
from defSS import get_adsbx_screenshot
|
||||
|
||||
url_params = f"largeMode=2&hideButtons&hideSidebar&mapDim=0&zoom=10&icao={self.icao}&overlays={self.get_adsbx_map_overlays()}"
|
||||
get_adsbx_screenshot(self.map_file_name, url_params, overrides=self.overrides)
|
||||
if nearest_airport_dict['distance_mi'] < 3:
|
||||
|
@ -777,8 +776,8 @@ class Plane:
|
|||
message = f"Circling {round(nearest_airport_dict['distance_mi'], 2)}mi {cardinal} of {nearest_airport_dict['icao']}, {nearest_airport_dict['name']} at {self.alt_ft}ft. "
|
||||
tfr_map_filename = None
|
||||
if in_tfr is not None:
|
||||
context = "Inside" if 'context' not in in_tfr.keys() else "Above" if in_tfr['context'] == 'above' else "Below"
|
||||
message += f" {context} TFR {in_tfr['info']['NOTAM']}, a TFR for {in_tfr['info']['Type'].title()}"
|
||||
wording_context = "Inside" if 'context' not in in_tfr.keys() else "Above" if in_tfr['context'] == 'above' else "Below"
|
||||
message += f" {wording_context} TFR {in_tfr['info']['NOTAM']}, a TFR for {in_tfr['info']['Type'].title()}"
|
||||
tfr_map_filename = tfr_image(context, (self.latitude, self.longitude))
|
||||
elif in_tfr is None and closest_tfr is not None and "distance" in closest_tfr.keys() and closest_tfr["distance"] <= 20:
|
||||
message += f" {closest_tfr['distance']} miles from TFR {closest_tfr['info']['NOTAM']}, a TFR for {closest_tfr['info']['Type']}"
|
||||
|
|
Loading…
Reference in New Issue