keesL / metar

METAR reports are meteorogical weather reports for aviation. Metar is a small program which downloads weather reports for user-specified stations and optionally decodes them into a human-readable format.
GNU General Public License v2.0
11 stars 10 forks source link

MPS (meters per second) support #3

Closed mwgg closed 7 years ago

mwgg commented 7 years ago

Hi,

The program should support wind in meters per second, which is common for Russia and some other countries. Currently this is causing erroneous output:

UUEE 231300Z 27006MPS 9999 SCT049 08/M02 Q1019 R24R/CLRD62 R24L/CLRD62 NOSIG
...
Parsing token `27006MPS'
   Unmatched token = 27006MPS
...
Wind direction: 0 (N)
Wind speed    : 0
Wind gust     : 0

My regex skill aren't up to par, otherwise I would help out. Thanks!

keesL commented 7 years ago

Thank you for the suggestion; I was unaware of the practice. I'll add it to my TODO list, but due to workload constraints, I cannot promise that I'll get around to it soon.

keesL commented 7 years ago

Metar will now recognize mps as a valid unit for wind speeds.

keesL commented 7 years ago

closes #3