Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not recognised by the parser: AO2A ... #1

Open
bovine opened this issue Oct 3, 2019 · 6 comments
Open

Not recognised by the parser: AO2A ... #1

bovine opened this issue Oct 3, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@bovine
Copy link

bovine commented Oct 3, 2019

Are you interested in issues about missing parsing logic?

This METAR has a few examples of things that are not currently parsed:

Parsing report: PHHI 262356Z 29009KT 4SM -SHRA BR VCTS FEW005 BKN016 OVC020CB 25/24 A2989 RMK AO2A DZE2259RAB2259E16DZB16E22RAB37 TS 7E MOV NE CIG 016V020 SLP111 P0007 60007 T02470238 10295 20243 57016 $
Detected report type: METAR
21 groups parsed
ICAO location: PHHI
Report Release Time: 262356Z
Wind: 29009KT
Visibility: 4SM
Weather Phenomena: -SHRA
Weather Phenomena: BR
Weather Phenomena: VCTS
Cloud Data: FEW005
Cloud Data: BKN016
Cloud Data: OVC020CB
Temperature and Dew Point: 25/24
Pressure: A2989
Fixed Text: RMK
Not recognised by the parser: AO2A DZE2259RAB2259E16DZB16E22RAB37 TS 7E MOV NE CIG 016V020
Pressure: SLP111
Precipitation: P0007
Precipitation: 60007
Temperature and Dew Point: T02470238
Minimum/Maximum Temperature: 10295 20243
Pressure Tendency: 57016
Fixed Text: $

Some of those unparsed elements should be something similar to the following fragment (from mdsplib):

auto_indicator AO2A {recent_weather RA begin_seconds 2242740 end_seconds 2160960} {recent_weather DZ begin_seconds 2160960 end_seconds 2161320}} ceiling_variable_min_ft 16 ceiling_variable_max_ft 20 sea_level_pressure_hectopascals 1011.0999755859375 precip_hourly_inches 0.07000000029802322 precip_3_6_hour_inches 0.07000000029802322 temperature_max_celsius 29.5 temperature_min_celsius 24.299999237060547 char_pressure_tendency 7 pressure_tendency_hectopascals 1.600000023841858
@bovine
Copy link
Author

bovine commented Oct 3, 2019

I've also noticed that a few of the groups, like LightningGroup, do not seem to have any members or parsing implementation. Maybe it would be good to document a list of the incomplete portions in the readme, or add TODO comments in the code?

@nnaumenko
Copy link
Owner

Thank you, I'm definitely interested in adding more groups to the parser.

AO2A

I was not aware of this one. Remarks are rarely used in my region.

DZE2259RAB2259E16DZB16E22RAB37

This is a planned feature, WeatherBeginEndGroup is reserved for it (no parsing functionality yet).

TS 7E MOV NE

Also planned feature, VicinityGroup is reserved it (likewise no parsing functionality yet).

CIG 016V020

Planned feature, CloudGroup has minHeight() and maxHeight() for this purpose (no functionality at the moment).

Besides these, I plan to eventually add the following groups:

  • DENSITY ALT and DENSITY ALT MISG
  • VISNO and CHINO
  • SFC VIS and TWR VIS
  • Variable cloud cover, e.g. BKN009 V OVC
  • Lightning LTG DSNT and FRQ LTGCGCC, etc.
  • Hailstone size, e.g. GR 1 3/4
  • Obscuration octa, e.g. BLSN4AC1
  • Ceiling for the second location CIG 010 RWY24L

I would appreciate if you can advice anything else commonly used in your area but not on the list above.

I've also noticed that a few of the groups, like LightningGroup, do not seem to have any members or parsing implementation. Maybe it would be good to document a list of the incomplete portions in the readme, or add TODO comments in the code?

These groups are added to std::variant Group to maintain backward compatibility and I plan to add parsing functionality eventually.

They are included in the docs, also I think it is a good idea to mark them TODO in the code.

Lightning group is reserved for LTG; WeatherBeginEndGroup for RAB, RAE, etc; VicinityGroup for TS E MOV W or CB NW, etc.

@nnaumenko nnaumenko added the enhancement New feature or request label Oct 4, 2019
@bovine
Copy link
Author

bovine commented Oct 15, 2019

Thank you for so rapidly adding support for AO1A/AO2A in 7e0cd17

My company (FlightAware) is currently exploring the idea of using metaf to replace our existing parsing code (https://github.com/flightaware/mdsplib) for handling data for airports around the world. When that project progresses, I may be able to provide more bug reports if I find any other differences, however I believe the lack of the currently missing functionality you mentioned above is okay for our needs.

@nnaumenko
Copy link
Owner

nnaumenko commented Dec 6, 2019

By 4978b02 the functionality mentioned in original post is available:

Parsing report: PHHI 262356Z 29009KT 4SM -SHRA BR VCTS FEW005 BKN016 OVC020CB 25/24 A2989 RMK AO2A DZE2259RAB2259E16DZB16E22RAB37 TS 7E MOV NE CIG 016V020 SLP111 P0007 60007 T02470238 10295 20243 57016 $
Detected report type: METAR
22 groups parsed
ICAO location: PHHI
Report Release Time: 262356Z
Wind: 29009KT
Visibility: 4SM
Weather Phenomena: -SHRA BR VCTS
Cloud Data: FEW005
Cloud Data: BKN016
Cloud Data: OVC020CB
Temperature and Dew Point: 25/24
Pressure: A2989
Fixed Text: RMK
Fixed Text: AO2A
Weather Phenomena: DZE2259RAB2259E16DZB16E22RAB37
Not recognised by the parser: TS 7E MOV NE
Information on Secondary Location: CIG 016V020
Pressure: SLP111
Precipitation: P0007
Precipitation: 60007
Temperature and Dew Point: T02470238
Minimum/Maximum Temperature: 10295 20243
Pressure Tendency: 57016
Fixed Text: $

However I cannot find any information or guideline on group format TS 7E MOV NE, does it mean 7 SM towards E?

If the group is modified to TS E MOV NE, it is recognised by the parser just fine:

Parsing report: PHHI 262356Z 29009KT 4SM -SHRA BR VCTS FEW005 BKN016 OVC020CB 25/24 A2989 RMK AO2A DZE2259RAB2259E16DZB16E22RAB37 TS E MOV NE CIG 016V020 SLP111 P0007 60007 T02470238 10295 20243 57016 $
Detected report type: METAR
22 groups parsed
ICAO location: PHHI
Report Release Time: 262356Z
Wind: 29009KT
Visibility: 4SM
Weather Phenomena: -SHRA BR VCTS
Cloud Data: FEW005
Cloud Data: BKN016
Cloud Data: OVC020CB
Temperature and Dew Point: 25/24
Pressure: A2989
Fixed Text: RMK
Fixed Text: AO2A
Weather Phenomena: DZE2259RAB2259E16DZB16E22RAB37
Events in vicinity: TS E MOV NE
Information on Secondary Location: CIG 016V020
Pressure: SLP111
Precipitation: P0007
Precipitation: 60007
Temperature and Dew Point: T02470238
Minimum/Maximum Temperature: 10295 20243
Pressure Tendency: 57016
Fixed Text: $

Hope this helps.

I would appreciate any bug reports and suggestions of functionality to be added.

@bovine

This comment has been minimized.

@bovine

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants