1
0
Fork 0
Commit graph

380 commits

Author SHA1 Message Date
frohlich
3afc7e0690 Move the velocity computations for aimodels into AIShip.
You should now be able to step on any ship with your model.

Modified Files:
	src/AIModel/AICarrier.cxx src/AIModel/AIShip.cxx
	src/AIModel/AIShip.hxx
2009-03-05 10:52:03 +01:00
frohlich
1708e43a39 Make initial use of the boundingvolumes for the ground cache.
Modified Files:
	src/AIModel/AICarrier.cxx src/AIModel/AICarrier.hxx
	src/FDM/flight.hxx src/FDM/groundcache.cxx
	src/FDM/groundcache.hxx
2009-03-05 10:52:03 +01:00
durk
321706a007 Remove stray debug statement. 2009-03-05 10:52:03 +01:00
durk
c7e9c7a610 Some initial code for AI Aircraft making use of SIDs. Current code is a bit
experimental: Only one SID per runway is supported, and the waypoints are
read from file at every request, which is not very efficient. The current
code is only executed when FlightGear is configured to use airport dynamics
data from the scenery repository, instead of the base package. Since the
latter is still the default, I believe that this will provide enough safe-
guarding to commit SID/STAR support in small, incremental steps.
Next step will be buffering and support for multiple departure routes per
runway.
2009-03-05 10:52:03 +01:00
durk
d24fe19914 One step further toward better integration of AI and ATC systems.
* 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.
2009-02-16 00:56:44 +01:00
mfranz
4b5353d396 make default model configurable (default: Models/Geometry/glider.ac)
This allows to set Models/Geometry/null.ac or something that doesn't
look bad in multiplayer for both fast and slow speeds, for example
the harrier.
2009-02-04 23:51:22 +01:00
fredb
41a8ae42f5 Allow the search of header files in the current directory 2009-02-02 00:58:00 +01:00
durk
9a19c238a9 And some more cleanup. 2009-02-02 00:58:00 +01:00
durk
c6f88e5b9b Development for two new features:
* 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.
2009-02-01 23:44:10 +01:00
Tim Moore
9bb896dd20 Merge branch 'maint' into next 2009-01-18 23:22:06 +01:00
timoore
51b686a796 Division by zero fixes from Vivian Meazza. 2009-01-18 23:17:23 +01:00
Tim Moore
76958a0382 Merge branch 'maint' into next 2009-01-14 22:32:52 +01:00
jmt
473bf5f731 Apply Ron Jensen's fix for Csaba's atan2() fix. Also remove some dead code,
and use SG_NORMALIZE_RANGE.
2009-01-14 22:31:55 +01:00
jmt
6f2dc41135 Simpler bearing and distance computations for AIFlightPlan. 2009-01-07 10:39:09 +01:00
jmt
e39373cb6a Clean up naming of the 'point on runway' helpers, to get rid of the confusing
notion of a 'displacedThreshold'. Now there's just a real threshold,
displaced or otherwise, and people who care about the paved area can use
'begin' and 'end'. Thanks to John Denker for pointing out the confusion this
leads to. Using 'end' also gets rid of the 'reverseThreshold' name, which was
clearly a bad choice of mine.
2009-01-07 10:22:53 +01:00
Tim Moore
89010e6b0a Merge branch 'maint2' into next 2009-01-04 00:25:04 +01:00
jmt
1a05695ff5 NaN fix by Csaba/Jester - prefer atan2(x,y) to atan(a/y). 2009-01-04 00:24:33 +01:00
durk
632d89d6e7 James Turner: Cleanup of AI traffic route generation code. 2009-01-04 00:17:45 +01:00
Tim Moore
43b300fe46 Merge branch 'maint2' into next 2009-01-04 00:01:46 +01:00
fredb
6ccc0b64ef Win32 fixes 2009-01-04 00:00:20 +01:00
jmt
0f4f044a94 Kill off many Point3D includes, and a couple of uses in the HUD code.
Requires a SimGear update to get some new SGGeodesy helpers.
2008-12-26 12:28:05 +00:00
durk
1fdac74f8e Minimize impact of distant AI models on the scene graph. 2008-12-10 16:04:10 +00:00
durk
931c661b40 Changes to the AIModel code, to prepare for the new traffic manager code:
- Leg loading can fail when no additional flights are available
- Better support for waypoint interception during pushback (speed ~ 0)
2008-11-16 13:41:24 +00:00
fredb
dc2341b643 Revert to previous revision after an error during last commit 2008-10-19 16:22:17 +00:00
fredb
2710564c7d Alex Perry :
This patch changes terrasync so it links against the subversion
library if you have it installed.  It supports people who build binary
releases for use by non-developers by removing the runtime external
dependency on having command line svn or rsync available.  Since the
patch changes autoconf to detect libsvn,  I'd appreciate it if people
who release binaries could verify that the detection scripting works
for their platform.

