1
0
Fork 0
Commit graph

619 commits

Author SHA1 Message Date
Florent Rougon
eefa9a75f9 Fix crash in AI code when buggy groundnet declares pushback hold point on runway
Some buggy *.groundnet.xml files (as KSEA currently on TS) define the
pushback hold point for some parking positions as a node on a runway.
In this case, this the pushback hold point for parking
'North_Cargo_Ramp', defined as node 5344 in
Airports/K/S/E/KSEA.groundnet.xml, which is defined twice (second error),
first as:

<node index="5344" lat="N47 27.774559" lon="W122 18.465257" isOnRunway="1" holdPointType="PushBack"  />

and then as:

<node index="5344" lat="N47 27.725747" lon="W122 18.159649" isOnRunway="1" holdPointType="PushBack"  />

(due to code in flightgear/src/Airports/dynamicloader.cxx, it should be
the second one that wins, which is not on a runway but on apron in the
north cargo area)

As a consequence, when this gate is selected for an AI aircraft, the
pushback route has only one node (since the pushback hold point is then
the closest point to itself supposedly on runway!), and the
corresponding FGTaxiRoute instance has an empty 'routes' member
variable, which FGTaxiRoute::next() doesn't handle gracefully
(segfault).

It may be that an additional check/change could be desirable in
FGTaxiRoute::next() in such a case (one node and obviously no route in
the FGTaxiRoute instance), however I'm not sure how Durk wants this case
to be handled, since FGTaxiRoute::next() seems to iterate on nodes.

This fixes the bug reported at:

  https://forum.flightgear.org/viewtopic.php?p=308397#p308397 and
  https://sourceforge.net/p/flightgear/mailman/message/35776552/

Thanks to yanfiz and wkitty42 for the report, and to gooneybird for
inspecting the groundnet file.
2017-04-14 12:25:00 +02:00
James Turner
3653508412 Build- and run-time concept of developer mode.
Make a single Cmake value to expose the build type to code, and use
this to default a run-time ‘developer-mode’ property, which can be
over-ridden from the command line.

Use this to drive the different warning levels. Policies subject to
review, especially whether nightly builds should default to 
developer mode or not.
2017-02-27 23:37:59 +00:00
Peter Sadrozinski
ec4b9f8542 Alternative terrain engine based on pagedLOD
- remove TileMgr from sub systems - add to btg terrain engine
2017-02-26 10:17:15 -05:00
Richard Harrison
2226428b85 AI Multiplayer interpolation.
Whilst debugging I had a cannot increment nextIt - because it was at end(). No idea if this could ever happen in flight but it still seems sensible to protect against it.
2017-02-16 20:53:44 +01:00
Erik Hofman
05b2b6536b Make use of the Vector new interpolation function 2017-02-02 11:35:55 +01:00
Richard Harrison
0bf80f9b2a Add protection to the multiplayer (AI) interpolation to protect against segfaults when the previous and next packets contain different properties. 2017-01-30 23:25:00 +01:00
Erik Hofman
cf935b5882 Try to prevent a possible device-by-zero 2017-01-05 14:35:50 +01:00
Torsten Dreyer
994ea1674b replace many auto_ptr by unique_ptr 2016-11-14 22:20:46 +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
6d0c2070fd Use future-proof SGPath APIs.
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
2016-06-28 10:08:38 +01:00
James Turner
03ecac9dbc Work with new SGPath API. 2016-06-22 17:36:05 +01:00
James Turner
de959a14f3 Rename Viewer/viewer.cxx to view
- keep class and file names in sync.
2016-02-17 21:25:39 +00:00
James Turner
eb0f724c13 Fix a typo breaking some takeoff-state logic. 2016-01-12 17:26:06 -06:00
James Turner
704aba9041 Fix a dumb AI traffic bug I introduced. 2016-01-06 22:27:33 -06:00
James Turner
b2bec04733 Fix acceleration path of default takeoff taxi. 2016-01-06 17:58:24 -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
ac146f5658 Remove dt member of AIAircraft 2016-01-05 23:19:28 -06:00
James Turner
7644c74df9 Better Traffic performance data warnings. 2015-12-22 15:15:27 -06:00
James Turner
83ea6d32d0 Make PerformanceDB a real subsystem 2015-12-19 00:29:00 -08:00
James Turner
0e71a9593b Quiet down Traffic error logging. 2015-12-18 21:59:28 -08:00
James Turner
a55c939c5e Fix a JSBSim crash on OSG-quit
(i.e Cmd-Q / window closing, not the normal FlightGear quit sequence)
2015-12-11 12:49:32 -06: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
fc887b106b Checkpoint - ground-net skips the cache 2015-12-01 14:01:32 +00:00
James Turner
2314ccfe13 Developer-warnings
- make some existing warnings developer-mode only
- add a warning about legacy aircraft path usage
2015-11-13 22:13:44 +00:00
janodesbois
0d9091bab6 stop sending velocity and acceleration in the motion information when crashed
and using speed up time to allow a fine displayed predicted position
 when time accelerated (no more jumping planes accelerated using the mp patch)
