1
0
Fork 0
Commit graph

532 commits

Author SHA1 Message Date
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
Torsten Dreyer
1ad81ee94e Silence some warnings
AIBallistic: wrong order of member initialization
Other: unused variables
2015-05-29 10:27:25 +02:00
Torsten Dreyer
9c63b77133 Remove debug console output in FGApproachController
Console was filled with
FGApproachController::render function not yet implemented
2015-05-27 10:19:18 +02:00
Durk Talsma
dbde1f2232 Some preparatory work for reinstating a missing piece of code in the routing algorithm for the AI system. 2015-05-14 18:22:42 +02:00
Durk Talsma
1dc7d4cf11 Reformatting. 2015-05-14 18:20:25 +02:00
Durk Talsma
98682c0c68 Fix bug when starting using the --parkpos option. Create a pointer to a ParkingAssignment object, so that the reference counter doesn't get reset to 0 when the local class is destroyed. 2015-05-14 18:15:30 +02:00
Torsten Dreyer
01dfd52d69 Fix wrong ATIS for negative temperatures 2015-01-12 16:46:24 +01:00
Stuart Buchanan
b654477794 New materials.xml format 2014-08-09 20:43:34 +01:00
Torsten Dreyer
19dd46c5b0 ATISEncoder: minor tweak
no trailing blank at runway designator
2014-04-23 17:07:00 +02:00
Thomas Geymayer
88b7d4f530 Update for SGPropertyNode changes. 2014-03-06 00:41:41 +01:00
Torsten Dreyer
c068049d84 NewAtis: handle varying winds 2014-03-05 13:52:43 +01:00
Torsten Dreyer
090207155e ATIS: say wind direction as three digits 2014-03-01 20:15:52 +01:00
Torsten Dreyer
0c7f21a259 New ATIS System: Fallback for no-realwx and some fixes
Added the fallback for realweather fetch disabled, creating
ATIS from present weather
Fixed some formatting errors, mainly missing spaces
Some code cleanup
2014-03-01 12:44:01 +01:00
Torsten Dreyer
dd6cccdda1 A new comm radio and atis implementation 2014-02-28 11:45:49 +01:00
Tom Paoletti
81cd33e2fa Performance optimization: empty() instead of size()>0
empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
2013-08-19 09:01:59 +01:00
James Turner
a7e4f2a971 std:: namespace fixes, AIBase cleanup.
Make data members in AIBase protected, and move FGAIModelData to be
a private helper in the .cxx file.
2013-03-28 16:49:52 +00:00
Thomas Geymayer
3047c316dc Clean up/simplify NasalPositioned_cppbind
Ensure all FGPositioned related functions return SGSharedPtr
instead of raw pointers to allow automatic conversion to
nasal ghosts without custom helper functions.
2013-03-06 23:21:49 +01:00
James Turner
fce2a53fc7 Fix crash starting at heliport.
Don't assume FGAirports have runways, they might only have helipads.
2013-03-05 13:19:10 +00:00
Thomas Geymayer
45e3b7e2d1 Clean up/prepare for porting NasalPositioned to cppbind 2013-03-04 16:31:37 +01:00
James Turner
1eb8ae1fbf Give the FGAirport class a sane filename.
simple.[cxx|hxx] -> airport.[cxx|hxx]
2013-02-21 11:32:02 +00:00
Christian Schmitt
2013f7149d Some headers missing... ;) 2013-02-07 19:00:54 +01:00
ThorstenB
1c6643d7ac traffic: more pass by reference + member init 2012-11-25 16:41:10 +01:00
ThorstenB
1827825fcb Clean up namespace issues
avoiding "uses..." in header files.
2012-11-23 21:16:08 +01:00
ThorstenB
58380b286e Fixed some uninitialized member vars and a mem leak. 2012-11-18 16:39:22 +01:00
ThorstenB
a784443a24 Remove static property dependencies
preventing us from wiping properties on reset/reinit/subsystem recreate.
(more work required for "native_gui" and "ATC-Outputs" protocols)
2012-11-18 16:35:54 +01:00
James Turner
afcdbd3158 Overhaul the ground-net / parking code.
Use the nav-data-cache to cache groundnet information, including
parking positions and the taxi-node graph.
2012-11-08 09:07:05 +00:00
James Turner
7d547d1287 Make traffic take-off roll look a little better.
Expand the performance DB logic to support aliases, and select based on aircraft type as well as class. This allows to introduce some variation into AI traffic performance. Change the initial climb-out waypoints to use pitch-hold until passing 3000', which looks much more convincing
2012-10-05 18:12:46 +01:00