Developer warning:  If you do have libsvn developer libraries
installed, terrasync changes its default option from "-R" to "-S" to
remove the command line dependency.  However, Martin has not yet
uploaded world scenery into the subversion repository so it won't be
useful to fly against and you may want to specify "-R" on the command
line in the short term.  Or run both.


Me: Update MSVC 7.1 project file. Need svn-win32-1.x.y_dev.zip and svn-win32-1.x.y.zip
located at http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100
2008-10-19 16:08:29 +00:00
ehofman
aa78341698 James Turner:
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.
2008-09-11 08:38:09 +00:00
curt
c7f6156324 "make dist" fixes. 2008-08-28 21:20:21 +00:00
durk
554dba0f3f James Turner: Here's a trivial patch, when you have a moment:
- removes various members from FGRunway which no-one was using
- any of these can be trivially re-instated if and when someone
actually wants to use them - but right now they're simply bloating up
FGRunway, which we have lots of, because it currently includes all the
taxiways in Robin's data.
- that's it.
2008-08-21 16:34:33 +00:00
durk
301054204e James Turner: Improved runway management code:
- 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.
2008-08-14 18:13:39 +00:00
timoore
0d0bd58268 Allow generic file protocol to terminate fg after a number of repetitions. 2008-08-07 22:24:47 +00:00
ehofman
14885374de header cleanups 2008-07-31 12:04:32 +00:00
ehofman
667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- 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
2008-07-27 16:25:13 +00:00
ehofman
d9bfd5a425 This should apply, and everything should build cleanly, in isolation from the
SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets
rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than
replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed
the small number of places to use std:: explicitly. So we're no longer polluting
the global namespace with the entire contents of std, in many cases.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another
mechnical change, replacing <math.h> with <cmath> and so on *everywhere*, but
one step at a time)
2008-07-25 18:38:29 +00:00
ehofman
eccddb3dfd Attached patches remove BORLANDC, and hence SG_MATH_EXCEPTION_CLASH and SG_INCOM
PLETE_FUNCTIONAL from SimGear and FlightGear.

As a result, SG_HAVE_STD_INCLUDES is now *always* set, so I will get the boring
fixes for that done, but separately. I'm still auditing the other things in comp
ilers.h - there's a lot that can die now BORLAND is gone.
2008-07-25 10:39:53 +00:00
durk
17c42deae1 Initial attempt to establish a better integration between AI and ATC code.
Various other patches that have been lingering around for a while:
 * Moved trafficcontrol.[ch]xx from the Airports directory to ATC, where
   it really belongs.
 * AI aircraft will request startup clearance, and ground control will
   approve.
 * Starting AI Aircraft will be pushed back to a predefined holding point
   on the ground network, and wait a while before taxiing out to the runway
2008-07-13 12:51:06 +00:00
fredb
68124ca36d Remove unused variables 2008-06-01 14:59:20 +00:00
mfranz
6fb7b8ead9 noise-- 2008-05-18 21:05:11 +00:00
durk
7783e64953 Some tweaks and finetuning made possible by the multihreaded modelloader
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.
2008-04-02 19:01:48 +00:00
fredb
34e435429c Win32 fix 2008-03-22 12:18:53 +00:00
timoore
fd492a297a model paging patch from Till Busch
From Till:
i started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.

currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there

2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.

3. simplify mode-loading functions (avoid passing around fg_root)

4. avoid supurious MatrixTransform nodes in loaded models

5. fix some memory leaks
2008-03-22 09:31:06 +00:00
mfranz
e5b5f7c2b1 upgrade important log messages 2008-02-23 23:58:19 +00:00
timoore
79e251383b Wingman code from Vivian Meazza 2008-02-15 11:06:27 +00:00
curt
4fa75196ce Clear chat messages when an aircraft becomes inactive in the property tree. 2008-01-29 15:02:47 +00:00
timoore
b2b35568d7 Ballistics underslung load changes from Vivian Meazza 2008-01-04 22:31:18 +00:00
timoore
7aee6b0a60 Ballistics fix from Vivian Meazza 2007-12-28 22:05:14 +00:00
timoore
9ecc3415fb Experimental patch for applying force to ballistic objects
From Vivian Meazza
2007-12-21 23:37:05 +00:00
mfranz
602e41bab6 don't write past array bounds 2007-10-11 07:41:44 +00:00
fredb
9d67f94005 Win32 fix and add a reminder in an unfinished function 2007-08-12 13:38:36 +00:00
durk
1c8f2e3c5b - Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
  current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
  implementation is slightly more computationally intensive than strictly
  required, due to the currently inability of taxidraw to link one specific
  pushBack point to to a particular startup location. FlightGear now determines
  this dynamically, and once we have that functionality in TaxiDraw, the
  initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
  aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
  constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
  limited to include pushback points and routes only, but can probably be
  extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
  order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
