1
0
Fork 0
Commit graph

485 commits

Author SHA1 Message Date
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
Curtis L. Olson
f8015bf54f Add a small bit of nan/fpe protection. It's possible that this routine
could be called with a zero dt which would then lead to a divide by zero
error if we ran through all the computations.
2010-12-20 12:20:57 -06:00
James Turner
a91ec5f9f9 Initial work on CMake build files, with considerable help from Olaf Flebbe. 2010-12-19 15:06:04 +00:00
Csaba Halasz
674a295896 Merge commit 'refs/merge-requests/13' of git://gitorious.org/fg/flightgear into next 2010-11-30 00:26:22 +01:00
ThorstenB
44901ae86f Tile manager improvements
Priority scheme for tile loading/removing
Cleaner tile manager interface for AI/groundcache/...
Reduce start-up delay. Drop splash screen when inner scenery is available.
Be nice to osg loader: slow-down main loop while initial scenery is still loading.
2010-11-19 13:59:43 +01:00
ThorstenB
ca3cabc60a Kill some unnecessary include dependencies.
Speed-up compilation when working on tilemanager.
2010-11-19 13:44:52 +01:00
ThorstenB
e5348b67a5 New property identifying missing MP planes
Provide "model-installed" property at MP planes for pilot list.
Avoid direct directory access in Nasal (aircraft installed check).
2010-11-13 16:29:34 +01:00
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
ThorstenB
7dd2cf19e8 Fixed some compiler warnings.
Please the compiler (gods).
2010-10-29 21:14:09 +02:00
Vivian Meazza
b88d0988cd More rationalization of methods, and other clean-ups
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-10-28 17:29:41 +01:00
James Turner
0147f78d20 Remove persistent references to AI mananger and its objects from the submodel-manager. 2010-10-28 15:10:37 +01:00
James Turner
f5c2c630eb Remove references to old (unused) airways code 2010-10-20 17:54:16 +01:00
James Turner
0d7769ae72 Search aircraft dirs when loading AI models. Thanks to Thorsten Brehm for the catch. 2010-10-20 00:07:54 +01:00
James Turner
0beab94cb5 Make the tile-manager a well-behaved SGSubsystem 2010-10-01 19:09:19 +01:00
Csaba Halasz
5a2d948c6f Add missing initializer in AIBallistic.cxx 2010-09-30 13:07:42 +02:00
Vivian Meazza
abd1d983c6 Rationalize methods.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-30 01:08:50 +02:00
Vivian Meazza
2b95158704 Add coefficients configurable at runtime, and bugfix.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-30 01:06:19 +02:00
Vivian Meazza
a5eba61c2a Remove unneeded variable.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-30 01:05:59 +02:00
Csaba Halasz
5000d212ec Merged commit from Vivian Meazza: Rationalize methods (ea85e50c2093942164bbc02f371a0c05b259f9f4) 2010-09-30 01:05:04 +02:00
Csaba Halasz
141186a358 Merge branch 'next' into vivian
Conflicts:

	src/AIModel/AIBallistic.cxx
	src/AIModel/AIBase.cxx
2010-09-30 00:45:13 +02:00
Vivian Meazza
10866851de Add join manoeuvre/command to AIWingman. Rationalize more methods. Fix some more bugs 2010-09-30 00:34:15 +02:00
Durk Talsma
df00df3feb - Fix compiler warnings. 2010-09-27 17:48:38 +02:00
Anders Gidenstam
cf4d0fb0e3 Restored src/AIModel/AIShip.hxx to unix line endings. The last step of
rebasing merge-request #6 for inclusion.
2010-09-17 22:03:00 +02:00
Vivian Meazza
474789269b Bugfix - untie property.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:44:58 +02:00
Vivian Meazza
00f26994b2 Add <name> tag so that AIWingman or other suitable AI Object can be attached.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:44:58 +02:00
Vivian Meazza
1dc3ecf016 Make AI Objects of type Wingman, Escort, and GroundVehicle able to be stationed or formated to any AI Object type which can be named - Carrier, Ship, Tanker, Wingman etc.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:44:58 +02:00
Vivian Meazza
f08012d14f Remove debugging statement.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:44:58 +02:00
Vivian Meazza
b22960ffff Associate submodels with parent AI Objects.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:17:56 +02:00
Vivian Meazza
2758f07df0 Use AIBase method setParentNode() vice the local method.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:17:56 +02:00
Vivian Meazza
afbc360eed Add callsign for consitency.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:06:35 +02:00
Vivian Meazza
c7e864cee9 Move methods "setParentNode()" etc. to make them available to all AI Objects.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:06:35 +02:00
Vivian Meazza
b4fbde72b2 Enable Ballistic objects to be slaved to any AI Object.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-17 21:06:35 +02:00
Csaba Halasz
fdbfd6fd0b Merge commit 'refs/merge-requests/1552' of git@gitorious.org:fg/flightgear into next
Conflicts:

	src/MultiPlayer/multiplaymgr.cxx
2010-09-09 00:48:17 +02:00
James Turner
8a97ed354d Fix submodel code to work with multiple aircraft dirs. 2010-09-06 09:12:25 +01:00
Anders Gidenstam
95a7e177d7 Restored line endings in src/AIModel/AIMultiplayer.cxx.
Please check that the line endings are not messed up before mergeing.
2010-09-02 19:46:44 +02:00
Vivian Meazza
bc12f0be21 Walk the AImodels property tree only once at init, rather than at update. Should have a beneficial effect on frame rate, but in practice makes no discernible improvement. It is cleaner code though.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-09-02 09:24:45 +01:00
Vivian Meazza
118036cdda Make the parameter isTanker controllable
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-08-30 17:15:34 +01:00
Vivian Meazza
8ca420ec53 Merge branch 'next' of D:\Git_New\flightgear into next 2010-08-30 09:49:42 +01:00
Durk Talsma
467513cbaf Major update to the AI code:
* New features
    - More realistic descent paths
    - Separation during descent and approach
    - ATC approach controller (still silent)
    - inbound traffic flow will start immediately
  * Bug fixes
    - Properly handle vertical speed when on ground
    - Departing aircraft now wait for taxiclerance before moving
    - Traffic manager waits for proper weather initialization
    - Fixed instabilities in the preferential runway usage code
    - Fine tuning of waypoint following code.
2010-08-29 19:25:34 +02:00
Vivian Meazza
9e44be1df7 Merge branch 'next' of D:\Git_New\flightgear into next
Conflicts:
	src/AIModel/AIBallistic.cxx
2010-08-29 00:08:50 +01:00
Vivian Meazza
dff8099994 Major update of Ballistic objects and submodels. Introduce submodels slaved to AI Objects. Remove deprecated code. Try to increase framerate. Use quaternion calculations for Initial Conditions.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-08-29 00:00:09 +01:00
Frederic Bouvier
52ac173257 Merge commit 'refs/merge-requests/1551' of git://gitorious.org/fg/flightgear into stuartb/modelcallsign 2010-08-21 14:54:08 +02:00
Vivian Meazza
72c5a314e6 Add aubmodels to AI objects
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-08-14 13:39:30 +01:00
Vivian Meazza
d317428257 More tidying
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-08-01 14:50:03 +01:00
Vivian Meazza
6a7ec168e5 Tidy up for commit
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-08-01 10:47:40 +01:00
Vivian Meazza
a61f34667f Merge branch 'work4' into next
Conflicts:
	src/Environment/environment_mgr.cxx

Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-07-28 22:39:07 +01:00
Vivian Meazza
adf17287ab Add "expiry" parameter and other changes to implement persistent contrails using Ballistic objects
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-07-28 22:20:50 +01:00
James Turner
d1852430bf Make various implicit includes (via PLIB) explicit. 2010-07-28 10:25:42 +01:00
Durk Talsma
a49d553ea8 Merge branch 'next' of git@gitorious.org:fg/flightgear into next 2010-07-24 09:21:06 +02:00
Durk Talsma
7313b8f1df - Trying to improve waypoint following. 2010-07-24 09:19:37 +02:00
James Turner
900fce6374 Fix issues exposed by PLIB-free SimGear. 2010-07-23 09:41:37 +01:00
Vivian Meazza
6310fdd9c5 Remove range criteria, add sub-submodels to any depth, and add expiry criteria
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2010-07-16 23:05:05 +01:00
Durk Talsma
74549784b4 Whoops, forgot to add this file. 2010-07-04 21:00:36 +02:00
Durk Talsma
b78bf2e9e6 Make sure that takeoff distance calculations are done in the correct frame of reference. Additionally, add some experimental lead-in distance clipping code (although the latter needs more sophistication, because it leads to a considerable increase of spinning around waypoints when on ground. 2010-07-04 20:57:25 +02:00
Mathias Froehlich
721ae71cd7 Use simgear abstraction instead of directly osg for the AIBase class. 2010-06-16 07:00:18 +02:00
Mathias Froehlich
a565e90c4f Fix an uninitialized value valgrind warning. 2010-05-29 16:31:58 +02:00
Mathias Froehlich
9626805a09 Fix an uninitialized value valgrind warning. 2010-05-29 16:31:05 +02:00
Stuart Buchanan
1a29f4499a Export the AI object callsign on ballistic impact. 2010-05-24 21:16:46 +01:00
Torsten Dreyer
a060fe3acf Stuart Buchanan:
A small patch to allow the user to ignore specific
MP aircraft on a per-MP instance basis by setting
"controls/invisible". This
property name was chosen for consistency with the existing property
for AIBallistic objects.
2010-05-20 21:25:37 +02:00