1
0
Fork 0
Commit graph

16046 commits

Author SHA1 Message Date
James Turner
395eb58d14 Adjust the ground-net test, for changed ground routing. 2022-01-15 22:23:38 +00:00
James Turner
ef3ba040ca Fix logic of duplicate-command-add test
parseAndReturn returns false, when runtime errors occur.
2022-01-15 22:23:38 +00:00
James Turner
3cd0a3d002 Apt.dat runyway loading: fix a typo
Jonathan R spotted this typo, which means the
distance_remaining field was always NULL.
2022-01-15 22:23:38 +00:00
James Turner
d59db8ea54 FlightPlan: distuinguish routes from flight-plans
Add a bool flag isRoute to flight-plan, and use it to model
routes (which contain VIAs) from plans/legs, which do not.

Default isRoute to false, so most users only see expanded
Vias, and hence something that can be flown directly.
2022-01-15 22:23:38 +00:00
James Turner
bc09d5e64d Airways: findEnroute by Positioned
Avoid any ambiguity with naming from the string version
2022-01-15 22:23:38 +00:00
James Turner
9a08d9fcd6 AP input: add property-path support to Inputs
Allow making the AP source indirect (via a string property),
so that the actual source property can be configured or
adjusted from a -set.xml, or at runtime.
2022-01-15 22:23:37 +00:00
Scott Giese
3f2c9ece5a AIThermal/AIStorm: Maintenance
virtaul dtor
ensure all members are initialized
config.h is unused
bool assignment via int type fixed
2022-01-15 15:51:49 -06:00
Scott Giese
75941319d2 AITanker: Maintenance
virtual dtor
ensure all members are initialized
config.h is unused
2022-01-15 15:20:21 -06:00
Scott Giese
6bd7415d94 AIAircraft: Maintenance
virtual dtor
initialize members before the ctor
config.h is not used
YawTo() is unused
assertSpeed() is unused
initializeFlightPlan() is unused
getTimeString() is unused
get/set is old school
2022-01-15 15:05:11 -06:00
Scott Giese
8ba35b2553 AIShip: Maintenance
default dtor
YawTo() seems to be unused
ensure all members are initialized
_path and _elevation_m were hiding parent members
config.h is not used

TODO: string compare not via strcmp()
TODO: remove magic number
2022-01-15 14:06:39 -06:00
Scott Giese
e1d35b26d5 AIGroundVehicle: Maintenance
ensure all members are initialized
config.h is never used
double initialized with int values
default dtor
2022-01-15 13:33:50 -06:00
Scott Giese
1e40006f06 'using' statement are for source files, not header files
using-declarations are okay in headers (i.e. aliasing)
2022-01-15 01:48:01 -06:00
James Hogan
595c8a2fcb
CMake: Fallback to built-in osgXR library
Fall back to using the new built-in osgXR library in 3rdparty/ if no
system library is provided and OpenXR is available.
2022-01-13 18:01:00 +00:00
James Hogan
0431e7cb3c
3rdparty: Import osgXR 0.3.7+
Import osgXR from https://github.com/amalon/osgXR master branch into
3rdparty, specifically commit b7e222775553b529018ac4b847353327c24ae5d4,
which is 0.3.7 with tweaks for building as a subproject in a
subdirectory.

This will allow VR support to be more conveniently built if not already
installed, without having to fetch yet another dependency.
2022-01-13 18:01:00 +00:00
James Hogan
31956f1f33
CMake: Handle osgXR includes implicitly
Recent CMake versions automatically add the include paths when
flightgear is linked against the osgXR::osgXR target, and code in
SetupFGFSLibraries.cmake handles older CMake versions. Therefore drop
the osgXR special handling in SetupFGFSIncludes.cmake and handle old
versions in SetupFGFSLibraries.cmake as done for the other libraries.
2022-01-13 18:00:44 +00:00
James Hogan
54699d46aa
CMakeLists.txt: Enable VR by default on WIN32
Now that osgXR has some semblance of windows support, enable VR by
default on Windows as well as Linux.

If osgXR isn't found it will be disabled.
2022-01-13 16:44:27 +00:00
James Hogan
f642c48da4
CMakeLists.txt: Improve finding of osgXR
Replace the ENABLE_OSGXR option with a slightly more user friendly
ENABLE_VR which is only enabled by default on Linux. If VR is enabled we
set ENABLE_OSGXR to enable the code, but only if a compatible osgXR
version is available. In any case a status message is output to specify
whether VR support is enabled or not.

This should allow VR support to be built even after osgXR couldn't be
found the first time cmake was run. The finding is now quiet so as not
to repeatedly spam the log.
2022-01-13 16:44:27 +00:00
PlayeRom
cef5dc6544 Add anti-aliasing 8x in Launcher 2022-01-12 11:15:24 +00:00
Lars Toenning
bda359558c Update osg AI model LOD structure 2022-01-11 18:51:48 +00:00
portree_kid
b5dd4a8b6b ATC : Split out ATC Controllers 2022-01-10 20:45:10 +01:00
James Hogan
89b7f8139f
VRManager: Handle removal of prop getValue<const char *>()
Handle removal of SGPropertyNode::getValue<const char *>() in
VRManager::Listener<const char *>::valueChanged() by switching the
string listeners and VRManager setter handlers to std::string.