mfranz
fad737b41e prevent multiple loading of one and the same scenario 2007-08-03 18:02:33 +00:00
mfranz
7d94177636 Vivian MEAZZA: fix subsubmodels 2007-08-01 10:44:17 +00:00
frohlich
49779e64f0 Modified Files:
src/AIModel/AIFlightPlanCreateCruise.cxx
	src/Traffic/Schedule.cxx:
	SGGeoc::fromCart should now work correct.
2007-07-27 19:31:44 +00:00
durk
c51c0b1664 Slightly altered calling sequence ensures AI aircraft are removed from
memory when flying out of user range.
2007-07-21 12:29:09 +00:00
mfranz
5c912ffad9 remove redundant if check in cases of if (foo) delete foo;
The C++ standard explicitly allows deleting a null pointer.
2007-07-20 14:46:45 +00:00
durk
b452234cb2 Fixes and code clean-up:
- 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.
2007-07-15 14:08:31 +00:00
mfranz
aacabde342 remove material name from the class 2007-07-14 07:35:12 +00:00
frohlich
e19b2289c9 Also untie waypoint-missed-count. 2007-07-14 04:27:47 +00:00
mfranz
94326d14af don't use _tgt_rudder uninitialized 2007-07-11 10:56:33 +00:00
durk
fdc1a2ba54 Bugfixes: 1) Fix the if (next) setLeadDistance bug
(reported by Csaba Halaszi /helijah)
          2) Decrease AI aircraft Heading error tolerance to 1% of its
             original value. This is necessary to mitigate spinning and
             makes for actual "on-runway" landings.
