1
0
Fork 0
Commit graph

643 commits

Author SHA1 Message Date
James Turner
5d9faee463 More unused vars caught by Xcode. 2013-07-04 20:56:04 +01:00
James Turner
6acf1c12fc Fix unused private vars.
Xcode is warning about these, they're a mixture of
copy-pasted code, evolved use (e.g. using a property
node to store state), and so on.
2013-07-04 20:24:56 +01:00
James Turner
a65f24c137 Bug 1153, guard against no current waypoint.
This is a work-around, probably indicates some glitch in the traffic
module flight-plans. Avoid a crash, also refine the exception logic
so individual AI objects can fail.
2013-07-04 10:30:04 +01:00
James Turner
081240c4da Issue #631, reset scenarios on sim-reset 2013-06-20 00:24:33 +01:00
James Turner
c242809a3c Fix for AIAircraft headings.
Nick Vatamaniuc: fix AI aircraft not updating waypoint headings when using custom flightplans.

(Commented out log-line following a non-parenthesised if() test causing problems)
2013-06-03 16:48:40 +01:00
James Turner
85bfd27af2 Non-sticky scenarios, simpler UX for everyone.
If you want a scenario in a particular session of the sim, ask for
it on the command line / config files, or enable in the GUI.

Note if you had previously 'sticky' scenarios in your autosave.xml, you
will still get them until you clean your autosave, or disable them in
the GUI.
2013-04-05 17:20:22 +01:00
James Turner
295ae6a650 Tweaks for run-time scenario toggling. 2013-04-02 18:00:31 +01:00
Thomas Geymayer
8f1df6c358 Helpers to clone SGModelData
This is needed for latest SimGear to fix scene model
unload not being called
2013-04-01 13:40:51 +02:00
James Turner
4d144dfbf2 Allow scenarios to have load/unload scripts.
This makes it possible for the balloons scenario (for example) to
work correctly with dynamic loading and unloading.
2013-03-28 16:50:55 +00:00
James Turner
a7e4f2a971 std:: namespace fixes, AIBase cleanup.
Make data members in AIBase protected, and move FGAIModelData to be
a private helper in the .cxx file.
2013-03-28 16:49:52 +00:00
James Turner
c2546a431d Make units of a function explicit. 2013-03-27 23:31:22 +00:00
James Turner
96a40fe70c Commands to control scenarios / AI-objects.
New commands allow runtime scenario loading and unloading, and AI object creation and removal at runtime.
2013-03-16 16:53:12 +00:00
James Turner
4a84ea0bc4 AIManager scenario tweaking. 2013-03-16 16:53:12 +00:00
James Turner
d70e26d87b Don't duplicate userpos in in AIObjects. 2013-03-16 16:53:12 +00:00
Thomas Geymayer
4b573ebd13 Start porting NasalPositioned to cppbind.
For now it is available in the positioned Nasal
module. FGAirport is fully ported, but especially
procedures/navaids and free functions are still
missing.
2013-03-04 19:24:47 +01:00
Thomas Geymayer
45e3b7e2d1 Clean up/prepare for porting NasalPositioned to cppbind 2013-03-04 16:31:37 +01:00
James Turner
1eb8ae1fbf Give the FGAirport class a sane filename.
simple.[cxx|hxx] -> airport.[cxx|hxx]
2013-02-21 11:32:02 +00:00
James Turner
7b663cd7f7 Split huge NasalSys header apart. 2013-02-09 15:33:05 +00:00
Christian Schmitt
2013f7149d Some headers missing... ;) 2013-02-07 19:00:54 +01:00
ThorstenB
a28fe51ccf Fix FGAIFlightPlan waypoint issues
Iterator must be reset after clearing waypoint list.
Deleting "*waypoint.end()" doesn't delete the last waypoint (end()-1
does - it is never actually used though).
2012-11-27 21:02:32 +01:00
ThorstenB
b8a3d6902e Stop AI aircraft's sound when removing
Sound manager keeps a reference to _fx, so reducing its ref-count isn't
enough - it must be removed explicitly.
2012-11-27 00:02:28 +01:00
ThorstenB
7ed8b625c9 Fix a couple of 64-bit warnings identified by GCC.
PositionedID is of "int64_t", which depends on platform: apparently it is
"long long int" for Mac (requiring %lld format), but it is "long int" for
64bit Linux (requiring %ld). To avoid a "compiler warning fix commit
war" ;-) use a type cast to the longest common type (long long int).
2012-11-26 00:23:10 +01:00
James Turner
63c95642c8 Work on AIAircraft gear animation.
Inspired by Harald's patch, attempt to get AI models show realistic gear animations. Unfortunately AI models seem to be ignoring the gear properties, so keeping the code disabled until I can trace down why.
2012-11-25 21:37:15 +00:00
James Turner
979ca55197 Fix a couple of 64-bit warnings identified by Clang. 2012-11-25 21:35:17 +00:00
ThorstenB
1c6643d7ac traffic: more pass by reference + member init 2012-11-25 16:41:10 +01:00
ThorstenB
f0778a110b MSVC compile issues. 2012-11-24 13:33:36 +01:00
ThorstenB
ff49cd7acf AIFlihtPlan: Proper member initialization
(i.e. "isValid" needs to be initialized unconditionally)
2012-11-24 13:30:00 +01:00
ThorstenB
439ad4a7c8 Traffic performance: cache track length
Track length is calculate every iteration/for every aircraft. Since some
tracks have hundreds of waypoints, calculation is slow. Cache the
track length between the waypoints ahead, so it rarely needs to be
recalculated.
2012-11-24 12:06:20 +01:00
ThorstenB
bb494e52e5 Performance improvement: pass (const) strings by reference
to avoid copying actual string data around.
2012-11-24 11:59:13 +01:00
ThorstenB
1827825fcb Clean up namespace issues
avoiding "uses..." in header files.
2012-11-23 21:16:08 +01:00
ThorstenB
4a53002784 Fix compiler warning with sprintf format
since PositionedID is "long int", not "long long int".
2012-11-23 21:16:07 +01:00
James Turner
bca6e9e890 Break upwards dependency on Traffic in the AI code
AIManager had unfortunate code to pass some state to the traffic-manager; this is no longer required since traffic schedules hold onto their AI-Aircraft directly as needed.
2012-11-21 14:49:34 +00:00
James Turner
77ca03da4d AIManager cleanups, no functionality change. 2012-11-21 14:03:17 +00:00
James Turner
afcdbd3158 Overhaul the ground-net / parking code.
Use the nav-data-cache to cache groundnet information, including
parking positions and the taxi-node graph.
2012-11-08 09:07:05 +00:00
James Turner
c79e2465df Traffic improvements.
Make landings and takeoffs look more correct; tweak climb-out and touchdown phases in particular, so the turn to destination heading occurs earlier on climb out, and touchdown occurs close the GS transmitter / some distance down the runway from the beginning.
2012-10-30 15:43:54 +00:00
James Turner
7c8ad455a3 PerformanceDB improvements.
Support cascading (inheriting) performance data, so common values don't need to be repeated.
2012-10-29 10:01:52 +00:00
Anders Gidenstam
a44acfa875 merge-requests/1566: Adjust indentation. 2012-10-12 23:48:09 +02:00
Vivian Meazza
bbea07e8b1 Bugfix: correct calculation of range and realtive bearing when parent is not the main model.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2012-10-12 23:45:56 +02:00
James Turner
607e7d7bf3 Use an SGGeod inside FGAIFlightPlan::Waypoint.
This allows incremental refactoring to move away from discrete lat/lon use in favour of SGGeod.
2012-10-08 15:52:06 +01:00
James Turner
7d547d1287 Make traffic take-off roll look a little better.
Expand the performance DB logic to support aliases, and select based on aircraft type as well as class. This allows to introduce some variation into AI traffic performance. Change the initial climb-out waypoints to use pitch-hold until passing 3000', which looks much more convincing
2012-10-05 18:12:46 +01:00
James Turner
bcea720db3 Make the sound-manager optional in a few places. 2012-10-01 10:10:34 +01:00
James Turner
649d579124 Helpers to access view position.
Avoid direct use of FGViewer in various places, by providing property-based accessors to the current view position.
2012-09-25 10:06:56 +01:00
James Turner
b1ff365a8f Make FGTaxiNode and FGParking inherit FGPositioned.
In preparation for caching the groundnet in the NavCache, make taxi-nodes and parkings inherit from FGPositioned. As part of this, make them heap (as opposed to value) classes, disable their copy-constructors, remove many mutating operations, and give them real constructors.
2012-09-25 00:31:17 +01:00
James Turner
fb266722ba Parking: another segfault edge-case.
Again, when there's no parking/ground-net, tolerate this.
2012-09-24 00:36:47 +01:00
James Turner
66a6438de1 Avoid a segfault-on-null
This code is called both when there's no ground-net, but also when there's no parking data at all.
2012-09-23 23:07:00 +01:00
James Turner
b1854459b3 Clean up dynamics/parking handing code.
Refactor some parking / airport-dynamics APIs, in preparation for caching the ground cache data in the nav-cache.
2012-09-23 21:42:40 +01:00
Mathias Froehlich
26664aaff0 Push SGMaterial use into these classes that need it. 2012-08-29 06:29:29 +02:00
Mathias Froehlich
e3ad3d3a07 bvh: Adapt to upstream bvh changes in simgear. 2012-08-24 21:24:12 +02:00
James Turner
588eba658a Make some include dependencies explicit. 2012-08-22 00:07:53 +01:00
ThorstenB
a3e76909ee Christoph Korn/PlayDeb.net: fix typos 2012-08-17 23:51:30 +02:00
ThorstenB
df4ccc3b88 Debug message about loaded AI models. 2012-07-15 10:15:53 +02:00
James Turner
b0384d035f Remove remaining includes of simgear/waypoint 2012-05-11 23:49:12 +01:00
Frederic Bouvier
75fc136931 Remove redundant inclusion of math/SGMath.hxx 2012-05-05 11:20:04 +02:00
ThorstenB
0f462d4a6e Fix rpmlint/Linux packager complaints
about outdated/invalid FSF address in some license headers.
2012-05-05 01:42:41 +02:00
ThorstenB
b9260f543b Ganael Laplanche: fix include dependencies for FreeBSD support 2012-05-05 01:08:20 +02:00
ThorstenB
e59fabaf82 Clean-up some SGMath dependencies. 2012-05-05 00:56:29 +02:00
ThorstenB
3986e1fe3a Add separate switch to enable/disable AI scenario support.
Switch is enabled automatically when scenarios are given on command-line.
2012-04-30 19:04:49 +02:00
ThorstenB
9b51c5e87e #248: support enabling AI module at run-time
Also adapt MP and traffic module to enable the AI module when required.
This makes /sim/ai/enabled an internal property: it can default to false
(in future), and can be enabled as soon as any user-level feature (traffic,
MP, local weather, ...) requires it.
2012-04-30 17:26:04 +02:00
ThorstenB
89b41395d8 Move viewer-related sources to separate folder.
Simple source directory clean-up, so "Main" folder contains fewer stuff
and the list of files in the editors a lot shorter.
2012-04-25 23:28:00 +02:00
ThorstenB
d683d39e85 Fix SceneryPager destruction sequence.
SceneryPager singleton must not be removed while FGScenery is still alive,
so hold a reference to it in FGScenery, saving the pager from being
deleted first.
2012-04-15 15:30:44 +02:00
ThorstenB
ffe7149b81 Don't call "exit" when reporting an error.
Add some more guards for missing way points.
Comment out some unused variables.
2012-04-12 19:38:32 +02:00
ThorstenB
c14343d02b AIFlightPlan: Initialize the same member variables in all constructors.
distance_to_go / lead_distance were not initialized in all constructors.
Fixes 'condition on uninitialized data' reported by valgrind.
Also comment-out unused vars.
2012-03-26 21:11:03 +02:00
ThorstenB
11a9bdf29e #548: segfault in AIFlightPlanCreate
check "tn != NULL" before calling tn->getGeod()
2012-03-25 10:34:07 +02:00
ThorstenB
0abf252ec8 Use tiedPropertyLists instead of manually matched tie/untie calls.
Ensures we don't forget to untie some individual properties.
2012-03-04 15:30:08 +01:00
ThorstenB
578df0f484 #553: decouple OSG callbacks from Nasal subsystem 2012-02-06 22:19:33 +01:00
ThorstenB
246feef85f #553: MP-model-loading related segfault
MP aircraft are loaded by a separate OSG thread (introduced after FG2.4.0).
The OSG thread also calls the "modelLoaded" callback. However, we mustn't
allow the OSG thread to call FGNasalModelData::modelLoaded directly:
FGNasalModelData isn't thread-safe. There are obvious issues (_callCount++;),
tricky issues like calling the Nasal _parser_ or creating hashes and
modifying the global Nasal namespace. It doesn't use locks to protect
against another thread executing a Nasal context or running garbage
collection. It also executes Nasal code itself (the model's "load" hook),
which we also cannot allow in a separate thread...
This patch returns all Nasal parts of MP-aircraft loading (parsing,
module creation, execution) to the main thread, while keeping the
multi-threaded OSG part (loading of MP-aircraft model files itself).
The same issue exists with scenery models (see other commit).

To summarize with 2 words: It s*cks... ;-)
2012-01-08 13:28:49 +01:00
ThorstenB
dac00efbc7 Fix some compiler warnings.
Comment out unused code.
2012-01-02 23:16:17 +01:00
Durk Talsma
aab04f44bd Bugfixes and some finetuning:
* Pregenerating taxiroutes could interfere with runway assignments by ATC, when conditions changed, resulting in a taxi to one runway and a takeoff from another
* A simpler solution for the "Error in Traffic record bug". This still needs some more testing, but I haven't seen any error message anymore, since changing to the current code.
* Initialize AI traffic at speed zero, this should prevent some weirdness observed under boundary conditions.
* Don't activate groundnetwork proximity detection for pushback traffic until the "ready for startup message is transmitted. this should allow sufficient time for them to reserve a route, but a little more testing still needs to be done.
2012-01-02 22:23:24 +01:00
Torsten Dreyer
ddb4fa050f Some warning fixes, mostly unused variables 2011-12-25 14:41:47 +01:00
Erik Hofman
1fb790eb60 comment out unused variables and function and properly initialize variables 2011-12-19 16:50:21 +01:00
Erik Hofman
c78b7e1abb Remove AI prefix for the sound path and add it to the config files instead 2011-12-14 12:45:22 +01:00
ThorstenB
d47342a5a4 Add --log-class option, improve logging classes.
Replace SG_GENERAL by more specific log classes in many places.
Allow "," to separate logging classes (using "|" is odd on the
command-line).
Also add new option to make logging more useful for developers.
You can use:
  --log-level=debug --log-class=environment
