1
0
Fork 0
Commit graph

374 commits

Author SHA1 Message Date
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
fd99e9fdfb std namespace fixes in headers. 2012-09-24 08:39:30 +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
Stuart Buchanan
a3a40af860 Simplify code for taxiways. 2012-09-20 21:53:31 +01:00
Stuart Buchanan
ac1fc699b7 Expose surface types and taxiways via the airportinfo() Nasal call. 2012-09-19 22:33:43 +01:00
James Turner
9b900e9430 Implement a persistent cache for navigation data.
Cache the parsed navigation and airport data in a binary file to reduce
startup times and memory consumption (since only referenced FGPositioned
elements are held in memory).

Data will be reimported when the mod-time of any input file is changed.
If a global file is changed (nav.dat, awy.dat, apt.dat, etc), the cache
will be completely rebuilt, which takes approximately 30 seconds on
moderate hardware. (Future work may reduce this).
2012-09-19 11:38:19 +01:00
Stuart Buchanan
cce186a57c Add properties for raw axis and button values, for use
in joystick configuration function.  Also rationalize references to
/sim/fg-home into a global property.
2012-08-23 21:52:30 +01:00
James Turner
8a087582bc Whoops, case-sensitivity matters on Linux. 2012-08-22 00:53:48 +01: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
James Turner
ffac5ff889 Standard property to ignore unusably short runways in NavDB.
Default values should match existing behaviour. Set
/sim/navdb/min-runway-length-ft to skip short runways
in GPS / Map / ND / Nasal queries.
2012-05-16 16:51:39 +01:00
James Turner
b0384d035f Remove remaining includes of simgear/waypoint 2012-05-11 23:49:12 +01:00
James Turner
1b7b69b498 Create a real FlightPlan (and Leg) class
Convert the route-manager to use a flight-plan internally, and expose
flightplan, leg and procedure data to Nasal. Move the Level-D parser
into its own file.
2012-05-07 00:35:48 +01:00
ThorstenB
b9260f543b Ganael Laplanche: fix include dependencies for FreeBSD support 2012-05-05 01:08:20 +02:00
ThorstenB
10d2d94778 Avoid compiler warnings.
Unsigned values are always >= 0...
2012-04-30 14:33:38 +02:00
James Turner
2d267a5782 Remove PositionedBinding (which no one ever used), Nasal is better for this jobs. 2012-04-26 00:37:47 +01:00
James Turner
f1ad01478e Expose more things to Nasal for FMSs in particular - still work in progress. 2012-04-16 10:18:37 +01: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
Mathias Froehlich
8d3e1b06be Remove /sim/paths/use-custom-scenery-data.
Scenery people tell me that this is always set to true
today. Thus we can remove this property as this allows
me for some further osg loader cleanups.
2012-03-15 18:48:57 +01:00
Mathias Froehlich
c71c9aee0a Adapt to simgear SGMath change.
Simgears SGMath has lost its dependency on osg.
Update includes and code using these methods.
2012-03-03 13:37:43 +01:00
ThorstenB
277ba10b39 Potential fixes for #548, #572, groundnetwork related segfaults
Add some pointer checks - so we at least get some error message naming the
airport with the broken network.
2012-01-08 12:31:18 +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
Erik Hofman
1fb790eb60 comment out unused variables and function and properly initialize variables 2011-12-19 16:50:21 +01:00
adrian
9ab41ea158 Merge branch 'next' into comm-subsystem
Conflicts:
	src/Instrumentation/Makefile.am
2011-11-23 14:02:43 +02:00
Frederic Bouvier
f1d0ac52a6 Fix MSVC9 build 2011-11-14 08:38:58 +01:00
Mathias Froehlich
42fb9b8e9f Consolidate the different ReaderWriterOptions classes. 2011-11-13 18:34:53 +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
James Turner
70b4f38ebc Goodbye automake. 2011-11-01 11:15:53 +00:00
adrian
c6062ad93c Merge branch 'next' into comm-subsystem 2011-10-29 12:22:00 +03:00
Durk Talsma
7ae1aa4846 Improved AI taxi behavior:
* Use aircraft specific time-stamps for blocking taxiways
* Issue a stop instruction well-ahead of moving onto a blocked taxiway. This still needs some more braking power.
2011-10-27 23:24:56 +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
Durk Talsma
a6de24461e Potential fix for bug #471 (crash in checkspeedadjustment). 2011-10-22 17:57:37 +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
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
adrian
312447c565 Merge branch 'next' into comm-subsystem
Conflicts:
	src/ATC/trafficcontrol.cxx
	src/ATC/trafficcontrol.hxx
	src/Instrumentation/CMakeLists.txt
2011-10-06 15:18:44 +03: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
Christian Schmitt
ede92fce54 Fix a segfault that became apparent with a 850 apt.dat file 2011-09-28 10:18:12 +02:00
Durk Talsma
0fca002ab6 Bugfix: Retrieval of the next radio frequency was broken. Contributed by Adrian Musceac. 2011-09-22 21:38:37 +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
adrian
c69c91769e fix array index out of bounds in dynamics.cxx 2011-09-05 07:56:13 +03:00
adrian
6a4272be14 Merge branch 'next' into radio-att 2011-09-05 05:26:24 +03: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
adrian
4801b28c42 fix + define WITH_POINT_TO_POINT 2011-09-04 10:00:36 +03:00
Durk Talsma
e65f53b571 Read groundnet node information from the scenery, and (optionally) write it to a cache file. Note that this mechanism should be extended, so that the cache files will be updated whenever the terrain files are changing. The current patch also uncovers a bug, in the sense that the groundnetwork destructor is never called. Presumably this is due to the way airports are allocated in flightgear. Because the ground networks are never saved, I am periodically saving the cache files; but this behavior should probably be changed later on.
The current patch incorporates work contributed by Adrian Musceac.
2011-09-03 11:26:17 +02:00
ThorstenB
cf2236351c Avoid some useless file accesses
Empty "markers" in between scenery search paths shouldn't be
considered when building search paths.
2011-08-20 23:13:27 +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
8212c88969 Fix state changes related to hold position and resume taxi ATC instruction. 2011-08-08 21:50:44 +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
63151fd579 Reinstate the check for aircraft that are under tower control. 2011-08-07 09:24:15 +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
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
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
James Turner
029d2b00eb Tone down some log output for the release, especially related to airways/navaid loading. 2011-06-25 16:18:07 +01:00
Durk Talsma
2f3faf4b8a Compilation error fixes following merge with next. 2011-06-03 10:02:18 +02:00
Durk Talsma
348ff2ec23 Merge branch 'next' into durk-atc
Merge with next.
Conflicts:
	src/Airports/dynamics.cxx
	src/Airports/dynamics.hxx
2011-06-03 09:31:04 +02:00
James Turner
d5f81f0eac Push some of the ATIS logic into AirportDynamics, in preparation for ATIS being owned by the airport 2011-06-02 23:28:40 +01:00
Durk Talsma
f9a5f921a4 Merge branch 'next' into durk-atc
Resolving merge conflicts indicated below.
Conflicts:
	src/ATC/CMakeLists.txt
	src/ATC/Makefile.am
	src/Main/fg_init.cxx
