This project is read-only.

Feature request: Indication of decoded extent


Reports containing errors, such as the "99999" in the following are not necessarily detected as errors. Some errors produce an exception, while others simply stop the processing of trends and end the decoding prematurely.

I can see that it would be difficult to detect every sort of error, since a failed pattern match does not necessarily indicate a problem.

It would be helpful, however, if the decoder kept track of what portion of the input had been processed. This would allow the caller to do something with the rest of the input trailing after the report, or to detect that the decoding had aborted early, if it's known that there are no extra characters.
TAF YMML 212307Z 2200/2306
19007KT 9999 -RA FEW010 BKN020
BECMG 2202/2204 14006KT 9999 -SHRA FEW018 BKN030
BECMG 2210/2212 32012KT 9999 -SHRA FEW015 SCT035 BKN075
BECMG 2218/2220 23016G26KT 9999 -SHRA SCT008 BKN020
BECMG 2300/2302 25015KT 99999 -SHRA SCT020 BKN035
INTER 2200/2201 5000 SHRA BKN006
INTER 2201/2214 5000 SHRA BKN010
TEMPO 2214/2224 5000 -RA BKN006
INTER 2300/2304 5000 SHRA BKN012
PROB30 INTER 2206/2212 VRB20G35KT 2000 TSRA BKN006 SCT050CB
RMK FM221000 MOD TURB BLW 5000FT TILL222200
T 14 16 17 16 Q 1012 1010 1007 1005