This fixes the following link error when VR is enabled:
ld: VRManager.cxx.o: in function `flightgear::VRManager::Listener<char const*>::valueChanged(SGPropertyNode*)':
src/Viewer/VRManager.hxx:147: undefined reference to `char const* SGPropertyNode::getValue<char const*>(std::enable_if<simgear::props::PropertyTraits<char const*>::Internal, void>::type*) const'
2022-01-08 22:47:59 +00:00
Julian Smith
cfe5ed0ef4 test_suite/unit_tests/AI/test_traffic.cxx: minor improvements to sprintf code.
Use snprintf() instead of sprintf() to avoid potential memory corruption.

Fixed sprintf time_t call - cast to long long.
2022-01-08 16:11:53 +00:00
Julian Smith
76dcb745e1 src/Aircraft/: fixed bug in recovery recordings.
If continuous compression is enabled, we used to compress recovery recording's
data, without setting continuous-compression to true in recording header, so it
would fail to load.

The fix is to compress recording data only if we are making a continuous
recording.
2022-01-08 16:11:53 +00:00
Julian Smith
311961a522 src/Viewer/: reduced some startup diagnostics. 2022-01-08 16:11:53 +00:00
Florent Rougon
b191f0a57d Use current "getstart" URL
Two affected places:
  - the built-in launcher (command line options link);
  - package/org.flightgear.FlightGear.metainfo.in.

The previous link points to an old version of the manual.
2022-01-08 14:09:01 +01:00
James Turner
179b751bf5 Unit-tests for Nasal range() 2022-01-07 16:16:01 +00:00
James Turner
d5bc2d4629 Map: make POI display optional 2022-01-07 11:16:19 +00:00
James Turner
33eb4a55fb Enable POIs on Windows, for testing
Jonathan Redpath reports that POI loading seems okay for him, let's enable
it on next and see who complains, and how loudly :)
2022-01-07 11:16:19 +00:00
James Turner
d135122408 Via: add a comment 2022-01-07 11:16:19 +00:00
Julian Smith
02bda6d8d2 src/MultiPlayer/multiplaymgr.cxx: avoid compiler warning for strncpy() call. 2022-01-06 22:17:05 +00:00
Julian Smith
3351a785be src/Viewer/viewmgr.cxx: enable/disable video encoding menu items.
It doesn't look like menubar items can be enabled/disabled using <property>
or <expression>, so instead we write to the File menu's items tree
/sim/menubar/default/menu[]/name[]/enabled.

We also set /sim/video/encoding-path to '' or path of video file that we are
encoding to.
2022-01-06 22:17:05 +00:00
Florent Rougon
e3b619dd05 Fix missing include in src/Scripting/NasalFlightPlan.cxx 2022-01-06 12:11:02 +01:00
James Turner
c1e5cc3074 Improve creating VIA segments
Improve argument parsing for createViaTo, createViaFromTo to
handle Airway ghosts as well as strings. As part of this, allow
specification of the airway level explicitly when looking
up an airway.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2686/
2022-01-05 15:44:50 +00:00
James Turner
a7ae3bf6cd Fix up linkage of Nasal tests inside CppUnit
Ensure correct test backend is used inside fgfs_test_suite
2022-01-05 15:41:33 +00:00
Jonathan Redpath
2b88a3c23f Level D 767 Parser - set approach type based on approach name 2022-01-05 12:05:01 +00:00
Jonathan Redpath
0bf618d7f1 Make geodFromHash accept geo.Coord with Cartesian coords.
geodFromHash() will now respect the _pdirty and _cdirty flags. This
ensres that FGPositioned functions are protected from invalid or
outdated coordinates, and therefore from erroneous results.
2022-01-04 12:08:14 +00:00
portree_kid
1043e6f7f5 Remove FGATCDialogNew 2021-12-28 20:26:39 +01:00
Julian Smith
1b7e8504ef test_suite/unit_tests/: cope with getStringValue() now returning std::string. 2021-12-27 10:19:34 +00:00
Erik Hofman
d813b9cdd9 keep a copy of the string returend by p->getStringValue() in setProp until it is sent to the DDS layer. 2021-12-27 09:04:20 +01:00
Scott Giese
44177b0362 runwayprefs: make argument const 2021-12-26 20:28:31 -06:00
Scott Giese
6657e35a52 Best practice 2021-12-26 20:18:00 -06:00
Scott Giese
e38fb0c440 GroundController: remove always false condition 2021-12-26 20:16:41 -06:00
Scott Giese
3e096fed41 ATISEncoder: remove always true condition 2021-12-26 20:09:20 -06:00
Scott Giese
17fde93fb2 AIGroundVehicle: remove always true condition 2021-12-26 19:45:33 -06:00
Scott Giese
4d10f37992 AIEscort: bug fix 2021-12-26 19:40:15 -06:00
Scott Giese
3c4220e784 AICarrier: clamp bug fix.
Since this code attempts to clamp values between 0.0 and 1.0, the comparision needs to occur using double types.
2021-12-26 19:32:44 -06:00
Scott Giese
f008531fd5 AIWingman Join bug fix
Also removal of redundant code (always true conditions).
2021-12-26 12:41:06 -06:00
Scott Giese
27b518e306 Best practice for pre/post incr/decr. 2021-12-26 12:39:22 -06:00
Scott Giese
3850700ce1 Undefined Behavior fix.
Shifting bits into the sign-bit is unpredictable.
Should be an unsigned type.
2021-12-26 12:38:08 -06:00
SDeAstis
560e7a3d12 Solved the problem with custom menu labels not properly displayed. 2021-12-26 12:51:37 +00:00