Closed StevenFrost closed 9 years ago
Would it be feasible to simply generate the string as it's requested? This would avoid any need to rebuild the string if part of the METAR changes.
However, realistically speaking, I don't think any single part of a METAR would ever change. If some part needs changing, an entirely new METAR (or SPECI) is issued with a different date/timestamp and everything.
The reasons for being able to build a METAR are mostly related to exporting configurations if you actually wanted to build the structure yourself rather than parse an existing METAR string.
Say you had some visibility, wind and cloud data you wanted to save; you could build a METAR from that and export it as a string so that the next time you wish to use it, you can simply parse the resulting sting again to get the raw data back.
Building the string at different times is mostly a design choice. I will investigate the performance in different places when I get to that point as it may be more optimal to update gradually over time than perform one large update when you request the string.
Closing as this doesn't fit with current goals.
A useful feature would be to allow the user to build METAR strings from native data types specified through setters.
This would require a rebuild of the METAR string each time a new piece of data is set, or a method of notification when the METAR string is currently out of date and needs rebuilding manually.
The feature would be an extension to the existing implementation of the Metar class which currently only parses a preset string.