tell me if it's not the good pace to do such things ;)
2015-06-13 11:02:30 +02:00
Torsten Dreyer
4b564b2555 Fix MSVC compile error 2015-06-08 13:19:51 +02:00
janodesbois
759aa51213 Basic MP patch, to allow lag compensation and get rid of rubber band effect.
the fgdata part is needed to make it working. configuration for each plane
beeing done with nasal
2015-06-06 06:41:03 +02:00
Torsten Dreyer
99ea9c9583 AIBallistic.cxx: warning fix (initialization order) 2015-06-01 20:53:19 +02:00
onox
7aaa0772df submodel: Fix -Wreorder warnings
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-29 14:28:04 +02:00
onox
56a014cdc7 submodel: Only warn if an <*-offset> is actually present
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-29 14:28:04 +02:00
onox
8024a0a4ca submodel: Rename yaw and pitch to heading-deg and pitch-deg
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-29 14:28:04 +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
onox
69b055db0a Revert to old behavior of life randomness
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
46f60b73b3 submodel: Move <yaw-offset> and <pitch-offset> to <offsets>
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
79ea238e1d submodel: Support <offsets> with <x-m>, <y-m>, and <z-m>
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
d4b4e07c4d submodel: Use quaternions instead of trigonometry
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
68a53a7546 submodel: Fix incorrect yaw and pitch offsets
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
0ece93074f submodel: Add random error for azimuth and elevation
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
1b6326e057 submodel: Fix randomness of Cd and life
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
e049a9ab03 submodel: Remove FGSubmodelMgr::setSubData()
Signed-off-by: onox <denkpadje@gmail.com>
2015-05-28 10:43:06 +02:00
onox
9f452408c7 Small refactoring of Torsten's refactoring
Signed-off-by: onox <denkpadje@gmail.com>
Signed-off-by: Erik Hofman <erik@ehofman.com>
2015-05-18 12:35:00 +02:00
Torsten Dreyer
90622b6873 Small refactoring of the submodel patch from onox
Signed-off-by: onox <denkpadje@gmail.com>
Signed-off-by: Erik Hofman <erik@ehofman.com>
2015-05-18 12:34:56 +02:00
onox
0e28621051 Use InputValue for yaw-offset and pitch-offset
Signed-off-by: onox <denkpadje@gmail.com>
Signed-off-by: Erik Hofman <erik@ehofman.com>
2015-05-18 12:34:52 +02:00
Durk Talsma
8e2d0d2a76 Reinstate the backbone of the "I" part of the Interactive traffic system. 2015-05-15 13:30:16 +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
Torsten Dreyer
92e6e25d33 Fix "Error in ground network. Failed to find first waypoint"
Fix provided by Jens Thoms Toerring, OK'ed from Durk
http://thread.gmane.org/gmane.games.flightgear.devel/77674
2015-04-21 13:05:41 +02:00
Torsten Dreyer
0758cfbd65 Conditionally enable hot for multiplayer models
originally from denk padje alias onox
2015-04-16 20:58:56 +02:00
James Turner
f2d6b76b13 Portability: Fix compile errors on MSVC (cmath)
From Scott (xDraconian)
2015-03-24 11:11:42 -05:00