]> git.mxchange.org Git - flightgear.git/commit
METAR: enable reports from multiple stations
authorTorsten Dreyer <Torsten@t3r.de>
Fri, 7 Jan 2011 12:11:06 +0000 (13:11 +0100)
committerTorsten Dreyer <Torsten@t3r.de>
Fri, 7 Jan 2011 12:11:06 +0000 (13:11 +0100)
commit9337584df02f7856843a7b0d67eb260cf565d3fc
treee3dc2bcc94cc840ac61aa1f0781c5516628a2024
parent5cdfe3d7a5abc10bd796ea59980a8c9af93b0994
METAR: enable reports from multiple stations

This patch enables multiple MetarProperties instances tied to the
property tree. For each node's value of /environment/realwx/metar
one MetarProperties instance is created and tied to the property
tree named there. (See FGDATA/Environment/environment.xml for details)

At least one instance will be created to provice backward compatibility
to the existing live-data weather system. This instance (tied to
/environment/metar) fetches a METAR for the nearest airport at a regular
schedule. All other instances fetch a report for airports named in the
property station-id. It re-reads the report every 15 minutes, the
remaining time until the next fetch will be scheduled is in the property
time-to-live. This property can be written to, to extend the live of
this report or schedule an immediate reload by setting it's value to zero.

This patch also provides magnetic variation for the station's location.
src/Environment/metarproperties.cxx
src/Environment/metarproperties.hxx
src/Environment/realwx_ctrl.cxx