Split the former single-file-implementation in xmlauto.?xx into multiple
files and use some OO techniques. Started with documentation to be used
with doxygen.
* AI aircraft distance to user proximity detection works again (lat/lon were inverted).
* The parking uses by the user aircraft is marked as such to prevent it being reused by an AI aicraft
* AI aircraft won't receive permission for pushback until the user aircraft is at a fair distance.
* Add a new command line option: --sound-device=""
This makes OpenAL use the sepcified audio device instead of the default
output device. (Look for playback devices when calling openal-info of alcinfo)
- allow multiple <autopilot> elements within an aircraft. All autopilot live in an individual FGXMLAutopilot subsystem which run within a subsystem group now.
8:: AWOS is available at AWOS locations. (Previously only ATIS was
implemented.)
9:: ATIS phraseology now more nearly conforms to international
standard METAR pattern, and therefore to usual FAA practice.(*)
Items marked with a (*) are fully implemented in the /text/ of the
ATIS message, but the voiced version of the message is degraded by
limitations of the FGFS built-in text-to-speech system.
10:: ATIS now reports sky condition.(*)
11:: ATIS now reports multiple layers of clouds, not just the lowest
layer.(*)
12:: ATIS now takes field elevation into account when calculating
sky condition and ceiling.
13:: ATIS now reports dewpoint.(*)
14:: ATIS now can handle negative quantities (temperature and dewpoint).(*)
15:: ATIS can now report report fractional-mile visibility.(*)
16:: ATIS now uses magnetic (not true) wind directions, as it should.
17:: ATIS generates correct runway number and suffix (nine right,
one one left).
18:: ATIS can be received on nav frequencies, not just comm.
19:: Nothing bad happens if the same ATIS is tuned up on more than
one receiver.
20:: ATIS can be updated at times other than at the top of the hour.
21:: ATIS listens for an "attention" signal, and responds to changes
in the weather by issuing a new ATIS message (somewhat like a
"special observation").
22:: ATIS volume now responds to radio volume setting.
23:: Area-related services (i.e. approach radar) are handled
more-nearly consistently with radio-frequency related services.
24:: ATIS sequence-letter generation has been fixed.
25:: ATIS messages are now in the property tree, so they can be read
e.g. via the http interface.
by frequency (which makes sense), and use the FGPositioned spatial data if
required. As a result, the marker beacon list is gone (since beacons are only
searched spatially). In the process, clean up various minor things - most
notably, all the 'airport-related' navaids (ILS, GS, LOC, and the beacons) now
store a FGRunway* instead of an airport id string. This is more precise, and
saves string allocations.
By way of example, here's a patch to make the position init code (in fg_init.cxx) cleaner, partly thanks to the FGPositioned changes. It reduces the file size by 200 lines - virtually all of which was copy-and-paste. Once the remaining class (FGAirport) is converted to inherit FGPositioned, all the future patches should be like this - touching one or a few files at most.
This factors the start-offset logic out into a helper, which also does the final property setting (which has to happen on both the /preset and 'real' values). Using the accessors in FGPositioned, and the offset helper, a couple of cases become trivial (fix and nav) and others become much simpler.
Convert FGNavRecord to inherit FGPositioned. This is much more self-contained than the FGRunway change, since FGNavRecord already had good encapsulation of its state. However, it's a large diff due to moving around two nasty pieces of code - the 'align navaid with extended runway centerline' logic and the 'penalise transmitters at the opposite runway end' logic.
In general things are more readable because I've replaced the Navaid type enum, and the use of Robin's integer type codes, with switches on the FGPositioned::Type code - no more trying to recall that '6' is an outer marker in Robin's data. The creation code path is also pushed down from navdb into navrecord itself.
Convert FGRunway to be heap-based, and inherit FGPositioned. This is a large, ugly change, since FGRunway was essentially a plain struct, with no accessors or abstraction. This change adds various helpers and accessors to FGRunway, but doesn't change many places to use them - that will be a follow up series of patches. It's still a large patch, but outside of FGAirport and FGRunway, mostly mechanical search-and-replace.
An interesting part of this change is that reciprocal runways now exist as independent objects, rather than being created on the fly by the search methods. This simplifies some pieces of code that search for and iterate runways. For users who only want one 'end' of a runway, the new 'isReciprocal' predicate allows them to ignore the 'other' end. Current the only user of this is the 'ground-radar' ATC feature. If we had data on which runways are truly 'single-ended', it would now be trivial to use this in the airport loader to *not* create the reciprocal.
Here's part 2 - converting FGFix (the simplest one) to be both heap-based and inherit FGPositioned. One minor benefit from this is replacing some dangerous code in FGFixList which used to return the address of an iterator member ('&it->second'). To keep the diff a sensible size, I'm not updating the callers to use the richer FGPositioned types - i.e replacing separate lat/lon handling with SGGeod. I will make those cleanups, but in future patches.
- Runways are now part of an airport, instead of a separate list
- Runways are no longer represented as a boring struct, but as a class
of their own.
-Improved runway access to unify various runway access methods.