1
0
Fork 0
Commit graph

532 commits

Author SHA1 Message Date
Thomas Geymayer
5ac3de21e3 Fix some CommStation bugs
- kHz/mHz conversion needs factor 1000 not 100
 - Correctly read name for CommStations from NavCache
 - Fix parsing CommStation names from apt.dat (Name
   can contain spaces)
2012-09-27 12:21:22 +02:00
James Turner
ebf3a0793d Tolerate the lack of a GUI in some places. 2012-09-26 13:39:38 +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
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
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
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
James Turner
7fabeed85d Fix some places relying on public 'using std::string' in SimGear
(Otherwise my next SimGear commit will break them)
2012-08-21 17:07:47 +01:00
ThorstenB
d6ef7bb091 Drop obsolete ATCDCL dialog. 2012-05-12 23:53:29 +02:00
Frederic Bouvier
75fc136931 Remove redundant inclusion of math/SGMath.hxx 2012-05-05 11:20:04 +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
ThorstenB
7dc8db8ef5 Fix some compiler warnings.
Also removes "itm.cpp" from CMake to avoid code duplication/warnings, since
this the file is already included by radio.cxx.
2012-04-05 21:02:09 +02: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
a8d5ac90c6 #656: COM1 frequency set to 0 at startup
Also, don't flood the screen with AI ATC messages when COM1/2 is set to 0
(ignore aircraft "transmissions" on frequency "0 MHz").
2012-02-10 23:43:03 +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
Durk Talsma
e0b6ee9d5d --debugMsg; 2012-01-01 15:30:51 +01:00
Durk Talsma
cf279e320b Bugfix: Shutdown the ATC manager when it runs out of waypoints. 2012-01-01 13:12:13 +01:00
Durk Talsma
53445c80d4 Some commented out debugging code that may help us trace down bug 532. 2011-12-31 18:16:38 +01:00
Durk Talsma
b648b71671 Fix for issue: 520: Error in FGTrafficRecord::setPositionAndIntentions. 2011-12-30 15:27:21 +01:00
James Turner
c831d9c857 Get the ATC frequency dialogs working again for the 2.6 release. 2011-12-27 22:55:52 +00:00
Durk Talsma
762d8a90dd Remove a stray debug message.Z 2011-12-24 16:34:33 +01:00
Erik Hofman
1fb790eb60 comment out unused variables and function and properly initialize variables 2011-12-19 16:50:21 +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
Durk Talsma
32eb0fd00c Merge branch 'merge-requests/1555' into next 2011-12-04 17:33:04 +01:00
Durk Talsma
fcfb905ef1 Make sure not to disable the entire ATC system when handling special cases. 2011-12-04 17:31:02 +01:00
adrian
a6b9beca9d rename FGRadio to FGRadioTransmission, add RX and TX antenna heights 2011-11-28 10:38:58 +02:00
adrian
2c6946c3e8 refactor receiveATC(), implement simple LOS routine, set comm1-signal property 2011-11-24 17:25:49 +02:00
adrian
0025dfb9bc Merge branch 'next' into comm-subsystem 2011-11-24 10:20:34 +02:00
adrian
e17852f679 prepare for festival volume 2011-11-24 10:00:28 +02:00
adrian
9bcc3a87b6 cleanup 2011-11-24 06:39:54 +02:00
adrian
98a94d83ef call from FGATCController::transmit() 2011-11-24 06:20:59 +02:00
adrian
9ab41ea158 Merge branch 'next' into comm-subsystem
Conflicts:
	src/Instrumentation/Makefile.am
