Yesterday night it occurred to me that the current handling of missing METAR
strings isn't good enough:
- in case of missing METAR strings, don't re-send the last successful string,
but the last successful string sent to *this* client. (If one client is
running in virtual December, it won't be happy about dropped in summer
weather.)
- fix a bug that allowed -vc notation (options -v and -c), but broke a lot of
other notations (-b/var/tmp). Only -v can now be accumulated again, as
in -vvvv.
Here's a Perl implementation of a METAR proxy server. Tested on Linux only, but
should work on all Unices, and possibly on Windows, too. Its purpose is to:
- provide METAR data for machines without internet connection
- centralize METAR fetching: one machine in a network runs the proxy, all
other connect to the proxy
- deliver defined and reproducible weather for educational purposes
- save weather situations for later use in fgfs
Quick instructions to download the world weather for the last 3 hours
and run proxy and fgfs with it (~ 2MB download; for less bandwidth
consumption see the --record mode):
$ metarproxy --download 3h
$ metarproxy -v -c &
$ fgfs --proxy=localhost:5509 --time-offset=-2 --enable-real-weather-fetch