2007-07-10 07:01:54 +00:00
durk
83c37cc860 Publish and update callsigns of Traffic Manager (TM) created AITraffic. 2007-07-09 05:07:56 +00:00
frohlich
c1e29d0998 Modified Files:
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.
2007-07-08 08:46:29 +00:00
durk
f83fbfdf9c Fix "Tankers fly at warp 2" bug. 2007-07-08 07:08:49 +00:00
durk
f4529e5cfe AI traffic now honors separate runway assignments for different types of
traffic (i.e. commercial airliners will use a differnt part of the airport
than general avation, ultralight and/or military traffic.
2007-06-28 18:30:35 +00:00
durk
1613d7e63e Thomas Foerster: Prepare for the inclusion of aircraft specific performance
data for AI traffic. Default performance classes are still available as a
backup. This database will allow the calculation of aircraft-specific
take-off speed and estimate runway lenght requirements. Further added
rudimentary support for take-off and landing rotation of AIAircraft.
2007-06-28 07:47:20 +00:00
mfranz
800dd73551 Vivian MEAZZA & Tim MOORE:
- re-enable od_gauge ("owner drawn" render-to-texture instruments)
- implement radar in c++ (unlimited number of clouds/ai/mp/... objects,
  better performance)
2007-06-24 07:57:45 +00:00
fredb
97ed8554c6 Win32 fix 2007-06-16 16:16:15 +00:00
fredb
291462c25e Consistency fix 2007-06-16 15:57:42 +00:00
durk
6fc1a51e1d Removed a stray debug message. 2007-06-16 05:38:05 +00:00
durk
0643b21baa Fix for refueling and radar calculations. 2007-06-15 20:52:32 +00:00
mfranz
b4cdfed406 Vivian MEAZZA:
simulate rotational moment of inertia by using a filter
2007-06-11 20:47:20 +00:00
mfranz
d39432ea6c Vivian MEAZZA:
- let sumodels without subsubmodels die on impact
- remove "sub-id" tying

mf: move variable declarations to better places, variable renaming
2007-06-10 18:24:48 +00:00
durk
514acc9f5f Changed formatting to K&R/4 by "popular demand". 2007-06-10 06:06:57 +00:00
durk
ba8ed137cf Code cleanup of AIModels (mainly AIAircraft), by Thomas Foerster 2007-06-09 11:49:16 +00:00
mfranz
2e1756156f another secret commit to sneak in stuff:
- cleanup
2007-06-07 22:48:37 +00:00
mfranz
5a73a46cd0 Vivian MEAZZA:
- collision detection for AI objects
- subsubmodels

mf: various modifications; more general cleanup to do
2007-06-07 16:30:26 +00:00
mfranz
d11e18f9a7 Syd ADAMS:
"normalize the radar x and y-shift , 0 to 1.0 based on
/instruments/radar/range to make animation simpler"
2007-06-03 18:17:05 +00:00
mfranz
bbb1d2d0c3 - add heading-deg, pitch-deg, roll-deg to impact/
- if no <impact-reports> node is defined for a particular submodel, then
  write the path to /ai/models/model-impact instead
- don't tie() properties that are only ever set a single time, if at all!
- better variable names
2007-05-31 18:08:12 +00:00
mfranz
b0fd3deeb0 reverting a small part; shouldn't make a difference, though 2007-05-15 21:37:16 +00:00
mfranz
b727604591 drop /ai/models/ballistic[]/impact/signal node, and allow instead to define
a report node in the submodels config:

  <impact-reports>/sim/model/cow/impact</impact-reports>

When an impact happens, then the path of the submodel will be written to
this node. An attached listener function can evaluate the impact properties.
2007-05-15 19:45:41 +00:00
mfranz
4de2c7619a - add leading underscores to class member variables
- initialize ht_agl_ft with high value to avoid premature impact animation
- cosmetics
2007-05-15 17:22:49 +00:00
mfranz
7d5952b185 Vivian MEAZZA: add terrain collision for submodels on request
(set <impact>1</impact> in the submodel config)

mf: minor modifications & cleanup; more to come
2007-05-15 16:19:11 +00:00
mfranz
0a9d71ee51 Vivian MEAZZA:
- extract common parts of load() and loadAI() into setData()
- fix trigger handling for aircraft that set a not yet existing property
2007-05-12 10:39:56 +00:00
frohlich
4fe615fff5 Modified Files:
src/AIModel/AIBase.cxx src/AIModel/AICarrier.cxx
	src/ATC/AIEntity.cxx src/Cockpit/hud_rwy.cxx
 	src/FDM/Makefile.am src/FDM/flight.hxx src/FDM/groundcache.cxx
	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
	src/Main/fg_init.cxx src/Main/main.cxx src/Main/renderer.cxx
	src/Main/viewer.cxx src/Main/viewer.hxx src/Model/acmodel.cxx
	src/Model/modelmgr.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tileentry.cxx
	src/Time/tmp.cxx: Remove the scenery center handling.
	Osg has double valued transforms at any relevant place.
2007-05-05 08:08:24 +00:00
mfranz
3233ce8a44 Vivian MEAZZA:
"BUGFIX - fix initiation order - make sure that the AI Model list is
populated before we attempt to attach submodels."
2007-04-27 11:02:39 +00:00
mfranz
2621ba7a47 Csaba "Jester" HALASZ: radar fix & extension
- fix breakage due to former commit (AIManager.cxx, r1.72)
- make AI properties available in AIBase
- add <valid> property for animations/nasal scripts
- support more MP and AI targets
- add target select and altitude display
2007-04-04 09:51:41 +00:00
mfranz
b361105202 Csaba HALASZ: don't treat every entry in a scenario file as model entry,
especially those called <description>. This was responsible for the aircraft
at --lon=0 --lat=0.
2007-04-02 12:47:26 +00:00
mfranz
8a6c95451b allow AI models to contain <nasal><load> and <nasal><unload> blocks in
their XML wrapper/animation file. They can access their /ai/models node
via cmdarg() function. Example:

  <nasal>
          <load>
                  print("Hi, I'm the Nimitz. My data are under ",
                                  cmdarg().getPath());
          </load>
          <unload>
                  ...
          </unload>
  </nasal>

Note, however, that the <unload> block is only called on exit at the moment,
not when the tile is unloaded.
2007-04-01 12:39:20 +00:00
mfranz
bec023b43c Vivian MEAZZA:
"""
"Flight plans" which can start at a given time (gmt)

WAITUNTIL tokens which pause the flight plans until a given time (gmt)

Submodels can now be attached to any AI objects (except submodels - it can
be done, but in my experimental code it's too expensive in frame rate atm)

"No-roll" attribute added to Ballistic objects - useful for wakes and the
like

"Random" attribute added to Ballistic objects (adds =- 5% to the Cd) -
useful for smoke, exhausts

If the <trigger> tag is not specified the Ballistic object/s will be
released at start-up (cannot be stopped)

Submodels are not released from AI Objects if the AI Object is more than 15
miles away.
"""


mf: minor code and formatting fixes; submodels.?xx were FUBAR and are thus
    astyle formatted;

    NOTE that <name> tags END, EOF, WAIT, WAITUNTIL are *depreciated*.
    Don't get too used to them. This will have to be moved from the "name"
    to regular engries.
2007-03-30 22:51:52 +00:00
mfranz
002b880e7e Vivian MEAZZA:
"Implement 'flightplans' for AIShips. This patch also introduces the concept
of a 'WAIT' token for AIShips: when the flightplan reaches a 'WAIT', the
AIShip stops and pauses for the specified time (secs)."
2007-03-05 21:40:39 +00:00
mfranz
ce4360e157 Vivian MEAZZA: call AI models' ::reinit() methods on reinit 2007-02-26 11:47:04 +00:00
mfranz
98aa76ad33 Maik JUSTUS: fix bug that caused aircraft zombies on an MP player's last
position after he reset his fgfs
2007-01-28 11:40:56 +00:00
mfranz
c32ffcd3c9 Maik JUSTUS: add a missing pair of parens and rounding 2007-01-24 23:39:48 +00:00
mfranz
747b1e11cc Maik JUSTUS: fix bug in previous commit 2007-01-13 16:04:28 +00:00
durk
7299699903 Maik Justus,
Here is a patch for two bugs in the AI/multiplayer part:

1. Cannot find model file *.ac error message (was only a false message,
anything worked correctly, the model was loaded from the correct path
afterwards).

2. Often many multiplayer aircrafts are missing in the property-tree.
(but I need them for aerotowing). There is still another bug: The
property in some circumstances seems not to be cleaned up after logout
of a multiplayer. I have added a workaround for this, but I don't now,
if it 100% works (should have no side effects, just aerotow would not
work sometimes). For testing I need more traffic on the mp-server.
2007-01-13 09:04:07 +00:00
frohlich
6cf05270f5 Modified Files:
AIBase.cxx AIManager.cxx AIManager.hxx: Remove dead code.
	No ground intersection on AI models. Note that the carrier still
	reenables that nodemask.
2007-01-06 14:25:55 +00:00
fredb
462dd6900c Remove unused variables 2006-12-17 18:40:55 +00:00
durk
b34dc24bdc Maik Justus:
Here the patch that makes fg search for multiplayer aircraft in AI/Aircraft
first.
2006-12-17 08:00:14 +00:00
mfranz
c0e1a380d6 make sure the node for the AI model removal report exists;
addressing a node with its path is unsafe at that time
2006-11-26 12:02:06 +00:00
frohlich
2e32ccf393 Modified Files:
src/AIModel/AIMultiplayer.cxx: Apply longstanding patch from Maik
	Justus. Fix double aircraft.
2006-11-22 17:16:19 +00:00
durk
e389bed31f Fix for a crash reported by Maik Justus. 2006-11-14 20:08:50 +00:00
durk
33037b2139 AI Update:
- 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
2006-11-11 10:52:05 +00:00
frohlich
6b9d29194b Modified Files:
src/AIModel/AIBase.cxx src/Main/main.cxx src/Main/renderer.cxx
	Reflect last change in SimGear
2006-10-31 06:27:34 +00:00
mfranz
3bc199c59f ssgSharedPtr.hxx -> SGSharedPtr.hxx 2006-10-30 16:31:45 +00:00
frohlich
b0f9d24f9d Modified Files:
configure.ac src/AIModel/AIAircraft.cxx src/AIModel/AIBase.cxx
 	src/AIModel/AIBase.hxx src/AIModel/AICarrier.cxx
 	src/AIModel/AICarrier.hxx src/AIModel/AIManager.cxx
 	src/AIModel/AIManager.hxx src/ATC/AIEntity.cxx
 	src/ATC/AIEntity.hxx src/ATC/AIMgr.cxx src/ATC/AIMgr.hxx
 	src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx
 	src/Cockpit/cockpit.cxx src/Cockpit/cockpit.hxx
 	src/Cockpit/hud.cxx src/Cockpit/hud.hxx
 	src/Cockpit/hud_rwy.cxx src/Cockpit/panel.cxx
 	src/Cockpit/panel.hxx src/Cockpit/built_in/FGMagRibbon.cxx
 	src/Cockpit/built_in/FGMagRibbon.hxx src/FDM/flight.cxx
 	src/FDM/groundcache.cxx src/FDM/groundcache.hxx
 	src/GUI/gui_funcs.cxx src/Input/input.cxx
 	src/Instrumentation/od_gauge.cxx
 	src/Instrumentation/od_gauge.hxx
 	src/Instrumentation/render_area_2d.cxx
 	src/Instrumentation/render_area_2d.hxx
 	src/Instrumentation/wxradar.cxx
 	src/Instrumentation/wxradar.hxx
 	src/Instrumentation/HUD/HUD.cxx
 	src/Instrumentation/HUD/HUD.hxx
 	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
 	src/Main/main.cxx src/Main/renderer.cxx src/Main/renderer.hxx
 	src/Main/viewmgr.cxx src/Model/acmodel.cxx
 	src/Model/acmodel.hxx src/Model/model_panel.cxx
 	src/Model/model_panel.hxx src/Model/modelmgr.cxx
 	src/Model/modelmgr.hxx src/Model/panelnode.cxx
 	src/Model/panelnode.hxx src/Navaids/awynet.cxx
 	src/Scenery/Makefile.am src/Scenery/hitlist.cxx
 	src/Scenery/hitlist.hxx src/Scenery/newcache.cxx
 	src/Scenery/scenery.cxx src/Scenery/scenery.hxx
 	src/Scenery/tileentry.cxx src/Scenery/tileentry.hxx
 	src/Scenery/tilemgr.cxx src/Scripting/NasalSys.cxx
 	src/Scripting/NasalSys.hxx src/Time/light.cxx
	Big BLOB on the way to OSG.
2006-10-29 19:30:21 +00:00
mfranz
bdf16b7b7e use correct data type for string::find() 2006-10-17 21:21:26 +00:00
mfranz
cc3ad61175 cerr don't belong in CVS
use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG!
use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG!
2006-10-12 22:12:09 +00:00
frohlich
8a67faaf5a Modified Files:
src/AIModel/AIMultiplayer.cxx src/MultiPlayer/mpmessages.hxx
	src/MultiPlayer/multiplaymgr.cxx
	src/MultiPlayer/multiplaymgr.hxx src/Network/multiplay.cxx
	Apply Stuart Buchanan's multiplayer property/chat patch.
2006-10-10 05:17:07 +00:00
durk
666910a793 Major update of traffic manager and AI related airport facilities.
- 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.
2006-10-06 17:36:31 +00:00
durk
8de6a69e3e Adding some more intelligence to the AI system step 2: Added a system to
detect interfering taxi routes and added a "hold position" instruction to
make one of two conflicting aircraft wait until it's route is cleared again
2006-09-19 17:04:22 +00:00
durk
5b2e16ca73 Ground network distance tracking code. AIAircraft taxiing at airports
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.
2006-08-26 07:22:20 +00:00
fredb
905f5a1029 Better encapsulation for personality 2006-08-25 22:16:31 +00:00
curt
fe86900e57 Make the vertical acceleration rate scale with vertical performance. The
default case for tankers should still be right about the same as where it was.
2006-08-20 23:38:38 +00:00
mfranz
371419acbf warnings-- 2006-08-08 18:40:18 +00:00
frohlich
13ce1e48fb Make better use of SGMath 2006-08-08 17:57:33 +00:00
fredb
e35afbdec7 Suppress warnings : remove unused local variables. Use correct, initialized, variables. 2006-07-30 21:04:29 +00:00
durk
8c2e595ff0 Spectacular improvement in traffic manager initialization and preparatory
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.
2006-07-29 18:17:19 +00:00
durk
402046e580 AI Modifications: 1) Added a patch that takes ground speed into consideration
using Curt's new speed adjustment code. 2) Separated the function
FlightPlanCreateCruise() into a new source file in preparation of a more
elaborate airway following scheme.
2006-07-27 14:42:15 +00:00
curt
5fc834f7f5 Attempt to shore up the numerical stability of the AI aircraft movement
computations.  This is probably not needed, but use double's consistently.
2006-07-27 02:27:43 +00:00
curt
1c2a3cc5ac White space ... 2006-07-27 02:26:30 +00:00
curt
f9badcf329 Remove side-slip (aka beta) from the heading offset of the target aircraft.
This is already accounted for in the true heading of the aircraft.
2006-07-27 02:25:58 +00:00
curt
674df0c4cd Add a "ufo" performance entry for the AI Aircraft. This gives very agressive
accel/decel and climb/decend performance which is useful for some scripting
scenarios.
2006-07-12 19:10:35 +00:00
curt
e7ed073c68 - Make two variable name modification to clarify units: altitude -> altitude_ft
and tgt_altitude -> tgt_altitude_ft.  Also fix a comment in AIBase.hxx
  indicating that the altitude is in meters, even though the usage throughout the
  code was most definitely feet.

