* Changed the runway XX. ATC message to actually report the real
designated departure runway
* In case of multiple active runways, select the one with a heading that is
closest to the direction of the ultimate departure destination / lines up
with the arrival path.
* Some support for geometry information provided by the custom scenery
project. Current support is for AI groundnets and runway use files only
since this is a switch that involves a lot of data verification and
updating, during the transistion the actual path where the data can be
read from is user configurable. setting the property
/sim/traffic-manager/use-custom-scenery-data to true
will cause flightgear to read the ground networks from the scenery
directory (--{fg-scenery}/Airports/[I]/[C]/[A]/[ICAO].groundnet.xml to be
precise). Setting this property to false will retain the original
behvior.
* For departing aircraft, runway takeoff calculations will be done on the
basis of the performance database. For testing purposes, a performance
estimate for a heavy jet has been added.
static FGAirport helpers. As a result, another global index goes away. Use
the helpers to avoid ugly FGPositioned down-casts in various places.
Also converts the environment/METAR code to deal with FGAirport pointers,
instead of string identifiers, and contains work-in-progress code to implement
the AirportList dialog using FGPositioned. This isn't enabled yet for various
reasons, but is the final piece to allow FGAirportList to be removed.
* experimental clean-up / reduction on two of the FG headers:
(I'm going to await feedback on the developers list before doing more of
these, to avoiding going over files multiple times, but in principle it
seems pretty straightforward.)
* final fixes for SG_USING_STD removal
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
extensions.hxx was pulling in all of Carbon to the global namespace
- very scary. As a result, I now need to explicitly include CoreFoundation
in fg_init.cxx.
- change SG_USING_STD(x) to using std::x
and the pushback code:
- Traffic manager starts modelload requests immediately upon program
loading
- Only create legs 1 (push back) or five (cruise) of AI traffic.
- AIAircraft's rather obsessive behavior to circle around a waypoint is
largely resolved
- More realistic ground steering for AI aircraft.
- Airports Directory
Thomas Foerster: Pulls out the FGTaxiNode implementation into gnnode.cxx.
Melchior / Durk: Copy Constructor and assignment operator for FGTaxiRoute
- AIModels Directory
Durk / Melchior / Czaba Halasz: Ensure that all derived classes use AIBase
member 'callsign'. Adapted, moved and deleted getter/setter functions where
necessary
Czaba Halasz: Fix AIBase model path vs. submodel path consistency.
- Traffic Directory and AIModels CreateFlightPlanCruise
DT: Temporary revert parts of the position estimation code.
src/AIModel/AIFlightPlan.hxx
src/AIModel/AIFlightPlanCreateCruise.cxx
src/AIModel/AITanker.cxx src/Traffic/Schedule.cxx:
Move member variables that should better be in function local
scope into the functions. Make more use of SGMath functions.
recover instead
- it was apparently planned to run the updated loop only every 1000th
frame, but the counter isn't reset, so it runs every frame
- use SG_LOG instead of cerr
- don't add redundant slashes in SGPath::append()
data/AI/Aircraft/*/*.xml and read traffic information from these files.
Current code still mimicks old behavior by reading data/Traffic/fgtraffic.xml
The latter functionality will be disabled once we have some traffic containing
files in data/AI/Aircraft.
earth model instead of WGS84. WGS84 precision is overkill for what the
traffic manager requires, and also keeps locking up while computing
course and distance for anti podal points in New Zealand vs. south west
france.
- Ground network slow-down finally works as expected
(although occasionally causing a traffic jam)
- Hold position instruction now really sets speed to zero, in addition
it actually works now for crossing and two-way traffic
- Attempt to limit execution time of ground network trace algorithm
to make performance acceptable at high-density networks
- Removed remaining terminal messages
- Various minor tweaks and clean-ups
- Moved AIModels/Traffic Manager related AI functions to a new file
- Rewrote the traffic manager so that the containers use pointers to
objects instead of the objects themselves, which will allow for a
more flexible memory management.
- Rewrote parts of the airport groundnetwork code, also because the
stl containers now contain object pointers instead of the objects
themselves.
- Fixed an uninitialized iterator in the AI distance tracking code
- Fixed flawed logic in some of the traffic controller's while loops
- Added a tower controller, which paces take-off behavior of AITraffic
in a more realistic way.
- Various other minor fixes and fine tuning.
maintain a resonable distance from each other while taxiing on the same
route. The current code does not yet take crossing routes or aircraft
taxiing into opposite directions into account.
work for ground based distance separation of AIAircraft.
Traffic manager initialization related changes:
- Schedules initialize "on the fly", instead of during initialization
- Invalid routes are no longer deleted, but marked as BOGUS and ignored
- Changed loading order from a distance based prioritization to a point-
score based prioritization, resulting in a much faster establisment of
AIAircraft near the user's plane.
Preparatory work for ground-based separation of Aircraft.
- The groundnetwork findShrortestRoute function not only returns a list
of waypoints, but also a list of taxi "segments" (a.k.a. taxiways).
- The taxiway list is stored in the Flightplan, and updated everytime
a new taxi leg is created.
at (lon, lat) coordinates -1000,0. This patch fixes the AIModels/Traffic
Manager side of things. The AIModels subsystems allowed the creation of
AIAircraft with non-existent 3D models. If such a model didn't exist, the
aip class didn't get initialized, resulting in the above-mentioned bogus
position information. Here I circumvent this problem by a) only interacting
with the tile loader if the model is visible (and hence has succesfully been
initialized) and b) by disallowing the traffic manager to create AIAircraft
objects if the path to the 3D model doesn't exist.
This patch removes some useless indirection when creating AIModels. It
obsolets AIScenario*.
AIEntities are just an intermediate copy of an other intermediate copy of an
xml file on the way from the ai scenario configuration file to the AIModels.
As such the AImodels can now be created directly from the property tree read
from the scenario file.
This reduces the amount of work needed to add an other AIModel and reduces the
amount of copy operations done during initialization.
It also moves internal knowledge of special AI models into these special AI
models class instead of spreading that into the whole AIModel subdirectory
which in turn enables to use carrier internal data structures for carrier
internal data ...
Also some unused variables are removed from the AIModel classes.
I believe that there are still more of them, but that is what I stumbled
accross ...
Tested, like the other splitouts these days in a seperate tree and using the
autopilot for some time, and in this case with a carrier start ...
The prototype of update_metar_properties does not match overridden func.
trafficmgr: iterators below begin() and after end().
tower.cxx : iterator incrementing beyond end().
* Use "const string&" rather than "string" in function calls when appropriate.
* Use "const Point3D&" instead of "Pint3D" in function calls when appropriate.
* Improved course calculation in calc_gc_course_dist()
* Safer thread handling code.
Vassilii Khachaturov:
Dont use "const Point3D&" for return types unless you're absolutely sure.
Erik Hofman:
* Use SGD_(2)PI(_[24]) as defined in simgear/constants.h rather than
calculating it by hand every time.
Auf Niederlandisch:
Bij deze de patch voor de taxiway code. Deze code is nog gebaseerd
op de bestaaande architectuur, gebaseerd op de FGAirport class in simple.[ch]xx
Ik heb me voornamelijk gericht op nieuwe functionaliteit; de volgende
submissie zal waarschijnlijk bestaan uit opschoning, opsplitsing en een
implementatie van de nieuwe airport architectuur, zoals voorgesteld door
David Luff.
En Anglais:
Here is the patch for the taxiway code. This code is still based on the
exsisting architecture, which is based on the FGAirport class in simple.[ch]xx
I've aimed mostly at new functionality; The next batch will probably contain
code cleanups, splitups and the implementation fo the new airport architecture,
as proposed by David Luff.
Attached is a patch to the airport data storage that I would like committed
after review if acceptable. Currently the storage of airports mapped by ID
is by locally created objects - about 12 Meg or so created on the stack if
I am not mistaken. I've changed this to creating the airports on the heap,
and storing pointers to them - see FGAirportList.add(...) in
src/Airports/simple.cxx. I believe that this is probably better practice,
and it's certainly cured some strange problems I was seeing when accessing
the airport data with some gps unit code. Changes resulting from this have
cascaded through a few files which access the data - 11 files are modified
in all. Melchior and Durk - you might want to test this and shout if there
are problems since the metar and traffic code are probably the biggest
users of the airport data. I've also added a fuzzy search function that
returns the next matching airport code in ASCII sequence in order to
support gps units that have autocompletion of partially entered codes.
More generally, the simple airport class seems to have grown a lot with the
fairly recent addition of the parking, runway preference and schedule time
code. It is no longer just an encapsulation of the global airport data
file, and has grown to 552 bytes in size when unpopulated (about 1/2 a K!).
My personal opinion is that we should look to just store the basic data in
apt.dat for all global airports in a simple airport class, plus globally
needed data (metar available?), and then have the traffic, AI and ATC
subsystems create more advanced airports for themselves as needed in the
area of interest. Once a significant number of airports worldwide have
ground networks and parking defined, it will be impractical and unnecessary
to store them all in memory. That's just a thought for the future though.
I'm looking through the AI code, trying to find the bug that's killing the
thermals. The following things don't look right:
1) AIManager::101 , the Traffic Manager pointer is searched for by name at
every dt. I'll leave this for you to look at.
2) AIManager::295 , the thermal height is not being set. We need to
restore the line: ai_thermal->setHeight(entity->height_msl);
This fixes the thermal problem.
3) AIManager::328 , I changed the fetching of the user state to occur every
sim cycle, and changed the fetching function from by-name lookup to a lookup
by node pointer. It should be faster now, and more accurate too. This helps
the air-refueling.
I just heard from John Wojnaroski that you and he are going to work on getting
a flightgear demo machine up for the linux expo thursday and Friday. John
indicated that he would very much like to get a CVS version with the new
traffic code up and running before the expo.
a single apt.dat.gz file which is in the native X-Plane format.
To do this I wrote a front end loader than builds the airport and runway
list. Some of the changes I needed to make had a cascading effect, so there
are minor naming changes scattered throughout the code.
Okay, here's the latest update to the tarffic manager/AI Manager. AITraffic
can now fly multiple routes and be initialized while sitting statically at
airports.
I've included the latest fixes to the Traffic Manager/AI flightplan generation
code. Most of the code changes are in AIFllightplan.cxx. This is the code
that runs without depending on predefined FlightPlans in
#FG_ROOT/Data/AI/Flightplans.i
As suggested by Dave, I've also added a new property in
preferences.xml: /sim/traffic-manager/enabled, which is used to control
whether or not the traffic manager is active.
I'm still working on a few more 737 traffic patterns, those are going to take
a little longer, so I didn't want to wait sending in this code.
Finally, I haven't put much effort into ensuring "aeronautical correctness" in
this version yet. The code works on my system, but what the AI plane do may
actaully be quite rediculous. But I'd like to leave that for the next
version.