1
0
Fork 0
Commit graph

16021 commits

Author SHA1 Message Date
James Turner
3535c6da7d Revert "YASim gear: Clamping of _frac replaced"
This is causing simulator hangs at BIKF, likely due to previously
tolerated scenery data now triggering very large gear forces.

This reverts commit 6df2904f75.
2023-07-21 10:15:13 +01:00
Florent Rougon
351ca111ad NavData: don't load XML extension files from unsuitable scenery paths
Add a 'scenery_path' field to the 'airport' table of the SQLite
NavDataCache database. For each airport, this field indicates the
scenery realpath() that contributed the apt.dat file for the airport (as
an exception, for airports whose apt.dat file is
$FG_ROOT/Airports/apt.dat.gz, the path thus stored is for now $FG_ROOT,
which is technically not a scenery path). This path is then made
available via FGAirport::sceneryPath(), which allows us to implement the
following change (in this commit):

A) The lookup of *.procedures.xml is unchanged.

B) For other XML extension files (groundnet, ils, runway_rename,
   threshold, twr):

 - The search performed by XMLLoader::findAirportData() through
   globals->get_fg_scenery() stops immediately after the scenery path p
   that contributed the apt.dat file for the airport.

 - Paths that come earlier than p in globals->get_fg_scenery() order may
   contain XML extension files that will *override* sibling files that
   might exist in p (as was already the case before this commit).

The rationale behind this change is that we don't want a custom scenery
with good data in its NavData folder regarding airport FOO to get
"ruined" by files such as FOO.threshold.xml present in the TerraSync
directory---which is assumed to come later in globals->get_fg_scenery()
order.

*.procedures.xml files are excluded from the change because there is a
widespread use of a huge set of procedure files for the whole world; if
airport FOO in a custom scenery has no procedure files, we do want to
let FlightGear find FOO.procedures.xml inside the scenery path
containing the huge dataset (which should come *after* custom sceneries
in globals->get_fg_scenery() order so as to give these custom sceneries
the option to provide better *.procedures.xml files and have them take
precedence over less specialized sources such as the huge dataset).

Reference discussion: https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/CAKor_THrQCiS1ES_ENSrmn1j3s39dX0qQXSbYBUz6yuokse_pQ%40mail.gmail.com/#msg37860751
2023-07-20 22:07:43 +02:00
Julian Smith
a207cdd207 src/Main/fg_props.cxx: fix segv with --enable-freeze.
The problem was that FGProperties::bind()'s call of
tiedProperties.Tie("/sim/freeze/master", ..., &FGProperties::setFreeze)
was calling FGProperties::setFreeze(true) before it returned, but we
were only setting _simFreezeNode *after* tiedProperties.Tie() had
returned.

tiedProperties.Tie() simply returns the node that it was given as its
first arg, so we simply sets _simFreezeNode to the value it would have
taken later, before calling tiedProperties.Tie().
2023-07-18 10:53:54 +01:00
James Turner
5cf6e4c263 (legacy) NavRadio: set default power path to nav[0]
Ensure the default power path for all nav-radios is the power
output for nav[0], to avoid nav[1] being unpowered in some
cases.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2811/
2023-06-15 13:02:45 +01:00
Simon
01fb8faf3e Launcher: center selection highlight in aircraft selection 2023-06-15 10:27:58 +01:00
Jakub Kákona
6df2904f75 YASim gear: Clamping of _frac replaced
Instead use a a steep force increase