- In AIMultiplayer.cxx, update the altitude_ft variable so that the altitude
  is reported correctly in the entity's property subtree.

- In AIMultiplayer.cxx, compute a velocity value in kts to fill in the speed
  entry in the entity's property subtree.  Note, this is not an earth centered
  reference speed, not an indicated speed and not a speed relative to the local
  airmass (that would be much harder to do.)
2006-06-24 00:00:27 +00:00
curt
4fade5839e Add a flag that allows the simulator to force "radar" computations even if
AI aircraft are out of range or the piloted aircraft has no radar system.

These computation include range, bearing, and angular offset relative to the
piloted aircraft.  This gives some external script the control the behavior
of the AI aircraft relative to the piloted aircraft without requiring a radar
system, and without requiring the AI aircraft to be within radar range.
2006-06-16 19:10:20 +00:00
curt
943b7b22a7 This patch only affects aircraft (AI Models) that have no predefined
flightplan.  Such aircraft are given some initial conditions that they
fly with.  They proceed on in "freeflight" mode indefinitely.  For example,
there is a refueling demo where the tanker starts at 3000', 280 kts, and
in a 15 degree bank, and then continues to orbit indefinitely.

For these aircraft with no flightplan, I have added several control nodes in
controls/flight that allow a script or menu or external application to set
heading, altitude, bank angle, and speed.  This permits some level of interactive
or scripted control over AI aircraft.
2006-06-16 14:22:21 +00:00
fredb
c5a7267206 Compile again on Win32 platforms 2006-06-16 10:17:06 +00:00
frohlich
ef52b23e3a Make more use of SGGeod 2006-06-15 19:16:21 +00:00
frohlich
c2d8dcc18b More use of SGGeo[dc]. 2006-06-15 08:29:43 +00:00
mfranz
79abf11466 add Nasal/Listener hooks for adding/removing AI/MP models. Things like
MP chat or Nasal/xml based radar instruments need that. It uses fgSetString,
because this is in a very "cold path" and shouldn't clutter the AIBase.
2006-06-11 15:32:18 +00:00
frohlich
14fe03ba6f Modified Files:
src/AIModel/AIAircraft.cxx src/ATC/AILocalTraffic.cxx
	src/FDM/flight.cxx src/FDM/flight.hxx src/FDM/groundcache.cxx
	src/FDM/groundcache.hxx src/Main/fg_init.cxx src/Main/main.cxx
	src/Scenery/hitlist.cxx src/Scenery/hitlist.hxx
	src/Scenery/scenery.cxx src/Scenery/scenery.hxx
	Make use of the attached SGMaterial reference userdata on scenegraph
	leafs. Make the SGMaterial pointer available to the ground query
	routines.
