StevenFrost / AviationWeather

A C++ library for formatting and parsing various meteorology-related data structures
Other
4 stars 1 forks source link

Intensity parsed incorrectly #43

Open ollyau opened 8 years ago

ollyau commented 8 years ago

I was adding tests from the METAR examples in AC 00-45G and the AIM and found that the following METAR results in an assertion when testing the weather group:

SPECI KMSN 012312Z 13021G26KT 1SM -FZRAPL BR OVC011 00/M02 A2988 RMK AO2 PK WND 14031/2255 SFC VIS 1 1/2 P0005 $

Assert failed. Expected:<light> Actual:<moderate>

StevenFrost commented 8 years ago

This is an error in the weather group regex, which only allows FZ to be combined with one of FG, DZ or RA. The substring 'RAPL' gets parsed since that is the first and "best" match.