1
0
Fork 0
Commit graph

470 commits

Author SHA1 Message Date
ThorstenB
826107f132 #510: Fix disappearing AIShips.
Untangle AI reinit and init methods. Some code in init hooks expects to be
called once only. Derived classes should not redirect their reinit to init,
even if this seems fine for the methods of the derived class itself. This
also triggers the init methods of all base classes, which may not expect
multiple calls to their init methods (or to "init" on "reinit").
2011-12-09 17:06:19 +01:00
ThorstenB
bfb0619f76 Fix memory leak with FGAIModelData.
Be lazy and use ref pointers - to remove memory automatically.
2011-12-09 17:03:14 +01:00
Vivian Meazza
6b1391e404 Make parameter "roll-factor" settable in scenario files
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2011-12-04 19:10:42 +01:00
ThorstenB
07aa70dce9 sound: fix sound-buffer-in-use issue
FGFX objects must be dereferenced early enough, and sound manager must be
removed late enough - otherwise openal complains about resources being
still in use when tryin to remove buffers.
Also: do not create FGFX objects for AI/MP aircraft, when AI sound is
disabled.
2011-12-04 17:18:02 +01:00
Erik Hofman
831f81d97c Properly construct a string from another string and an integer, use a relative path for sound construction, allow enable/disable aimodel sounds using /sim/sound/aimodels/enabled 2011-12-03 14:40:48 +01:00
Erik Hofman
99bb79c7d5 Properly remove FGFX classes when not needed anymore 2011-11-27 15:10:44 +01:00
Erik Hofman
f89ad9baf0 Move some code from the header file to the source file. 2011-11-27 13:48:04 +01:00
Erik Hofman
2c8da4c122 fix a typo 2011-11-27 10:52:28 +01:00
Erik Hofman
ebcc6359b9 Initials sound support for AI models. 2011-11-25 13:39:10 +01:00
Erik Hofman
04395fa9a5 Postpone initialization of the avionics soundgroup until avionics are enabled. This prevents AI classes from creating new and unnecessary avionics sample groups. 2011-11-20 15:31:58 +01:00
Erik Hofman
544bad86c7 remove a .swp file 2011-11-20 15:06:10 +01:00
Erik Hofman
9e1121fc4c First implementation of sound effects for AI models. 2011-11-20 15:05:37 +01:00
ThorstenB
4b2506d709 Add new performance monitoring subsystem.
Rename some subsystems for naming consistency.
2011-11-19 15:37:49 +01:00
Durk Talsma
4903556bb2 Enable the AI pilot to hit the breaks hard when necessary. 2011-11-12 18:42:59 +01:00
Durk Talsma
0905b4f367 Fixing an age old bug. AIAircraft arriving on an airport never received a proper gateId, causing them to taxi to the end of the world and beyond. 2011-11-12 18:40:23 +01:00
ThorstenB
1eb8d0caa4 #424: Don't page out AI objects. Just load lazily.
Changes commit 1e7d072eed and uses the new
deferred loading - instead of paged (un)loading.
2011-11-10 22:12:54 +01:00
James Turner
70b4f38ebc Goodbye automake. 2011-11-01 11:15:53 +00:00
Durk Talsma
8eca759077 Merge branch 'next' of gitorious.org:fg/flightgear into next 2011-10-26 22:38:38 +02:00
Durk Talsma
538e632f45 * Updated routing algorithm. Just sorting the schedules by usage heuristics doesn't work well for major multihub airlines.
* Improved groundnetwork routing algorithm. Don't uncesscarily block taxiways. Instead, use a "just-in-time" blocking system. The unblocking algorithm still needs some work, but the current version is already a major improvement over the previous version.
* Some tweaks to the handover from ground to tower controller. Aircraft could refuse to take-off of even refuse to taxi onto the runway. This now seems to be solved.
2011-10-26 22:26:37 +02:00
James Turner
16a54a4409 Change a hot-spot in the AI code, to use cartesian instead of geodetic math. 2011-10-26 17:26:11 +01:00
Frederic Bouvier
8057c50849 AITraffic fix - forgot two files 2011-10-22 10:31:38 +02:00
Frederic Bouvier
3a262fe7d3 Fix a problem in AITraffic where waypoint iterator is trashed by push_back. A cleaner solution would be to use indices instead of iterators to track position in the waypoint vector 2011-10-22 10:15:16 +02:00
James Turner
b1b4b7ecf4 Fix (nearly) all the std:: namespace violations in headers, in preparation for fixing SGsmplstat.hxx to *not* do a 'using namespace std'. 2011-10-17 17:41:59 +01:00
ThorstenB
b16338598a Use more specific log classes.
Log class filters work better when different modules
use different classes :).
2011-10-11 21:55:50 +02:00
ThorstenB
53e6c0ac5f Reduce AI/MP lags when removing models
Move load of removing OSG objects to the OSG pager thread
2011-10-11 21:43:24 +02:00
Durk Talsma
835334bd4f Finetuning of AI Aircraft landing performance. Aircraft slow down to taxi speeds just before leaving the runway. Increased vTaxi on the runway to further reduce time on the runway and slow down to vTouchdown well ahead of touching down. 2011-10-10 21:55:09 +02:00
Durk Talsma
88dc9a14b7 Remove the assertSpeed debugging code. 2011-10-10 18:51:41 +02:00
Durk Talsma
da3c098a4b AITraffic exits the runway as soon as possible (in theory; the code still needs some fine tuning). 2011-10-09 23:44:42 +02:00
Durk Talsma
02712dc1ad Several Bugfixes:
* Landing AIAircraft now land properly!!!
 * Fixed problems with takeoff scheduling.
 * Untangled several vertical speed calculation algorithms.
 * No more bent-over-backwards and jump-in-the-air AI aircraft initializations.
 * Fixed intermixed target speed and target altitude during climb phase.
 * Implemented beginnings of a "line up and wait" procedure.
 * Tried to use actual runway elevation for calculating the decent profile.