2006-06-11 13:34:18 +00:00
mfranz
e48967cb1d fix another crash on exit by finally converting the rest of unguarded
SGPropertyNode to guarded ones. This is also done for JSBSim/JSBSim.hxx,
for which JSB had given explicit permission a while ago. I postponed that
back then, but now is the time.
2006-06-11 10:21:10 +00:00
mfranz
942561d64c - remove trailing spaces
- fix many cases of broken indentation (but not all)
- unify indendation
- ...
2006-06-09 18:48:57 +00:00
mfranz
4db6e924fe Vivian MEAZZA:
" Make a couple of minor adjustments to Harald's weather radar code, make
elevation work in the radar code, and add station ident to the TACAN code"
2006-06-09 18:29:51 +00:00
mfranz
4f17b48e83 - use guarded pointer for (unused) refuel_node
- comment out refuel_node->setBoolValue()  (as it was in the original patch :-)
2006-05-26 05:23:40 +00:00
mfranz
d47e4ce0bd Vivian MEAZZA:
"Bug Fix - amend the code so that JSBSIm can have more than one tanker in
the environment at the same time. A nasal script has to be added to each
aar-capable JSBSim model to complete this fix."
2006-05-22 20:18:40 +00:00
mfranz
f5955a9cab Vivian MEAZZA:
"Add Air to Air TACAN and User-User refuelling over the Multiplayer Network.
With this change, your TACAN instrument can be tuned to the channel of a
Multiplayer ac. It also activates fuel flow between User and User aircraft
when they are less than 50 ft apart. To participate in multiplayer as a
tanker, all you require to do is to use the callsign MOBIL* (where * is some
number) on the net. Only MOBIL1, MOBIL2 and MOBIL3 have been assigned TACAN
channels, but any MOBIL callsign will be able to give fuel."
2006-05-18 16:59:04 +00:00
mfranz
d9ee19d6cc - remove trailing spaces
- fix ridiculous mixture of 2-space-, 3-space-, 4-space-, tab-indents,
  and ~K&R & (braindead) FSF coding style
