FSX METAR Format Decoder

This question pops up with regularity on various sub-fora here and, as far as I can see, has never received a satisfactory response. Since hope springs eternal, I thought I'd give it new life by asking it again: Does anyone have an FSX METAR decoder class/function that they are willing to share? (Notice the emphasis on FSX METAR; standard FAA METARs - while not trivial - are simpler.)

I am building one right now and it causes me to want to pull all my hair out in frustration. Not only is FSX METAR a METAR - i.e. something inherently hard to parse - but it features all kinds of extensions and optional parts that make it even harder, without employing some Artificial Intelligence, it seems. Why does it have to be so complicated?

Anyway, I would appreciate any and all help in finding/developing a viable FSX METAR parser/decoder. I will publish the results for all to see, if I ever get to the point of being able to fully parse and interpret an FSX-generated METAR.

This question pops up with regularity on various sub-fora here and, as far as I can see, has never received a satisfactory response. Since hope springs eternal, I thought I'd give it new life by asking it again: Does anyone have an FSX METAR decoder class/function that they are willing to share? (Notice the emphasis on FSX METAR; standard FAA METARs - while not trivial - are simpler.)

I am building one right now and it causes me to want to pull all my hair out in frustration. Not only is FSX METAR a METAR - i.e. something inherently hard to parse - but it features all kinds of extensions and optional parts that make it even harder, without employing some Artificial Intelligence, it seems. Why does it have to be so complicated?

Anyway, I would appreciate any and all help in finding/developing a viable FSX METAR parser/decoder. I will publish the results for all to see, if I ever get to the point of being able to fully parse and interpret an FSX-generated METAR.

AW

Click to expand...

I asked the same about 5 months ago

I friend, who is a METAR Decoder Software GURU, was starting to work on it, and was unfortunally taken ill, so the project is on hold.

So here is my take on the task of parsing an FSX METAR. You can download the result of my attempts at http://navsim.org/files/ParseMetar.0.1.0.zip. It's a Pascal (Delphi 7) project, containing a simple command-line harness, and the parser class (TMetarParser).

The parser is a Finite State Machine with 15 states currently. I realize that it is still inadequate in many ways, as it is unfinished, but it works most of the time. I will be very interested in seeing examples of FSX-generated METARs that are not parsed correctly.

I'm interested in a Metar parser for C++. I can get the metar string with simConnect but I am completely stuck. Started to look at regex, but it's horrible to implement in C++. So I'd be grateful if someone could share their solution or at least give some clues how to proceed.

I'm interested in a Metar parser for C++. I can get the metar string with simConnect but I am completely stuck. Started to look at regex, but it's horrible to implement in C++. So I'd be grateful if someone could share their solution or at least give some clues how to proceed.