1
0
Fork 0
Commit graph

16046 commits

Author SHA1 Message Date
Richard Harrison
de41907532 Use helper method for OSGText alignment mapAlignment 2022-03-10 15:12:34 +01:00
James Turner
4e6f9e6239 Nasal startup: allow more control over loading
Allow excluding scripts entirely based on the startup load properties.
2022-03-09 16:52:19 +00:00
James Turner
0e079a7ebe More #ifdefs around PUI in the UI code 2022-03-09 16:52:19 +00:00
James Turner
7613cb3ce7 Canvas GUIMgr: remove coupling on FGRenderer 2022-03-09 16:52:19 +00:00
James Turner
52731a7c04 Nasal: expose Canvas SpaceItem directly
Allow a SpacerItem to be explicitly created.
2022-03-09 16:52:19 +00:00
James Turner
77501672df Nasal expose propertyValue as a helper
Allow other code to map property values to an naRef, without exposing
the generic property node on their API. This avoids creating a wrapper
props.Node frequently for simple value access.
2022-03-09 16:52:19 +00:00
James Turner
cbd5ef9e7b GUI: XML to Nasal bridge, to keep PUI dialogs working
(Disabled by a CMake option)

This builds equivalent C++ objects to what the PUI dialogs build, with
properties exposed to Nasal. Peer objects are created by Nasal callbacks,
which can implement the various dialog functions needed to keep
compatibility, especially the ‘update’ and ‘apply’ hooks.
2022-03-09 16:52:19 +00:00
James Turner
5e0cb1b6e3 Remove some obsolete startup log messages 2022-03-09 16:52:19 +00:00
James Turner
e1cc22090d C++: use override in CanvasSystemAdapter header 2022-03-09 16:52:19 +00:00
James Turner
79f38a5742 Expose new GridLayout to Nasal
Requires up-to-date SimGear which includes the new header.
2022-03-09 16:52:19 +00:00
James Turner
a324ba4b41 Multiplayer: use standard position accessors
Replace manual property query with the standard position
accessors from FGGlobals.
2022-02-26 17:43:15 +00:00
James Turner
1ec67f05ff Multiplayer: ensure lag/ properties always exist
Create lag/foo properties used by the Pilot-list UI in bind(). This avoids
a race condition where motion info was not yet updated, but Nasal tries
to retrieve the lag properties and errors out.
2022-02-26 17:43:15 +00:00
James Turner
3fb81a34f5 Launcher: Add altenrate UI style file
Keep forgetitng to add this, commiting so it
doesn't get lost in the shuffle.
2022-02-26 17:43:15 +00:00
James Turner
16bf10b333 Avoid Marker-beacon spam on FDM NaN case
Check and bail out of marker beacon search if we are in NaN-land; this
should making it easier to trace the cause of the NaNs.
2022-02-20 16:20:04 +02:00
Julian Smith
076d0816b5 src/Aircraft/replay-internal.cxx: removed stray diagnostic in prev commit. 2022-02-19 12:41:21 +00:00
Julian Smith
2d53280fba src/Aircraft/replay-internal.cxx: fix replay of some legacy normal recordings.
Flightgear 2020.3 releases use a different encoding for multiplayer information
in Normal recordings (these are saved from in-memory recording data), which
we failed to parse. This commit restores handling of this encoding, enabling
replay of older recordings.

Also when replaying in-memory recording, don't do background in-memory record
of multiplayer information, because this gradually prunes the information that
is being replayed.
2022-02-19 12:03:56 +00:00
portree_kid
b216658ba1 AI improved entry into parking (heading and postition) 2022-02-13 20:34:17 +01:00
portree_kid
49eeb6627c Fix compile issue 2022-02-12 19:49:21 +01:00
Torsten Dreyer
0e0acc9a10 Fix a memory leak 2022-02-11 08:50:13 +01:00
James Turner
f8afde7528 Yasim-test: add detailed lift/drag graphing
Patch by Huntley Palmer, to extend range of recorded angles, and
offer a detailed mode with finer resolution over a specific range.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2629/
2022-02-07 11:42:28 +00:00
portree_kid
82863d3f3e AI Fixes
* Fix turns (left-turn-bug)
* Better parking apporach
* CSV Logging via property
* ft vs m bug in setLeadDistance
* Split Runway Entry/Exit calculation
* Prototype wait pattern
2022-02-06 21:11:58 +01:00
PortreeKid
cacd650f27 Remove Traffic Tests 2022-02-05 13:33:42 +01:00
Julian Smith
da7434f2e2 src/GUI/Highlight.cxx: fixed bug in FdmInitialisedListener destructor.
Use m_fdm_initialised to unregister our listener, as it waill always be valid,
unlike globals->get_props()->getNode(...).
2022-02-02 15:25:07 +00:00
b'Keith Paterson
f2d05e33e3 Merge /u/portree_kid/flightgear-portreekid/ branch topics/atc/clean_inheritance into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/288/
2022-02-01 19:29:30 +00:00
Stuart Buchanan
8bbb30225f WS30: Add property controlling splitting water mesh 2022-02-01 16:48:54 +00:00
Stuart Buchanan
13fab25b6f MR273 - Added the Milky Way onto the night sky
from Chris RINGEVAL

https://sourceforge.net/p/flightgear/flightgear/merge-requests/273/

Squashed commit of the following:

commit ea6e808e418533db1a41671c67a7873ddbfcc858
Author: Gonzalo Pesquero <gpesquero@yahoo.es>
Date:   Sun Nov 21 17:44:44 2021 +0100

    Add translations on splash screen

commit 3c47d771877743692f5d0d63e980d6694a549405
Author: Chris Ringeval <eatdirt@protonmail.com>
Date:   Sat Nov 27 16:37:31 2021 +0100

    Moon direction vector in the eye frame available to shaders

commit 70728f7ea29dad75c34cad69745021ee927bea31
Author: Chris Ringeval <eatdirt@protonmail.com>
Date:   Sun Nov 21 22:18:38 2021 +0100

    Add altitude to scolor object as needed by Milky Way texturing
2022-02-01 16:23:07 +00:00
portree_kid
cf0d90ef3d Cleanup Inheritance in ATC 2022-01-31 22:34:05 +01:00
James Hogan
276835f74c
osgXR: Update to 0.3.8
Update 3rdparty/osgXR to version 0.3.8, which gets us non-linear sRGB
swapchain formats by default. This avoids double gamma correction with
Monado when FlightGear renders non-linear sRGB data into linear RGB
swapchain images.
2022-01-30 21:29:06 +00:00
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