ValerXenus / MetarParserCore

A .NET Core library intended for decoding raw METAR data
MIT License
4 stars 2 forks source link

VCTS is not recognized #6

Open jaoord opened 1 year ago

jaoord commented 1 year ago

Hi,

Given the following METAR

RCNN 031120Z 02024G38KT 5000 VCTS BR SCT006 FEW010CB BKN016 OVC030 26/24 Q0984 RERA RMK A2908 TS NW STNRY

I get the following result from the decoder

image

I would expect weather conditions to contain vicinity, thunderstorm

jaoord commented 1 year ago

I have sort of fixed this now by changing the present weather regex to

@"^(-|\+|VC)?(BC|BL|DR|FZ|MI|PR|SH|TS)?(DZ|GR|GS|IC|PL|RA|SG|SN|UP|BR|DU|FG|FU|HZ|PY|SA|VA|DS|FC|PO|SQ|SS|TS){1,3}$";

so basically adding |TS to the end of the third group. not sure if that is how it supposed to work, but it does the job for me

ValerXenus commented 1 year ago

Well, you are really found a bug. I'll check and fix it in the next release. Thank you for the issue!