1
0
Fork 0
Commit graph

558 commits

Author SHA1 Message Date
legoboyvdlp R
3e1dc4683b Keep revising ATC 2020-04-30 16:22:59 +01:00
legoboyvdlp R
64aa3927a7 Rename departure cue to departure queue, formatting, document ActiveRunway class 2020-04-30 16:22:59 +01:00
legoboyvdlp R
8268cdc5e0 Optimize slot checking routines so unneeded code is not run, document function 2020-04-30 16:22:59 +01:00
legoboyvdlp R
0132ddf7a1 A missing call to initializeAirports() restored; this now works. Add documentation to atcdialog. 2020-04-30 16:22:59 +01:00
legoboyvdlp R
c789687da0 Formatting, change single-use pointers to std::unique_ptr 2020-04-30 16:22:59 +01:00
legoboyvdlp R
86dae35b37 Document atc_mgr, remove method from SchedFlight 2020-04-30 16:22:59 +01:00
legoboyvdlp R
84c075a20f Make it bulk again - I don't know how it reverts 2020-04-30 16:22:59 +01:00
legoboyvdlp R
6c3828bf84 ATC/AI: SG_LOG will now use BULK for render message 2020-04-30 16:22:59 +01:00
legoboyvdlp R
4af75c4666 ATC / AI subsystem: replace iostream with SG_LOG() and make new function in SchedFlight that will create a new scheduled flight instance 2020-04-30 16:22:59 +01:00
gallaert
fb65f64342 Replace BOOST_FOREACH by C++ 11 for range loop. 2020-04-12 14:40:36 +01:00
Slawek Mikula
517cf19ec6 - ATC radio list - adding selectors to radio R1/R2 for corresponding frequencies 2020-02-25 13:08:06 +00:00
Edward d'Auvergne
34a6cb3c74 SGSubsystem classes: Registration of all subsystems. 2019-07-01 14:51:32 +02:00
Edward d'Auvergne
d259c70560 SGSubsystem classes: Addition of staticSubsystemClassId() to all subsystems. 2019-07-01 14:51:32 +02:00
Edward d'Auvergne
7a6e63ddb9 SGSubsystem classes: Subsystem and subsystem group API declaration standardisation.
This is a cleanup commit.
2019-07-01 14:27:30 +02:00
Edward d'Auvergne
60a2444766 SGSubsystem classes: Whitespace standardisation of the declarations.
This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs.  It includes all SGSubsystem and SGSubsystemGroup derived classes.
2019-07-01 14:27:28 +02:00
Dan Wickstrom
1948304157 Fix problem where AI planes are placed on top of user aircraft when user either selects a specific spot or user selects parking to be an available spot. 2019-04-25 11:39:41 +01:00
James Turner
a9a49bc2e6 Unboosting files
Use simgear::strutils replacements in places, C++11 features in others
2019-02-04 15:20:22 +00:00
James Turner
2c48914630 One more ATC text formatting fix
As requested by Wkitty on the mailing list.
2018-04-09 09:33:28 +01:00
James Turner
227dda4df5 ATC spacing improvements by WKitty 2018-04-05 13:07:44 +01:00
James Turner
b4cdac238e remove_if clean-ups while auditing :) 2018-01-12 22:18:59 +00:00
James Turner
a8e1fd4fd0 Move the user aircraft proxy into the AIManger
This should ensure there is always a proxy for the user in the AI
world for parking and ATC purposes.
2017-09-26 16:52:48 +01:00
James Turner
66eb3d2690 Use a unique_ptr to manage FGAIFlightPlan 2017-09-21 18:37:14 +01:00
Richard Harrison
2c8aad12ba Model relative property tree root binding.
Change fgcommand to take an optional property tree root element.

This fixes the animation bindings to use the defined property tree root - to support multiplayer (or other) model that can bind to the correct part of the property tree.

Requires a corresponding fix in sg to allow the command methods to take an optional root parameter.

What this means is that when inside someone else's multiplayer model (e.g. backseat, or co-pilot), the multipalyer (AI) model will correctly modify properties inside the correct part of the property tree inside (/ai), rather than modifying the properties inside the same part of the tree as the non-ai model.

This means that a properly setup model will operate within it's own space in the property tree; and permit more generic multiplayer code to be written.

This is probably responsible for some of the pollution of the root property tree with MP aircraft properties.
2017-07-05 11:37:17 +02:00
Florent Rougon
9a64150d57 Fix crash in src/ATC/trafficcontrol.cxx (invalid iterator dereferenced)
When the test:

  if (i == activeTraffic.end() || (activeTraffic.empty()))

was true, the iterator named 'current' was uninitialized and later
dereferenced.

Fix:
  - when the previously-mentioned test is true, return;
  - initialize 'current' only when it is really needed (i.e., later and
    after the test), and since we don't need it for iterating, make it
    an FGTrafficRecord&.
2017-05-10 16:54:55 +02:00
James Turner
4f020602e6 Missing config.h includes
This is about to become much more important.
2017-03-25 15:34:10 +00:00
James Turner
39b239957e Startup-tip system.
Replace the license / website text with a startup tip. Tips are shown
based on the day of the year, can be changed easily.
2017-03-03 23:21:18 +02:00
Florent Rougon
8f24de831d Adapt includes according to relocation of SimGear's iostreams-related files
This change is the logical counterpart of SimGear's change from commit
79f869a7f32910197be72b21f6489fbbba02c836 that moved the following files
from simgear/misc to simgear/io/iostreams:

  gzcontainerfile.cxx
  gzcontainerfile.hxx
  gzfstream.cxx (formerly zfstream.cxx)
  gzfstream.hxx (formerly zfstream.hxx)
  sgstream.cxx
  sgstream.hxx
  sgstream_test.cxx
