This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs. It includes all SGSubsystem and SGSubsystemGroup derived classes.
Change fgcommand to take an optional property tree root element.
This fixes the animation bindings to use the defined property tree root - to support multiplayer (or other) model that can bind to the correct part of the property tree.
Requires a corresponding fix in sg to allow the command methods to take an optional root parameter.
What this means is that when inside someone else's multiplayer model (e.g. backseat, or co-pilot), the multipalyer (AI) model will correctly modify properties inside the correct part of the property tree inside (/ai), rather than modifying the properties inside the same part of the tree as the non-ai model.
This means that a properly setup model will operate within it's own space in the property tree; and permit more generic multiplayer code to be written.
This is probably responsible for some of the pollution of the root property tree with MP aircraft properties.
When the test:
if (i == activeTraffic.end() || (activeTraffic.empty()))
was true, the iterator named 'current' was uninitialized and later
dereferenced.
Fix:
- when the previously-mentioned test is true, return;
- initialize 'current' only when it is really needed (i.e., later and
after the test), and since we don't need it for iterating, make it
an FGTrafficRecord&.
This change is the logical counterpart of SimGear's change from commit
79f869a7f32910197be72b21f6489fbbba02c836 that moved the following files
from simgear/misc to simgear/io/iostreams:
gzcontainerfile.cxx
gzcontainerfile.hxx
gzfstream.cxx (formerly zfstream.cxx)
gzfstream.hxx (formerly zfstream.hxx)
sgstream.cxx
sgstream.hxx
sgstream_test.cxx
When using live weather fetch, the QNH should be obtained from
environment/metar/pressure-inhg.
See: http://sourceforge.net/p/flightgear/mailman/message/35037125
Add new method getQnhInHg to ATISInformationProvider and its implementations
to avoid rounding errors converting from hPa back to inches in ATIS reports.
The CurrentWeatherATISInformationProvider (used when live weather fetch is
not in use) continues to use the property environment/pressure-sea-level-inhg.
This produces the incorrect QNH at airports significantly above sea level
but this needs fixing elsewhere to calculate the correct QNH.
- Add section tag to support inclusion of ATIS fragments.
- Add visibility, QNH and cloud tokens to support new ATIS formats.
- Add support for starts-with, ends-with and contains comparisons in
conditionals, including negated versions.
- Strip and convert case in comparisons.
- Speak VRB wind direction as "variable".
- Speak zeroes in fractional part of QNH inHg.
- Force US voice in US, Canada and Pacific; UK voice in UK.
Prior to this change, it was only possible to compare the values of tokens
to each other for use in conditionals, e.g. landing and departing runway.
This change allows comparison of a token to a text value, e.g. to compare
wind speed to zero.
This patch may introduce an occasional crash on exit again, because it effectively undoes commit [a972df]. I'll try to find a better fix for that later on.
- when dynamics shuts down the ATC controllers, they clear their
traffic vectors (destroying the records), but we didn’t notify
the AI aircraft of this. Ensure the controller is cleared so
the AI aircraft shutdown doesn’t crash.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
- ATC functions move to GroundController, which layers above
remaining GroundNetwork functionality
- dynamics owns both the groundNetwork and the ground controller.