Metar::ParseError: Expecting temperature/dew point on valid METAR
Closed this issue · 4 comments
Metar::ParseError: Expecting temperature/dew point, found '36007KT' for KHWD 280554Z AUTO 36007KT 10SM OVC008 14/12 A3002 RMK AO2 SLP176 T01390117 10211
I extended the ParseError string to show the raw METAR passed in, and see a number of failures with this same look. The METAR is well formed, so I am not sure what the issue is. Most of the time, things are working fine.
I used approach 1 that I discussed in #6, where I get the METAR raw reports myself, then manually create a Metar::Raw and parser, and use that data.
Does the METAR above look off to you at all?
FYI, here are a few more affected raw METARs:
KSTL 280351Z 36006KT 10SM CLR 28/15 A3000 RMK AO2 SLP143 T02780150
KDVO 280455Z AUTO 36005KT 10SM CLR 13/11 A3000 RMK AO2
Ah, given another one, the pattern is clear. A wind direction of 360 causes this.
Currently, wind directions of 0 - 359 are accepted.
360 is clearly a "wrong" value, but I've just run a check and the value appears quite frequently.
I'll add a check in Metar::Wind and fold 360 to 0.
I've made the change and released a new gem (v0.9.15)