2006-05-13 10:02:17 +00:00
mfranz
db22f457b5 Vivian MEAZZA:
"Preparations for an upgrade to Air-to-Air Refuelling to allow more than one
tanker in the environment at a time. This will only work with YASim models.
JSBSim models are unaffected by this change."
2006-05-13 09:06:57 +00:00
curt
f9edbf3620 Dave Culp:
I've got some updates for the soaring scenario that will make for a more
realistic (and fun) experience.  They are:

1)  A cap cloud, which will sit atop each thermal
2)  A thermal scenario with wide coverage around KSFO, and using cap clouds
3)  A one-line change to AIThermal.cxx to position cap cloud properly
4)  Schweizer 2-33 set file change to match cloud coverage with thermal
heights.

files:

1)  data/Models/Geometry/thermalcap.ac
2)  data/Models/Geometry/thermalcap.xml
3)  data/Models/Geometry/thermal_cap.rgb

4)  data/AI/thermal_demo.xml

5)  data/Aircraft/sgs233/sgs233-set.xml

6)  source/src/AIModel/AIThermal.cxx
*** or, if you prefer diffs ***
7)  aimodel.diff
2006-05-02 01:19:02 +00:00
mfranz
b6cf140f98 Vivian MEAZZA:
"Add Air to Air TACAN. With this facility TACAN equipped aircraft can
measure the range and bearing of TACAN equipped AI Aircraft. ATM there is
only one assigned - callsign ESSO1 on TACAN channel 039X, but this can be
easily expanded to include other c/s channel # pairs - just ask me if you
want more."
2006-04-19 17:36:41 +00:00
durk
6f7a9a5b1b Fix for an AIFlightPlan initialization problem in the traffic manager. 2006-03-29 18:36:21 +00:00
durk
ad7a6736d7 Just commenting out a few error print statements, which I had overlooked. 2006-03-26 21:42:47 +00:00
durk
3c738b5cee Bugfix in the ai initialization randomization procedure. Randomly
removing waypoints could cause the AIFlightPlan to run out of waypoints.
This patch prevents that by retaining at least two waypoints.
2006-03-26 21:40:35 +00:00
durk
101ca14a6d Bugfixes and feature improvements related to AI auto flightplan generation.
When AIFlightPlanCreateTaxi() function is called with the firstFlight
argument set to true, this is supposed to handle situations where the
the aircraft's timetable indicates it should have left between about 5 to
20 minutes earlier. In the previous version, all these aircraft started
taxiing from the first parking location available in the network, due
to the fact that the variable gateId was not assigned a value. In this
patch, route tracing starts from an assigned gate and the network node
following code is fast forwarded to a random location along the taxiways
to give a more realistic and natural distribution of taxiing aircraft
after startup.
    This patch further addresses some weird ballet-dancing behavior that