2011-10-09 00:25:04 +02:00
Durk Talsma
a9ac75b9c9 Revert back to the version from sept 4. Vertical speed calculations of decending AI aircraft were messed up. 2011-10-05 21:40:47 +02:00
Durk Talsma
f2b354d9cb Merge branch 'next' of gitorious.org:fg/flightgear into next 2011-10-03 20:57:32 +02:00
Durk Talsma
4640f5bb02 * A new algorithm for determining hold position instructions. This version still needs some finetuning, but already appears to be more solid than the old version.
* Some tweaks to the traffic scheduling algorithm.
* Misc cleanup.
2011-10-03 20:54:58 +02:00
ThorstenB
3451012bca Make LOD properties of AI/MP aircraft run-time configurable. 2011-10-03 12:01:58 +02:00
Durk Talsma
152fec1cb6 Patch by Torsten Dryer: Remove the Ugly global dialog variable and remove rwy as a member variable from the AIFlightPlan class. 2011-09-22 20:52:05 +02:00
Durk Talsma
1e4b17595a -Prevent crashing the sim when starting at a gate that is not connected to the ground network. For now, just silently shut down the ATC system. 2011-09-11 21:42:29 +02:00
Durk Talsma
35abe6d0ab A number of cosmetic and/or infrastructural changes.
Traffic Manager:
	* Just continue routing until we run out of flights. This change removes one of the major requirements for setting the "Home port" field.
	* Add a time restriction requirement for the aircraft scheduler; this became necessary after removing the limited-to-home-port routing restriction.
	* Added a new field to the heuristics calculation: take into account whether an aircraft has already been used in a previous session. Rotate aircraft assignments for greater variability across sessions.
	* Added a revision number to the cache files, so that old cache results, which are no longer compatible with the new file format, are discarded.

Groundnetwork and traffic control:
	* Added a revision number to the cache files, so that old and incompatible results are discarded.
	* The caching algorithm probably didn't store the correct data for airports that were processed while the user was quite far away. This is now corrected by checking whether the cached elevation data are equal to the generic airport elevation.
AIAircraft:
	* I've been searching for the infamous aircraft bend-over-backward bug, that can occur during initialization, but to no avail yet. The only variable potentially responsible (tgt_vs) wich can explain the irregular jumping behavior, as well as the weird pitch results is initialized in AIAircraft's only constructor (through AIBase), and I can't find any situation in the ground handling code where this variable could get bizarre values. But,
	* a couple of tgt_vs. calculations appear to be completely redundant. This value was calculated twice inside the ProcessFlightplan function, and subsequently again in the updateSecondaryTargetValues function. I have removed the calculations in the process flightplan function, without any apparent side effect.
2011-09-04 20:27:36 +02:00
Erik Hofman
1e9120a8ac Add proper conversion factor 2011-08-29 18:34:57 +02:00
Vivian Meazza
ce97a1e4c5 Bugfix: Ballistic objects with "expiry" set were not instantiating correctly.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2011-08-11 21:46:51 +02:00
Durk Talsma
552aa5419f Some fine tuning of the ATC messages related to ground to tower transfer.
Removal of obsolete debugging messages. Let's hope I caught them all.
2011-08-10 21:39:28 +02:00
Durk Talsma
b603344d69 Merge branch 'next' into durk-atc 2011-08-09 20:09:14 +02:00
Torsten Dreyer
1e7d072eed Add LOD to each AI model
Add a LOD (range animation) to each AI model if the property
/sim/rendering/static-lod/ai is set to any number greater than
zero. AI models get loaded but only displayed when closer than
the number given in the property (in meters).
If the property is absent or it's value is less or equal 0.0
than no LOD is added to the AI model.
2011-08-09 18:02:37 +02:00
Durk Talsma
5f3804e816 AI/ATC enhancements:
- Better transistion between taxi and takeoff phases.
 - Skipping the pushback stages when a gate doesn't require push-back.
 - Some test code always chooses the user aircraft as the one that has to hold position.
2011-08-07 21:38:50 +02:00
Durk Talsma
98048d1000 Some preparory work for enabling the handover from ground to tower controller. 2011-08-03 23:09:52 +02:00
Durk Talsma
449675deca Removal of some debugging statements. 2011-08-03 21:23:42 +02:00
Durk Talsma
4928886e56 Bugfix: Change the point where leg numbers recycle, in order to avoid hitting the default case in AIFlightPlan::create(). 2011-08-01 21:34:33 +02:00
Durk Talsma
f84d9d4757 A fairly major interal reorganization of the AI code
- Change AIFlightPlan::waypoint into an independent class FGAIWaypoint
 - Don't update leg count until the aircraft has passed the last waypoint that was created by the corresponding leg
 - Clear ground network rendering for controllers that are no longer active.
2011-07-31 19:27:44 +02:00
Durk Talsma
987a0fd1df Fix broken constructor to prevent a segfault when deleting taxiroute during program shutdown. 2011-07-26 18:28:34 +02:00
Durk Talsma
dbceffeae8 Fix flightplan initialization issue. 2011-07-25 21:36:09 +02:00
Torsten Dreyer
0c9716227c let bool FGAIFlightPlan::createCruise() return a value
fix Windows build.
2011-07-24 17:22:00 +02:00
Durk Talsma
3f26233d69 Some cleanup in the ATC/AI code before merging with the next branch:
- Hide the ATC dialog box by default
 - Allow dynamic enabling and disabling of the AI groundnetwork visualization
 - Cleanup of debug messages
2011-07-24 12:48:13 +02:00