1
0
Fork 0
Commit graph

15910 commits

Author SHA1 Message Date
James Turner
29ef5210a7 Fix crash when no waypt controller is created
When we don't build any wapy controller, also bail out, rather than
crashing. Jonathan could trigger this with an empty route on the A320,
although no stand-alone test-case so far.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2695/
2022-01-18 12:17:13 +00:00
Scott Giese
f198ac8d8d AIBase: Refactor
getTypeString returns string_view
object_type to strongly-typed enum
ModelSearchOrder to strongly-typed enum
2022-01-15 22:54:30 -06:00
Scott Giese
42ee4822c7 AIFlightPlan: Maintenance
virtual dtor
ensure members are initialized
double constants with double types
variable scope conflict fixed
2022-01-15 20:09:28 -06:00
Scott Giese
1816e3e551 AIManager: Maintenance
ensure all members are initialized
std::transform with back_inserter
std:find_if for collection crawl
2022-01-15 20:06:11 -06:00
Scott Giese
4dce923ef3 AIMultiplayer: Maintenance
scope conflict with parent variables
2022-01-15 20:01:58 -06:00
Scott Giese
1998ffce84 performancedb: Maintenance
default ctor, dtor
2022-01-15 20:00:00 -06:00
Scott Giese
f5acb22929 submodel: Maintenance
virtual default dtor
2022-01-15 19:59:04 -06:00
Scott Giese
912d08fa59 AIWingman: Maintenance
default dtor
2022-01-15 18:59:55 -06:00
Scott Giese
ba5ae5148e AIStatic: Maintenance
virtual default dtor
remove unused includes
2022-01-15 18:53:48 -06:00
Scott Giese
a177aa76bc AIEscort: Maintenance
default dtor
ensure all members are initialized
_max_speed was hiding parent member
double constants with double types
2022-01-15 17:49:10 -06:00
Scott Giese
a9cb94fdbd AIBallistic: Maintenance
virtual dtor
_submodel and _elevation_m hiding parent members
ensure all members are initialized
use double constants with double types
2022-01-15 17:27:59 -06:00
James Turner
a6a29f5482 Tests for airwsys in Nasal 2022-01-15 22:23:38 +00:00
James Turner
7ac03debf4 Add tests for isRoute FlightPlans 2022-01-15 22:23:38 +00:00
James Turner
9023a09739 Change Via-from-string parsing
Previosu parse had embedded whitespace which is annoying
to parse in other places, switch to using backslash to
seperate terms, similar to how navdaid offsets are defined.
2022-01-15 22:23:38 +00:00
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