Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value for Runway visibility P6000 is zero #64

Open
ManojAgrawal opened this issue Sep 27, 2024 · 3 comments
Open

Value for Runway visibility P6000 is zero #64

ManojAgrawal opened this issue Sep 27, 2024 · 3 comments

Comments

@ManojAgrawal
Copy link

Hello,

I am working with some METARs for EWR and I am getting runway visibility for the following METAR as zero

KEWR 091051Z 01018KT R04R/P6000FT -SNPL BKN007 BKN013 OVC032 M01/M02 A2959 RMK AO2 PK WND 01028/1020 SFC VIS 1 1/2 PLB34 SLP018 CIG 006V009 BKN007 V SCT P0006 T10061022 $

[RunwayVisibility(repr='R04R/P6000FT', runway='04R', visibility=Number(repr='P6000', value=None, spoken='greater than six thousand'), variable_visibility=[], trend=None)]

thanks,
Manoj

@devdupont
Copy link
Collaborator

devdupont commented Sep 27, 2024

This is a deliberate decision in the library which we can discuss.

The resolved value is not zero, it is None because it is associated with an imprecise value (in this case, greater than six thousand).

In some circumstances, it may make sense to have a set value, but I don’t think setting 6000 or 9999 makes sense. For other special values, does M1/4 resolve to 0?

There is a list of special numbers available in avwx.static for reference.

@ManojAgrawal
Copy link
Author

Thanks for the response. I have seen in FAA database that they sometimes interpret P6SM as 8SM. Maybe, something similar can be done here because it seems a little odd to have value of greater than 6000FT represented as 'None'.

@devdupont
Copy link
Collaborator

Perhaps a clearer way of doing it would be to add a precise=T/F flag in the Number object and provide those 99% reasonable values in their stead. At the end of the day, it’s still on the developer and pilots to check the original representation. Adding this flag should make that easier without needing to do string comparisons etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants