1
0
Fork 0
Commit graph

15718 commits

Author SHA1 Message Date
Tobias Dammers
fe8b7bea21 Marker pins 2022-01-27 08:47:48 +00:00
James Turner
af0df69126 Fix MK-VIII GPWS crash caused by getStringValue
Change local variable storage to a string, to avoid a crash
in this code detected by ASan.
2022-01-24 22:26:18 +00:00
James Turner
7d3f511560 Fix a typo and re-word Univeral CRT warning.
Thanks to Scott Giese for pointing out.
2022-01-21 07:59:44 +00:00
James Turner
1114d836da Check Universal CRT version on Windows
Catch older versions of Ucrtbase.dll which can deadlock inside
setlocale() for us.
2022-01-20 20:37:44 +00:00
James Turner
fe9aadd8bb RoutePath: fix pointAlongPath for fly-overs
FIx some bugs in computing turnExitPos for fly-over waypoints,
and computing leg course when preceeeding leg is a runway.
In both cass we had an incorrect turnExitPos, so points along
the leg were incorreclty positioned.

Extend the test cases to cover this further.
2022-01-20 20:33:37 +00:00
James Turner
b50ba41a15 Standardise max-flyBy angle to 90 degrees
90 degrees is the Airbus value, previously used value of 120 is
not used  in any real-world device so let's go with 90 for now.
2022-01-20 20:30:05 +00:00
James Turner
e5e44d1c48 Silence a CMake warning
Explicitly use the legacy behaviour, until someone on Linux makes us
VND-compliant.
2022-01-18 16:42:25 +00:00
James Turner
08a70297ff GPS/RNAV: configurable max-flyBy-angle
Make the max-flyBy angle configuable, since for exmaple AIrbus uses 90
degrees. Expose this via a new gps/config property, and extend the tests
to verify that angles greater than the fly-by angle behav as fly-over
waypoints.

Extend the RoutePath code to share this configuration, so that route
visualisations match the configured angle.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2694/
2022-01-18 16:07:54 +00:00
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