Implement Ticket https://sourceforge.net/p/flightgear/codetickets/1509/
2023-06-13 12:09:09 +01:00
James Turner
d3d4a8615a Build with revised SGPropertyNode alias() API 2023-06-13 11:37:45 +01:00
James Turner
760fe3eee7 Improve handling of malformed threshold.xml files
Needs a corresponding Simgear update

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2810/
2023-06-12 14:24:23 +01:00
James Turner
2580ab9996 Make /sim/time/gmt and freeze listener-safe
- record time values to only change time propertes when
actually modified
- fire listeners manually on the tied properties (gmt and gmt-string)
- make /sim/freeze/master listenable
2023-06-12 14:24:22 +01:00
scttgs0
a9968f86af Maintenance: TrafficMgr
header guard.
explicit ctor.
virtual dtor.
remove dead code.
reduce variable scope.
++prefix for complex types.
eliminate variable shadowing of outer scope.
spelling.
2023-05-26 21:24:32 -05:00
scttgs0
98295c2728 Maintenance: Schedule
header guard.
replace macros with constexpr.
compareSchedules moved to a static member.
ctor initialization moved to intializer-list.
string prefix via substr() changed to resize().
++prefix for complex types.
spelling.
2023-05-26 20:32:26 -05:00
scttgs0
b6b398b4c6 Maintenance: SchedFlight
header guard.
compareScheduledFlights() moved to a static member with const parameters.
ctor initialization moved to intializer-list.
replace NULL with nullptr.
spelling.
2023-05-26 19:48:12 -05:00
scttgs0
e25f1c5ff1 Maintenance: atc_mgr
remove obsolete code.
spelling.
2023-05-26 09:36:45 -05:00
scttgs0
fb3c12cbb0 Maintenance: TowerController
++prefix for complex types.
eliminate variable shadowing of the outer scope.
spelling.
2023-05-26 09:32:38 -05:00
scttgs0
2c986a8048 Maintenance: StartupController
eliminate unused variable.
++prefix for complex types.
spelling.
2023-05-26 09:23:34 -05:00
scttgs0
3b5e7ad935 Maintenance: GroundController
reduce variable scope.
++prefix for complex types.
eliminate variable shadowing of outer scope.
2023-05-26 09:19:00 -05:00
scttgs0
48c6afea53 Maintenance: trafficcontrol
setCallsign parameter changed to const&.
member variable initialization.
reduce variable scope.
++prefix for complex types.
spelling.
2023-05-25 01:05:34 -05:00
scttgs0
3ddfff59da Maintenance: ATIS Encoder and Information Providers
add const override to virtual functions.
explicit ctor.
2023-05-25 00:18:04 -05:00
scttgs0
2d3dfc2c0b Maintenance: ApproachController
++prefix for complex types.
2023-05-24 23:31:46 -05:00
scttgs0
f15e1346be Maintenance: ATISEncoder
member variable initialization.
spelling.
2023-05-24 23:31:12 -05:00
scttgs0
708eb252da Maintenance: ATCController
Fix REPORT_RUNWAY_HOLD_SHORT
2023-05-24 23:18:16 -05:00
scttgs0
7eaca793a6 Maintenance: sidstar
SPDX tags.
header guard.
activeRunway parameter changed to const&.
getId() made const.
2023-05-23 21:58:09 -05:00
scttgs0
f9509bf334 Maintenance: dynamicloader
explicit ctor.
2023-05-23 21:48:42 -05:00
scttgs0
673cfae1e8 Maintenance: airport
explicit ctor.
2023-05-23 21:48:12 -05:00
scttgs0
b0d332a771 Maintenance: runwayprefs
eliminate dead code.
SPDX tags.
++prefix for complex types.
move initialization to initializer-list.
add 'active' to assignment operator.
reduce variable scope visibility.
spelling.
2023-05-23 21:13:24 -05:00
scttgs0
1a7e456e54 Maintenance: runwayprefloader
explicit ctor.
SPDX tags.
spelling.
2023-05-23 19:51:54 -05:00
scttgs0
1dbe8c60f7 Maintenance: gnnode
SPDX tags.
header guard.
reduce variable scope visibility.
2023-05-23 19:40:20 -05:00
scttgs0
f69d069175 Maintenance: groundnetwork
parameter 'seg' changed to const*.
++prefix for complex types.
SPDX tags.
2023-05-23 19:39:50 -05:00
scttgs0
6b40b1474e Maintenance: dynamics
initialize member variables.
explicit ctor.
move lastUpdate to initializer-list.
reduce scope visibility of variables.
++prefix for complex types.
2023-05-23 16:14:10 -05:00
scttgs0
571018265f Maintenance: groundnetwork
blocktime moved to the initializer-list.
touch moved to the initializer-list.
explicit ctor.
virtual dtor.
remove unnecessary semicolons (i.e. empty statements).
SPDX tags.
header guard.
spelling.
2023-05-23 15:52:06 -05:00
scttgs0
cda2337041 Maintenance: apt_loader
SPDX tags.
parameter to loadAirportFormFile() changed to const&.
parameter to Line() ctor changed to const&.
parameter to loadAirport() changed to const&.
member variable initialization.
++prefix for complex types.
virtual dtor.
2023-05-23 00:56:19 -05:00
scttgs0
2c40595d3c Maintenance: runwayprefs
SPDX tags.
header guard.
member variable initialization.
explicit ctor.
2023-05-23 00:22:35 -05:00
scttgs0
7bf15e3f01 Maintenance: dynamics
SPDX tags.
header guard.
explicit ctor.
spelling.
2023-05-22 23:47:15 -05:00
scttgs0
ed4c4c1751 Maintenance: AirportBuilder
SPDX tags.
remove obsolete code.
2023-05-22 23:36:02 -05:00
scttgs0
9f444afa39 Maintenance: pavement
SPDX tags.
header guard.
move initialization of mControl to the initializer-list.
2023-05-22 23:29:09 -05:00
scttgs0
f107b459ec Maintenance: airport
SPDX tags.
header guard.
missing override.
spelling.
2023-05-22 23:24:18 -05:00
scttgs0
418be6b6f7 Maintenance: replay-internal
SPDX tags.
initialize member variables.
parameters to replayNormal2() changed to const*.
eliminate variable shadowing with outer scope.
remove always-true expression.
spelling.
2023-05-22 20:36:10 -05:00
scttgs0
b6ed14b0d9 Maintenance: initialstate
SPDX tags.
header guard.
explicit ctor.
2023-05-22 20:16:18 -05:00
scttgs0
57a818ee10 Maintenance: flightrecorder
SPDX tags.
header guard.
explicit ctor.
parameter to haveProperty() changed to const*.
avoid undefined behavior by explicitly converting int to string.
spelling.
2023-05-22 20:10:58 -05:00
scttgs0
dd0d8448b5 Maintenance: continuous
explicit ctor.
2023-05-22 19:42:10 -05:00
scttgs0
10baacb543 Maintenance: FlightHistory
SPDX tags.
header guard.
initialize member variables.
spelling.
2023-05-22 19:17:44 -05:00
scttgs0
85a3ac5761 Maintenance: submodel
initialize member variables.
remove obsolete code.
skip unnecessary conversion chain... std::string->c-string->std::string.
eliminate variable shadowing with outer scope.
spelling.
2023-05-22 15:47:20 -05:00
scttgs0
540cd7b56e Maintenance: AIManager
SPDX tags.
eliminate variable shadowing with outer scope.
spelling.
2023-05-22 15:47:20 -05:00
scttgs0
16f7291110 Maintenance: AIFlightPlanCreate
SPDX tags.
resolve variable scoping contention.
remove obsolete code.
spelling.
2023-05-22 15:47:20 -05:00
Julian Smith
b459348a60 src/FDM/YASim/Gear.hpp: avoid NaN errors by initialising all members of class Gear. 2023-05-22 14:49:33 +01:00
Mariusz Matuszek
801f98b939 Make header declarations agree with implementation. 2023-05-22 14:48:20 +01:00
scttgs0
bb917594d8 Maintenance: AIThermal
initialize class members.
SPDX tags.
const variables were appropriate.
eliminate variable shadowing.
spelling.
2023-05-21 21:58:50 -05:00
scttgs0
c9d08571c3 Maintenance: AIShip
rename variable 'init' to 'doInit' within function initFlightPlan() to avoid a naming conflict with the outer scope.
2023-05-21 21:26:03 -05:00
scttgs0
354e441788 Maintenance: performancedata
header guard.
virtual dtor.
parameters changed to const*.
default values for class members.
add missing members to copy-ctor.
2023-05-21 21:07:59 -05:00
scttgs0
5d260f2f30 Maintenance: AIMultiplayer
Remove always-true code.
SPDX tags.
spelling.
2023-05-21 20:52:02 -05:00