to only get environment debug messages, or
  --log-level=debug --log-class=sound,ai
to only get debug messages related to the sound or AI subsystem.
2011-12-11 14:06:17 +01:00
ThorstenB
444720f62d Avoid useless warnings during FG startup.
Do not warn about missing scenery manager, unless it is really needed.
Also raise warn level for multiple init calls.
2011-12-09 17:19:45 +01:00
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
Durk Talsma
5228053f7f Merge branch 'next' into durk-atc 2011-07-24 08:44:22 +02:00
James Turner
7abf7c5748 CMake header support for XCode/Visual Studio 2011-07-19 07:58:03 +01:00
Durk Talsma
f8a8805e2d Merge branch 'next' into durk-atc 2011-07-01 22:20:40 +02:00
ThorstenB
1ebab94710 #358: Missing option to disable AI scenarios
--ai-scenario=... can only add/enable another scenario.
Introduce --disable-ai-scenarios option to disable all scenarios (can be
used by external launchers, GUIs etc)
Also provide error instead of debug message when a scenario cannot be loaded.
2011-06-26 16:08:19 +02:00
ThorstenB
c19664291f #221, #242: Fix/work-around for AI traffic issues
Move the disable-HOT feature from the MP aircraft to the a/c base class,
disable HOT for all AIaircraft, since that's a fix/work-around for
#242: AI aircraft respect the user a/c only when HOT is _disabled_ for them
#221: AI aircraft don't stack at parking positions when HOT is disabled
Also generally disables HOT for ballistic and other models (suggested by vivian),
allowing it for ship/carrier models only.
2011-06-25 20:44:44 +02:00
Torsten Dreyer
bad5fbf66a Use computed gravity instead of hardcoded value 2011-06-08 20:17:40 +02:00
Vivian Meazza
8b6779aa96 Bugfix: set life timer to 0 on instantiation and when ballistic object dies.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2011-06-06 09:32:00 +01:00
Durk Talsma
de1564d83e Merge branch 'next' into durk-atc 2011-05-31 20:38:42 +02:00
Vivian Meazza
a6cc487b74 Add the capability of switching slaved objects at runtime.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2011-05-24 19:45:08 +02:00
Vivian Meazza
455b7fe61e Add the capability of switching slaved objects at runtime.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2011-05-21 17:08:36 +01:00
Durk Talsma
6ee1d7411b Simple FlightPlan generation and execution for the user aircraft: This will allow ATC guided taxiing to the runway. 2011-05-07 10:03:27 +02:00
Durk Talsma
17fececa9f Some more work on AI/ATC user interaction integration:
* Update AI aircraft object based on user position.
* Process flightplan
* Don't try to update the radar information for AIAircraft that don't have a valid manager pointer
2011-04-29 20:44:05 +02:00
Durk Talsma
a7ccae9fca More work on AI/ATC integration:
- Fixed a bug in AI aircraft ground steering code: When aircraft were not moving, the value of headingchangeRate kept increasing to insane levels. Although this was clamped to a maximum of 30 degrees per second, the initial rate could still push the aircraft in the wrong direction. In practice, this bug would be visible when an AI aicraft would be pushed back, when it tended to veer to the right.
 - Make sure that the aircraft slows down well ahead of the pushback point. This change ensures that the AC will actually reach the pushback point. It also ensures a slightly tighter steering range.
 - AI ground steering rate is tuned to 30 degrees per second at a nominal taxispeed of 15. I now modulate the heading adjustment rate by manipulating the adjustment using a non-linear function (the sqrt). This allows for a slightly tighter turn radius at speeds < 15 and slightly looser turns at speeds > 15.
 - The AI Flightplan generation code can return false. This can be used to determine whether any additional AI aircraft may be created. Currently, the function returns false when no more parkings are available. This should limit the build-up of huge AIAircraft tower stacks.
 - The ground network can now graphically display all aircraft actitivy on the ground network by using a virtual marker system.