2011-11-23 14:02:43 +02:00
James Turner
a05ea36acb Restructure GUI code, isolate PLIB in source files, to ease future refactoring and alternative GUI layers. 2011-11-19 20:25:51 +00:00
Frederic Bouvier
f1d0ac52a6 Fix MSVC9 build 2011-11-14 08:38:58 +01:00
James Turner
c92a3313bc Fix a secondary issue in bug 484 - avoid a crash when --lat, --long *and* --airport were specified. ATCmgr assumes /sim/atc/runway is set in this case, but it is not, leading the a runway-not-found assert. 2011-11-12 18:00:12 +00: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
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
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
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
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
a6a6910653 ATCMGR: fix minor output formatting issue 2011-10-02 13:22:09 +02:00
James Turner
dbda2fb95d Switch ATCmgr comm station search to filter by range in cartesian, not geodetic, space, to avoid numerical instability with extremely distant stations. 2011-09-28 09:06:31 +01: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
db816deb90 Added a new startup option. By giving the command line option --parkpos=AVAILABLE you can -in principle- let FlightGear decide what the most optimal parking location is. This option does require a few properties to be set that are also needed for future ATC use. Hence, they are listed under /sim/ATC, but could move to a different location if desired.
/sim/ATC/radius should be a nummeric estimate of the size of your aircraft. A small aircraft fits into a large parking, but a large aircraft does not fit into a small parking space. Because the AI part of radius is also used for slightly different purposes (prioritizing gate assignmments, the given valuem may deviate slightly from the real aircraft size. See http:/wiki.flightgear.org/Aircraft.radii for an overview of currently used values for the redius property.
/sim/ATC/flight-type can be any one of "ga", "cargo", "gate", "mil-fighter", "mil-cargo", or "vtol". See http://wiki.flightgear.org/Interactive_traffic#A_technical_perspective for more information.
optionally, the property /sim/ATC/airline can be set set to a three letter icao airline code. By way of illustration, I will commit a number of startup preset files setting these properties shortly.

Also did some more finetuning to the traffic mananger routing algorithm can be any one of "ga", "cargo", "gate", "mil-fighter", "mil-cargo", or "vtol". See http://wiki.flightgear.org/Interactive_traffic#A_technical_perspective for more information.
optionally, the property /sim/ATC/airline can be set set to a three letter icao airline code. By way of illustration, I will commit a number of startup preset files setting these properties shortly.

Also did some more finetuning to the traffic mananger routing algorithm.
2011-09-17 16:51:00 +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
adrian
f96123de1c begin work on radio subsystem 2011-09-06 10:29:54 +03:00
adrian
80e5585cc3 comm radio subsystem 2011-09-05 11:51:19 +03:00
adrian
2c91f179d1 reduce distance to 300 km 2011-09-05 09:46:19 +03:00
adrian
9afa0e90ed print some relevant data on screen to verify accuracy 2011-09-05 07:35:44 +03:00
adrian
038251e8af fix trx and rx heights and improve calculations 2011-09-05 07:23:48 +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
135c544f6e bugfix 2011-09-04 16:13:47 +03:00
adrian
9df5e8ee33 check for allowTransmission 2011-09-04 14:20:41 +03:00
adrian
3a82ce7696 functional radio signal attenuation 2011-09-04 13:56:03 +03:00
adrian
4801b28c42 fix + define WITH_POINT_TO_POINT 2011-09-04 10:00:36 +03:00
adrian
c9ef773d98 compute radio transmission attenuation according to
the Longley-Rice Irregular Terrain Model propagation mode.
2011-09-04 09:18:13 +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
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
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
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
0215d66957 Bugfix: fix the on-runway crash, as reported by several people on the forum and mailing list. 2011-07-27 11:01:37 +02:00
Durk Talsma
dbceffeae8 Fix flightplan initialization issue. 2011-07-25 21:36:09 +02:00
Durk Talsma
acb2bc9286 Bugfixes:
- Allow the ATC/AI code to start from a non-airport location
	- Windows compilation fixes.
2011-07-25 12:53:10 +02:00
Mathias Froehlich
971e98cd14 Fix cmake build. 2011-07-24 14:38:53 +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
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
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
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
dee72d3434 * First test scenario to get user ATC interaction working. 2011-04-14 17:51:46 +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
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
3455079060 Added a simple dialog, just as proof-of-principle. 2011-04-06 19:48:54 +02:00
Durk Talsma
ff4004b261 Some further testing of the ATC Dialog infrastructure. 2011-04-05 18:13:11 +02:00
Durk Talsma
52b0baace1 adding changed files for previous commit. 2011-04-03 17:58:16 +02:00
Durk Talsma
48bb176e87 Start of adding interaction between the user controlled aircraft and AI traffic, by means of ATC.
* Started transfering the ATC infrastructure to be driven by it's own subsystem
* Changed the bahavior of the "'" key so that it is no longer driven by ATCDCL, but it now triggered by the new subsystem based ATC module.
2011-04-03 17:39:35 +02:00
Dave Luff
07d430c129 More fixes to the ATCDCL & ATC compilation
Rename ATC/atis.[ch]xx to ATC/atis_mgr.[ch]xx, to avoid confusingly
having 2 atis.cxx and 2 atis.hxx in the source tree.  Also fix a copy
and paste error in src/ATCDCL/CMakeLists.txt.
2010-12-29 18:52:39 +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
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
James Turner
f5c2c630eb Remove references to old (unused) airways code 2010-10-20 17:54:16 +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
f467ba3609 One more std::string fixup. 2010-08-09 09:16:28 +01:00
Frederic Bouvier
b60cf04c1e Fix MSVC compilation 2010-08-01 18:43:28 +02:00