FSDeveloper Community

Go Back   FSDeveloper Community > Microsoft Flight Simulator development > SimConnect > SimConnect

SimConnect Use this forum for all your SimConnect related discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02 Apr 2011, 16:45
AndyWoz AndyWoz is offline
  unitedstates
Location: KMKE
Join Date: Jan 2010
Posts: 9
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.

AW
Reply With Quote
  #2  
Old 02 Apr 2011, 22:09
Geoff_D Geoff_D is offline
  unitedstates
Join Date: Feb 2007
Posts: 366
Quote:
Originally Posted by AndyWoz View Post
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
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.

Yes, it's a Challenge ...

Geoff
Reply With Quote
  #3  
Old 03 Apr 2011, 06:37
JardY JardY is offline
  france
Join Date: Aug 2010
Posts: 45
Send a message via Skype™ to JardY
To decode FSX real weather, I'm using the following function made be me (so sorry for the ugly code and for the french variables & comments).

There are still many cases I'm not taking in account, so it will be great to develop a class or function very reliable and complete

DecodeMeteo.cs
Reply With Quote
  #4  
Old 06 Apr 2011, 23:48
AndyWoz AndyWoz is offline
  unitedstates
Location: KMKE
Join Date: Jan 2010
Posts: 9
Quote:
Originally Posted by JardY View Post
To decode FSX real weather, I'm using the following function made be me
Thanks. I wish I had waited for your reply. As it were, I ended up writing a 650+ line class, and I am not even done yet.


Quote:
Originally Posted by JardY View Post
There are still many cases I'm not taking in account, so it will be great to develop a class or function very reliable and complete
My class is not complete by any means, but so far it has proven quite reliable. I'll publish it soon.

Meanwhile, I discovered that FSX lies about the weather. It reports clear skies when there are scattered or even broken clouds visible...

AW
Reply With Quote
  #5  
Old 16 Apr 2011, 18:20
AndyWoz AndyWoz is offline
  unitedstates
Location: KMKE
Join Date: Jan 2010
Posts: 9
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.

-AW
Reply With Quote
  #6  
Old 30 Jun 2011, 21:20
Vitus's Avatar
Vitus Vitus is offline
  newzealand
Location: Auckland, New Zealand
Join Date: Nov 2006
Posts: 700
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.

Cheers,
Vitus
__________________
Reply With Quote
  #7  
Old 01 Jul 2011, 10:29
ddawson's Avatar
ddawson ddawson is offline
  canada
Location: Ottawa, Canada
Join Date: Sep 2006
Posts: 273
Quote:
Originally Posted by Vitus View Post
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.

Cheers,
Vitus
I'm starting from scratch here, but I'll take a kick at it.

Doug
Reply With Quote
  #8  
Old 04 Jul 2011, 19:08
Vitus's Avatar
Vitus Vitus is offline
  newzealand
Location: Auckland, New Zealand
Join Date: Nov 2006
Posts: 700
Quote:
Originally Posted by ddawson View Post
I'm starting from scratch here, but I'll take a kick at it.

Doug
Hey Doug,

coooooool! I'd love to read about your experience!
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.ASM file format results incorrect vs. require format johnnyboy General 1 11 Jan 2011 20:12
Open .air format Simon853 FSX SDK feedback 0 22 Jan 2008 18:23
Sending Metar to FSX pdgnr SimConnect 3 04 Dec 2006 04:53
Sending Metar to FSX pdgnr SimConnect 0 02 Dec 2006 07:34


All times are GMT -4. The time now is 15:28.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.