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

Suggestion: include raw text for each parameter #57

Open
drmrbrewer opened this issue Jan 30, 2023 · 2 comments
Open

Suggestion: include raw text for each parameter #57

drmrbrewer opened this issue Jan 30, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@drmrbrewer
Copy link

First, thanks for this great library... really appreciated :-)

I find it useful to be able to break down a raw METAR string into pieces, and re-construct a "custom" string using only those pieces considered to be of interest, e.g. station, time, temperature, dewpoint, and wind speed/direction. Plus... with the option to decode (or not) each piece.

Take this example:

CYVR 301300Z 09006KT 15SM FEW055 FEW120 M04/M06 A3049 RMK SC1AC1 SC TR SLP327

My non-decoded custom string would be:

CYVR 301300Z M04/M06 09006KT

While my decoded custom string would be:

Vancouver International Airport 13:00 -4°C -6°C 11.1 km/h 90°

So it would be handy if the raw text used as the basis for each decoded piece were also included in the response data, e.g.

"wind": { ...., "raw": "09006KT" }

I note that this raw field is already added to each array element in remarks, so could be added likewise for each array element of clouds and also for each other grouping like wind, visibility etc?

It would be more tricky (for backward compatibility) for temperature, dewpoint, altimeter because these are just straight values and aren't already JSON objects to which a new raw element could be added.

@aeharding
Copy link
Owner

This would be really cool, I could see it being useful to those building tools to highlight over parts of the METAR/TAF for more details.

Thanks for the request!

@drmrbrewer
Copy link
Author

drmrbrewer commented Jan 30, 2023

Thanks for considering. I think it would be really useful for presenting data to those who can "read" raw METAR already, but want only certain parts of it in a concise format, with anything irrelevant (to them) stripped out. At present I'm deconstructing the raw string into pieces using regexp, and it looks like you maybe are too, but I'm not sure I've been very thorough... not as thorough as you have been! There seem to be so many different possible combinations to consider, and I'm 100% sure I haven't accounted for all of them! Would be great if you could just expose the deconstructed pieces in the response, so that we can reconstruct selectively on our side.

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