You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried out a few different metar builds for the map I built, and this one is by far the nicest to use. I did run into one issue, however.
I had a couple of airports lighting up as VFR even though they have low visibility being reported. Looking at the logs, these airports were not reporting ceilings or flight categories. After digging around a bit, I found this in lines 1259-1263 of the metar-v4.py:
#visibilty can also set flight category. If the clouds haven't set the fltcat to LIFR. See if visibility will
if flightcategory != "LIFR": #if it's LIFR due to cloud layer, no reason to check any other things that can set flight category.
if metar.find('./forecast/visibility_statute_mi') is not None: #check XML if visibility value exists
visibility_statute_mi = metar.find('./forecast/visibility_statute_mi').text #get visibility number
visibility_statute_mi = float(visibility_statute_mi)
I'm not sure if this is the root of the problem (I'm not great with python), but changing the two instances of metar.find('./forecast/visibility_statute_mi') to metar.find('visibility_statute_mi') to grab the reported visibility seems to have resolved the issue and the problem airports are now lighting up according the visibility rules. With no forecast data or ceilings being reported, I think the code was just keeping the VFR assumption.
The text was updated successfully, but these errors were encountered:
On Sun, Dec 25, 2022 at 6:46 PM benshaw5 ***@***.***> wrote:
I've tried out a few different metar builds for the map I built, and this
one is by far the nicest to use. I did run into one issue, however.
I had a couple of airports lighting up as VFR even though they have low
visibility being reported. Looking at the logs, these airports were not
reporting ceilings or flight categories. After digging around a bit, I
found this in lines 1259-1263 of the metar-v4.py:
#visibilty can also set flight category. If the clouds haven't set the fltcat to LIFR. See if visibility will
if flightcategory != "LIFR": #if it's LIFR due to cloud layer, no reason to check any other things that can set flight category.
if metar.find('./forecast/visibility_statute_mi') is not None: #check XML if visibility value exists
visibility_statute_mi = metar.find('./forecast/visibility_statute_mi').text #get visibility number
visibility_statute_mi = float(visibility_statute_mi)
I'm not sure if this is the root of the problem (I'm not great with
python), but changing the two instances of
metar.find('./forecast/visibility_statute_mi') to
metar.find('visibility_statute_mi') to grab the reported visibility seems
to have resolved the issue and the problem airports are now lighting up
according the visibility rules. With no forecast data or ceilings being
reported, I think the code was just keeping the VFR assumption.
—
Reply to this email directly, view it on GitHub
<#23>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJKUXS6B7JJWJEPQW4E6A5LWPD2FRANCNFSM6AAAAAATJIYROU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
I've tried out a few different metar builds for the map I built, and this one is by far the nicest to use. I did run into one issue, however.
I had a couple of airports lighting up as VFR even though they have low visibility being reported. Looking at the logs, these airports were not reporting ceilings or flight categories. After digging around a bit, I found this in lines 1259-1263 of the metar-v4.py:
I'm not sure if this is the root of the problem (I'm not great with python), but changing the two instances of metar.find('./forecast/visibility_statute_mi') to metar.find('visibility_statute_mi') to grab the reported visibility seems to have resolved the issue and the problem airports are now lighting up according the visibility rules. With no forecast data or ceilings being reported, I think the code was just keeping the VFR assumption.
The text was updated successfully, but these errors were encountered: