The Minimum visibility and direction of the minimum visibility in METARs are ignored
Closed this issue · 0 comments
leodevida commented
The METAR component "Minimum visibility and direction of the minimum visibility" is not parsed, and it is ignored.
For example this METAR
SUMU 070520Z 34025KT 8000 2000SW VCSH SCT013CB BKN026 00/M05 Q1012 TEMPO 2000 SHSN=
Has a value of 2000SW for the component "Minimum visibility and direction of the minimum visibility" but it is not being parsed.
The problem is that in MinimalVisibilityCommand.java the regular expression pattern expects characters "a-z" in lower case, but they should be in upper-case. Furthermore, the cardinal points can be one or two letters, as in "S" or "SW" and not just one letter.
I suggest to change the current
_Pattern MIN_VISIBILITY_REGEX = Pattern.compile("^(\\d{4}[a-z])$");_
To this one
_Pattern MIN_VISIBILITY_REGEX = Pattern.compile("^(\\d{4}[A-Z]{1,2})$");_