2011-04-19 18:01:24 +02:00
Durk Talsma
c597f72158 Added some interface function to traffic manager related classes and added a traffic record that mimicks the users aircraft's traffic intentions. 2011-04-12 23:28:48 +02:00
Durk Talsma
493661a2dc Small step forward: Ensure that traffic information is appropriately updated. 2011-04-11 22:23:53 +02:00
Durk Talsma
819e6a04fa Some more work on AI/ATC interaction.
* Added an AIAircraft that is shadowing the user aircraft's behavior, in terms of AI / ATC interactions
* Set up a shadow AI FlightPlan that is used for tracking the user's aircraft.
2011-04-10 12:46:00 +02:00
Durk Talsma
52b0baace1 adding changed files for previous commit. 2011-04-03 17:58:16 +02:00
ThorstenB
f6b9c5b908 Make AIplanes respond to TCAS RAs. 2011-02-25 21:12:35 +01:00
ThorstenB
0f7f7fce6b Expose vertical speed for MP planes
vertical speed of MP planes was always 0,
calculate their (average) vertical speed since
it's required for TCAS and TCAS display
2011-02-25 21:12:35 +01:00
Torsten Dreyer
f938a23d7c clear two gcc warnings 2011-02-25 20:46:18 +01:00
ThorstenB
8962477cfa Fix huge multiplayer memory leak.
Almost all FGPropertyData elements received via MP were leaked.
Property data is now cleanly deallocated in the FGExternalMotionData destructor.
Thanks to Jester for reporting rising mem consumption in MP mode.
2011-02-16 00:49:00 +01:00
ThorstenB
133cfbfa7f Fixed several compiler warnings
uninitialized or unused variables, init sequence, ...
2011-02-02 22:05:54 +01:00
Frederic Bouvier
6bb8e69b92 Initialize class member in AIFlightPlan 2011-01-30 21:20:50 +01:00
Mathias Froehlich
70dd6279a7 Add an initial implementation of a hla module. 2011-01-17 21:35:03 +01:00
ThorstenB
867508def8 Minor update
Missed this place during code clean-up
2011-01-10 21:19:51 +01:00
ThorstenB
6ff61836fe AI traffic performance boost for busy airports
Stop ground elevation (scenery) checks for stationary AI aircraft.
2011-01-10 20:53:46 +01:00
ThorstenB
6eadcb8dfc Fixed AIplane vertical speed.
Fixed reversed fps-fpm conversion.
2010-12-29 21:17:46 +01:00