avwx-rest / avwx-engine

Aviation Weather parsing engine. METAR & TAF
MIT License
89 stars 30 forks source link

Add handling for special visibility string `M1SM` as `less than one` #49

Closed NickGlauberCirium closed 1 year ago

NickGlauberCirium commented 1 year ago

Add handling for special visibility string M1SM as less than one

Spotted in a METAR string, M1SM should be parsed as "visibility less than one statute mile".

A search shows references to this string. For example, this page uses M1SM example of "M" as a prefix standing for "less than": https://wiki.ivao.aero/en/home/training/documentation/METAR_explanation

Checklist

NickGlauberCirium commented 1 year ago

I actually ran into some other visibility strings prefixed with "M" or "P", so I took a stab at implementing generic M-as-less-than and P-as-greater-than handling. I'm going to close this PR in favor of that one.