2011-06-01 20:46:34 +02:00
James Turner
2b967608a0 Expose FGPositioned data via property tree, and make comm-stations a real FGPositioned subclass. 2011-06-01 17:45:22 +01:00
Durk Talsma
de1564d83e Merge branch 'next' into durk-atc 2011-05-31 20:38:42 +02:00
James Turner
4bfa9cac85 Used the simgear strutils helper, fixing a corner-case ThorstenB spotted. 2011-05-26 20:18:27 +01:00
James Turner
c09c0e6941 First attempt at support for loading airport XML files via a command 2011-05-25 00:03:51 +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
7e604f22a7 * Added a pure virtual render() function to FGATController that can be used to implement traffic visualization
* Allow position and intentions to be monitored and updated by the Startup controller
* Added a "parent" pointer to the startup controller to allow communication with the groundnetwork.
* Implemented a render() function for the Startup controller
* Renamed "FGGroundNetwork::getRenderNode() to FGGroundnetwork::render()
2011-04-26 19:18:28 +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
65e87bf2f8 Added some code to visualize the ground networks. 2011-04-17 10:19:58 +02:00
Durk Talsma
fa842a42b6 Added a small and simple dialogbox that allows the user to issue ATC commands. 2011-04-15 19:32:21 +02:00
Durk Talsma
e04d2f8ba9 Assigned an ATC controller to the user's Aircraft and change the comm1 radio frequency according to the frequency relevant to the current scenario. 2011-04-10 08:58:48 +02:00
Durk Talsma
52b0baace1 adding changed files for previous commit. 2011-04-03 17:58:16 +02:00
ThorstenB
118d8fbca5 #84: John Denker: Set correct file modes
Sources shouldn't be executable.
2011-02-19 11:55:43 +01:00
James Turner
7ab8c72cf1 Fix bug #236, tower elevation was wrong with custom-scenery-data. 2011-01-03 21:26:09 +00:00
Dave Luff
d6fceb3fbc Remove conditional compilation of ATCDCL
This patch removes the conditional compilation of ATCDCL, compiling both
the old and new ATC systems.  The old system only provides ATIS, AWOS and
some dialog lookups, and hence should not conflict with the new system.
2010-12-28 18:23:40 +00:00
James Turner
a91ec5f9f9 Initial work on CMake build files, with considerable help from Olaf Flebbe. 2010-12-19 15:06:04 +00:00
Frederic Bouvier
45b001a784 Fix a typo 2010-12-11 10:43:39 +01:00
Frederic Bouvier
58ca6c916f Fix for bug #177 - check for empty strings 2010-12-03 08:59:14 +01:00
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
James Turner
7ccba95b9c Remove direct uses of PLIB ulXXX functions 2010-10-24 07:10:51 +01:00
James Turner
f5c2c630eb Remove references to old (unused) airways code 2010-10-20 17:54:16 +01:00
James Turner
fe16732783 Fix Win32 compilation - avoid SID name clash with windows.h 2010-10-20 13:13:05 +01:00
James Turner
dd2eec7bd8 Airways/procedures code - add new data structures to store waypoints and
procedures, and routing algorithms, and modify the GPS, route manager and
WaypointList to use the new objects.
2010-10-20 09:02:02 +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
James Turner
57cb0a809b Fix bug 150 (airports not found in GPS search)
Overhaul and simplify the GPS search logic based
on experience and testing with the API. Also fix
search-by-name, which was broken.
2010-08-14 19:16:28 +01:00
James Turner
cc7a9d4727 Make even more implict includes explicit. 2010-08-07 13:00:33 +01:00
James Turner
d1852430bf Make various implicit includes (via PLIB) explicit. 2010-07-28 10:25:42 +01:00
Torsten Dreyer
c89b18ddbd Ignore generated files
add generated files to gitignore that has also been in cvsignore
remove generated config.h-msvc* from source control
2010-06-02 11:27:16 +02:00
James Turner
38687c9e06 Avoid a crash with out-of-sync airport runway usage and runway definitions. 2010-05-19 23:25:39 +01:00
Tim Moore
11a371b313 Merge branch 'mathias/math' into next 2010-05-05 17:02:37 +02:00
frohlich
1797f4cb3e Use methods from SGMath when possible.
Modified Files:
	src/Airports/apt_loader.cxx src/Navaids/positioned.cxx
	src/Navaids/positioned.hxx
2010-05-05 17:02:27 +02:00
Tim Moore
362eb3b670 Merge branch 'durk/ai-atc' into next 2010-05-05 11:59:47 +02:00
durk
e004e43553 Expanded ATC communication between AI aircraft and Airport ground control. 2010-05-05 11:59:37 +02:00
Tim Moore
fb361f7463 Merge branch 'jmt/runway-fix' into next 2010-04-12 09:28:32 +02:00
jmt
40b2c3b9f7 Candidate fix for bug #118, crash with custom (scenery) airport data. 2010-04-12 09:28:00 +02:00
Tim Moore
988a6771aa Merge branch 'durk/atcdcl-cond'
Conflicts:
	src/ATC/trafficcontrol.cxx
	src/Main/Makefile.am
2010-02-10 00:45:06 +01:00
durk
e54798a8e2 A couple of last-minute patched / bugfixes to mitigate the probability of collisions between user controlled aircraft and AI traffic.
* AI aircraft distance to user proximity detection works again (lat/lon were inverted).
  * The parking uses by the user aircraft is marked as such to prevent it being reused by an AI aicraft
  * AI aircraft won't receive permission for pushback until the user aircraft is at a fair distance.
2010-01-31 17:52:43 +01:00
torsten
33ee43dec0 eliminate gcc warning, unused member depth. 2010-01-17 00:12:23 +01:00
durk
d8ae90801a Some additional changes to ensure that FlightGear at least compiles after configuring with --disable-atcdcl. Some substitution code is added in ATC/atcutils.cxx and ATC/atcutils.hxx. Note that the new code doesn't run properly yet. Instead, it is just meant to identify which parts need replacement. Getting that to work will be the next step. 2010-01-05 22:21:49 +01:00
durk
8114d1d899 Conditional compilation of ATCDCL module. Use --disable-atcdcl to try building flightgear without ATCDCL code. 2009-12-30 17:44:06 +01:00