aircraft were showing just prior to/right after parking and which was
related to a number of more or less duplicate waypoints in the transition
from createTaxi() to createParking() to createPushBack() to createTaxi().
    Finally, a blatant typing error in the getParking() function was fixed.
2006-03-19 07:41:48 +00:00
mfranz
0c92519754 Vivian MEAZZA & Mathias FROEHLICH:
"Add new code for animating JBDs. Tidy up code for animating flightdeck
elevators."  (JBD ... Jet Blast Deflectors, but everyone knows that :-)
2006-03-18 16:31:09 +00:00
durk
f8eb3d4309 Bugfix: Non-existent AIModels could trigger a request to load scenery tiles
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.
2006-03-11 18:14:48 +00:00
mfranz
c386f00312 I take that back. This doesn't work yet. :-) 2006-03-09 11:23:15 +00:00
mfranz
5ebd1a18f3 add <load>/<unload> support to AI models, including aircraft models. For
aircraft models this is only called if they are loaded as AI, not if they
are the model flown by the human pilot. This has technical reasons (too
soon for Nasal/fg), but is useful to distinguish AI and non-AI use, for
example to set a different livery for AI models, or to set different
animation properties.
2006-03-09 11:14:16 +00:00
ehofman
479d4d7484 Mathias Fröhlich:
Fix the AI-Radar code.
2006-03-04 12:49:30 +00:00
durk
395ea07252 Bugfix: variable fp was deleted in both AIBase::~AIBase() and AIAircraft::AIAircraft(), resulting in a segmentation fault.
Here the delete fp; statement is removed from the AIAircraft() destructor.
2006-02-23 21:42:11 +00:00
mfranz
c9813d1b5d new FSF address 2006-02-21 01:16:04 +00:00