2017-02-12 21:30:51 +01:00
James Turner
1c4656512a Enforce separation of ground-net and dynamics.
This ensures ground-network is retrieved through the airport only, and
hence can be done safely early in init, when ATC/AI/dynamics don’t
exist yet.
2016-11-13 14:05:20 +00:00
James Turner
ac33092032 Fix crash disabling AI traffic at runtime.
https://sourceforge.net/p/flightgear/codetickets/1848/
2016-10-20 22:52:27 +01:00
James Turner
03ecac9dbc Work with new SGPath API. 2016-06-22 17:36:05 +01:00
Richard Senior
29fe6569c4 Fix incorrect QNH in spoken ATIS when using live weather fetch
When using live weather fetch, the QNH should be obtained from
environment/metar/pressure-inhg.

See: http://sourceforge.net/p/flightgear/mailman/message/35037125

Add new method getQnhInHg to ATISInformationProvider and its implementations
to avoid rounding errors converting from hPa back to inches in ATIS reports.

The CurrentWeatherATISInformationProvider (used when live weather fetch is
not in use) continues to use the property environment/pressure-sea-level-inhg.
This produces the incorrect QNH at airports significantly above sea level
but this needs fixing elsewhere to calculate the correct QNH.
2016-04-26 10:52:29 +01:00
Richard Senior
f825bb4f3c Eliminate use of non-standard round() function in ATISEncoder
Use of round() produces compilation errors with MSVC10 and the build server
2016-04-26 10:42:48 +01:00
Richard Senior
13f31782a1 Improvements to spoken ATIS
- Add section tag to support inclusion of ATIS fragments.

- Add visibility, QNH and cloud tokens to support new ATIS formats.

- Add support for starts-with, ends-with and contains comparisons in
  conditionals, including negated versions.

- Strip and convert case in comparisons.

- Speak VRB wind direction as "variable".

- Speak zeroes in fractional part of QNH inHg.

- Force US voice in US, Canada and Pacific; UK voice in UK.
2016-04-24 10:42:26 +02:00
James Turner
c15e4753ac Different fix for traffic shutdown crash.
Fix for: https://sourceforge.net/p/flightgear/codetickets/1864/
2016-04-15 16:26:54 +01:00
Richard Senior
78de2af130 Allow ATIS format specifications to compare tokens against text values
Prior to this change, it was only possible to compare the values of tokens
to each other for use in conditionals, e.g. landing and departing runway.
This change allows comparison of a token to a text value, e.g. to compare
wind speed to zero.
2016-04-07 00:58:34 +01:00
Durk Talsma
31c66226e1 AI traffic refused to take-off, because the TrafficRecord destructor would unassign an AIAircraft from it's ATC. This caused it to get stuck in front of the runway and block all other traffic.
This patch may introduce an occasional crash on exit again, because it effectively undoes commit [a972df]. I'll try to find a better fix for that later on.
2016-03-06 21:23:26 +01:00
James Turner
a972df05dc Fix a potential use-after-free in ATC code
- when dynamics shuts down the ATC controllers, they clear their
  traffic vectors (destroying the records), but we didn’t notify
  the AI aircraft of this. Ensure the controller is cleared so
  the AI aircraft shutdown doesn’t crash.
2016-01-12 12:22:23 -06:00
James Turner
540d4c2111 Use SGTime instead of time() in traffic/AI code
- avoids manual handling of /sim/time/warp in many places
2016-01-05 23:19:28 -06:00
James Turner
fadad5d70b Make TrafficRecord own its AIAircraft.
- use the ref-counting system, hopefully avoid a dangling pointer
  crash I encountered. (Of course it may turn into a leak)
2016-01-04 13:34:39 -06:00
James Turner
83ea6d32d0 Make PerformanceDB a real subsystem 2015-12-19 00:29:00 -08:00
James Turner
e80fc563e5 Fix off-by-one errors in GroundController
findSegment() and segments[] array use different indexing, account
for this in the conversion to always use findSegment
2015-12-19 00:08:07 -08:00
James Turner
865bb365ed Trying to bullet-proof the traffic code. 2015-12-18 21:42:22 -08:00
James Turner
c76d106e64 Runtime checks for GroundContoller crashes.
Trying to identify what’s actually going wrong here.
2015-12-17 20:23:45 -08:00
James Turner
c585f7f7d1 Asserts to pin down a reported crash. 2015-12-16 13:02:06 -08:00
James Turner
8877b442f8 ATC/Traffic doesn’t crash reset.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
2015-12-11 12:11:59 -06:00
James Turner
6446d67431 Split GroundNetwork class down the middle
- ATC functions move to GroundController, which layers above
  remaining GroundNetwork functionality
- dynamics owns both the groundNetwork and the ground controller.
2015-12-10 15:53:05 -06:00
James Turner
2af076e6cb Add airport dynamics manager
- decouple dynamic airport data from the static (nav-db) data.
2015-12-05 00:25:29 +00:00
James Turner
fc887b106b Checkpoint - ground-net skips the cache 2015-12-01 14:01:32 +00:00
Torsten Dreyer
cd0f0b9856 Fix some warnings 2015-06-12 11:51:11 +02:00
Torsten Dreyer
f780480088 Fix random crash on exit in atc_mgr
make the ParkingAssignment a local object instead of
creating it on the heap as a member of the ATCManager
2015-06-10 12:04:47 +02:00