1
0
Fork 0
Commit graph

12171 commits

Author SHA1 Message Date
James Hogan
bb0d7fc0a7
src/Viewer: Move splash to cam group camera
Move the splash screen from the scene root to a camera group camera,
just below the GUI camera. This has a number of advantages, mainly VR
related:
 - The splash FBO will only be rendered once per frame. Currently it
   appears to be rendered for both near & far cameras, and with
   stereoscopic rendering for both left & right (even though it splats
   right across both views at the moment), so 2 or 4 times.
 - It makes it possible to render the splash fullscreen on the desktop
   window, while presenting it on a 3d quad in VR (possibly via an
   OpenXR composition layer so the runtime can keep rendering it
   smoothly while FlightGear framerate drops during loading.
2022-07-12 22:38:53 +01:00
portree_kid
ce7b5eb094 AI Aircraft not taking off because TowerController signOff was not called. 2022-06-20 21:32:52 +02:00
portree_kid
5a3528f782 Fix segfaults in AI code 2022-06-19 10:28:54 +02:00
James Turner
a46d71930a Launcher: add settings for TerraSync DNS
Add advanced settings to speciofy the TerraSync DNS server.
This shoud allow some work-around of problems with some
ISP DNS.
2022-06-07 23:17:13 +01:00
Julian Smith
28d7308985 src/Viewer/viewmgr.*: fixed bug when /sim/aircraft contains '.' chars.
We were not appending the video container suffix if there was already a '.' in
the name.

Part of this fix is also to simplify the code - if name_in is not "" we don't
attempt to create softlink or append /sim/video/container.
2022-06-05 19:43:46 +01:00
James Turner
55c9c61fc3 Launcher: add logging around aircraft installs
Trying to understand ‘aircraft not found’ errors around packaged
aircraft
2022-06-01 11:50:38 +01:00
James Turner
8517eda0c9 Ground-cache: throw on NaN inputs
Attempt to provoke FDM NAN issues more directly (eg in Sentry reports),
rather than waiting on SGCardToGeod, etc to blow up inside the
ground cache.

SF-Id: https://sourceforge.net/p/flightgear/codetickets/2743/
2022-06-01 11:50:38 +01:00
portree_kid
d571bc6f76 AI Improvements
* Parking with point beyond parking so aircraft don't stop early
* Better approach routes (wait pattern)
* Extracting vector math from AIFlightplan
* More use of SGPositioned in ATC
2022-05-31 21:23:34 +02:00
James Turner
dbe2734e2c Launcher and startup support for TACANs
The launcher diagram and navaid-search now include TACANs, using
the current NavCache encoding (DME whose name ends in TACAN). A new
‘—tacan’ option works similar to —vor etc to set position (with 
optional offset). 

Tuning the Tacan instrument from the command line is not yet supported,
but could be easily added.
2022-05-31 10:18:16 +01:00
James Turner
43e0b3be48 CMake: fix missing header
Original fix by Mariusz Matuszek, adapted by me.
2022-05-25 11:16:44 +01:00
Lars Toenning
71c92c754d Remove FGMakeUpperCase listener
After discussing the problems, it was decided to remove this feature (https://sourceforge.net/p/flightgear/flightgear/merge-requests/295/).
2022-05-25 11:03:52 +01:00
James Turner
7d78c40086 Remove upper-casing of route-manager input
upper_case_property causes valueChanged to fire twice, since
SGPropertyNode string storage is now immutable (std::string). This
caused double-processing of for example adding a waypoint in
the route-manager dialog. Since the InputListener already upper-cases
the string, we can simply remove the upper-case property logic.
2022-05-25 10:43:08 +01:00
Lars Toenning
5051d90487 Use std::function for callbacks 2022-05-25 10:38:20 +01:00
James Turner
fb36cea04c Skip NasalClipboard on test-suite builds
Ticket: https://sourceforge.net/p/flightgear/codetickets/2740/
2022-05-17 14:33:35 +01:00
James Turner
3f670c84b1 VSCode applied formatting. 2022-05-16 12:15:05 +01:00
James Turner
15cb5ab075 Fix Windows: include needed for getpid() 2022-05-16 12:14:13 +01:00
James Turner
0df1109d93 Fix warnings / breakage from previous change. 2022-05-11 21:24:37 +01:00
Lars Toenning
961c57b576 Add missing include
Fixes compilation for GCC 12.1
2022-05-11 13:04:11 +01:00
PlayeRom
446299ddaf Fix using SI units like speed in km/h and altitude in meters for flight plan in Launcher. 2022-05-10 16:40:06 +01:00
Julian Smith
6edf68107e src/FDM/YASim/Gear.cpp: use SG_LOG instead of assert fail if contact is incorrect.
Have seen the assert fail when resetting location.
2022-05-08 12:58:58 +01:00
Julian Smith
b40cc51611 src/Viewer/viewmgr.cxx: log video encoding sws_scale() timing info with /sim/video/log_sws_scale_stats. 2022-05-01 15:28:01 +01:00
Julian Smith
d2d3bd5edc src/Viewer/: crude control over thread-cpu affinities on linux.
Detects /sim/affinity-control being set to 'clear' and 'revert' and modifies
all thread affinities accordingly. Only active on Linux.

Also modified meaning of /sim/thread-cpu-affinity. Instead of true/false, we now
expect these values:

    '': do nothing.

    'none': tell OSG to not set up any thread affinities (same as prev
    'false').

    'osg': allow OSG to set up thread affinities but attempt to cancel affinity
    of main thread afterwards.
2022-05-01 15:24:38 +01:00
Julian Smith
a59c94f8be src/Viewer/renderer.cxx: use /sim/thread-cpu-affinity to control thread-cpu affinity.
This is for investigating bug 2734.

If /sim/thread-cpu-affinity is true or unset on startup, we use default
behaviour where we tell OSG to set up thread-cpu affinities.

Setting /sim/thread-cpu-affinity to false on start up results in all/most
threads being free to run on any cpu core. For example in .fgfsrc or on
command, use:

    --prop:bool:/sim/thread-cpu-affinity=false
2022-04-30 00:14:00 +01:00
Erik Hofman
0923400e35 Expose the machwave active and offset properties 2022-04-29 15:08:10 +02:00
Bertrand Coconnier
60ce826874 Sync'ed with JSBSim v1.1.11
- Output files are now written in the current directory instead of being written in the aircraft folder (issue GH#337)
- A new exception TrimFailureException is now thrown when trim fails. This eases the detection of the trim failure (previously the exception message needed to be checked).
- An exception is thrown when a latitude higher than 90 degrees is supplied to a <waypoint> control element (PR GH#536)
- Fix the sign of the initial NED climb rate (property ic/gamma-deg) (PR #545)
- JSBSim now checks malformed data in <table> elements. Anything different than numbers and spaces/tabs will be rejected.
- Usage of <location> and <orientation> in engines is now officially dropped (PR #559, #561 and #563). These elements were deprecated long ago in favor of the corresponding elements <location> and <orientation> in thrusters. Therefore the code removed is no-op.
- The computation of the initial rotation rates has been fixed (Issue GH#553). Previously, the rotation rates could be initialized with extremely high values when the vehicle was spawned over the Poles. And for a given set of initial conditions, the initial rotation rates could have different values depending on the initial latitude at which the vehicle was initialized. This now fixed.
- The precision with which values are transmitted thru a socket can now be set via the attribute precision such as <output precision="8"> (PR GH#579)
- Added 2 new methods to FGFDMExec: SetOutputPath and GetOutputPath to specify the path to which the output files will be written.
- All JSBSim exceptions now inherit from JSBSim::BaseException. There still exist std::* exceptions thrown by JSBSim. Cleanup is still in progress.
- JSBSim no longer calls exit() or abort(). Exceptions are thrown instead. This gives the calling application an opportunity to gracefully recover.
2022-04-23 19:18:42 +02:00
James Turner
06063ed82a Fixes for Wake turbulence changes
- add missing <string> include
- fix tests
2022-04-20 10:23:31 +01:00
Bertrand Coconnier
83cad5797e Intercept errors in the matrix inversion routine and report the faulty aircraft in the log. 2022-04-16 13:45:10 +02:00
Bertrand Coconnier
3441c5ef3a Remove floats equality test with zero and fix memory leaks. 2022-04-16 13:26:17 +02:00
Lars Toenning
2ccd9bfb30 [swift] Pass struct to updatePlanes() instead of multiple vectors 2022-04-06 07:53:51 +01:00
Lars Toenning
e35c24af99 Update swift license headers 2022-04-06 07:53:51 +01:00
Lars Toenning
9ec7d6b855 swift cleanup 2022-04-06 07:53:51 +01:00
James Turner
7a0be3f000 GUICompat: fix binding activation, close callback
With this change, binding can be activated mostly-correctly from
the compatability layer. Closing still isn't working quite right, more
changes to follow.
2022-03-24 10:36:06 +00:00
James Turner
abb394935d Use type-safe subsystem access 2022-03-24 10:34:12 +00:00
James Turner
a9e09a0ae4 Remove obsolete pre-OSG 3.4 code 2022-03-24 10:34:04 +00:00
Julian Smith
da946fb14c src/FDM/YASim/FGFDM.cpp: allow backwards compatibility of gear contact points/surfaces.
We now allow an aircraft to specify both simple gear contact points (which will
be automatically used by old Flightgear builds), and also gear contact surfaces
(which will be automatically used by new Flightgear builds).

When parsing gear specifications, if specified we now use 'wheel-x', 'wheel-y'
and 'wheel-z' in preference to 'x', 'y' and 'z' for the wheel centre point.

These new 'wheel-*' values will be ignored by old Flightgear builds.

So to work with both old and new Flightgear builds, an aircraft should specify
old-style contact points with 'x', 'y' and 'z' as before, and new-style contact
surfaces with 'wheel-x', 'wheel-y' and 'wheel-z', and 'wheel-radius' and
'tyre-radius'.
2022-03-21 15:31:08 +00:00
Julian Smith
5fb8c39057 src/FDM/YASim/YASim.cxx: add gear[]/spring and gear[]/damping properties. 2022-03-21 15:31:08 +00:00
Julian Smith
011b1cc726 src/FDM/YASim/: added support for torus-shaped gear contact surface.
Contact surface can now be a torus shaped tyre; we find the part of this torus
that is furthest towards the ground instead of using a fixed contact point.

Torus is specified by radius of wheel centred on original contact point,
orientation of a wheel axle, and radius of torus. If both wheel and tyre radius
are both zero the calculations reduce to a fixed contact point as before.

src/FDM/YASim/FGFDM.cpp
    Read new optional <gear> attributes:
        wheel-axle-x
        wheel-axle-y
        wheel-axle-z
        wheel-radius
        tyre-radius

src/FDM/YASim/Gear.cpp
    Added new gearCompression() function that calculates gear compression for
    wheel with torus tyre. If new radius values are both zero the calculation
    behaves like a contact point as before; we also optimse this case to avoid
    the extra matrix operations.

    Moved old algorithm into gearCompressionOld() function to allow testing
    that new algorithm gives same results when wheel and tyre have zero radius.

src/FDM/YASim/Gear.hpp
    Added new members:
        _wheelAxle,
        _wheelRadius
        _tyreRadius
    Also declare gearCompression() function so it is available for unit
    testing.

    Added GearVector struct for caching unit vector and magnitude and use for
    _compr and _wheelAxle, so we avoid having to calculate magnitude and unit
    vector each iteration.

    Clarified that _compressDist is vertical movement of gear. Not useful for
    gear animations - one must use compression-norm.

src/FDM/YASim/Airplane.cpp
src/FDM/YASim/Model.cpp
src/FDM/YASim/YASim.cxx
    Use g->getContact() instead of manually adding compression vector to
    g->getPosition() (which no longer gives the correct contact point).
2022-03-19 23:14:58 +00:00
Julian Smith
417332f265 src/FDM/YASim/yasim-test.cpp: Minor improvements to help text. 2022-03-19 23:14:58 +00:00
Julian Smith
04ee8d95f5 src/Viewer/splash.cxx: added some missing braces for clarity. 2022-03-19 23:14:58 +00:00
Richard Harrison
662dad0848 Fix MP Pilot List disappearing
Ensure that lag/lag-mod-averaged is created and set to a valid value (0) prior to calling the base class init method as otherwise the MPList will have a nil reference.

This needs to be done prior to the base class ::init() because that method sets the model-added property which will trigger the lisetener.
2022-03-17 11:51:52 +01:00
Richard Harrison
360c64c7b7 Remove threaded Nasal garbage collection refs #2674 Nasal corruption:
refs: https://sourceforge.net/p/flightgear/codetickets/2674/

Because disabling threaded GC wouldn't result in exactly the same allocation and GC due to changes I made to the GC as part of the threaded GC work the only safe thing to do is to remove it all.

Once we have figured out if it is the threaded GC causing the problem or not then we will at least know what needs fixing.
2022-03-13 21:37:42 +01:00
Richard Harrison
d678d108ce Splash: add visibility condition to images
Using a <condition> images can be hidden now.

Also reworked the logic so that any hidden item will be hidden from creation and not rely on the update logic; as otherwise items can momentarily appear.
2022-03-11 18:38:24 +01:00
James Turner
b91b6c4516 Fix Camera ownership for GUI-Manager
We can't assume the default/primary Camera for the View, is the GUI
camera, so add explicit setting to get tooltips and popups working
again.
2022-03-11 12:50:08 +00:00
Richard Harrison
5db4b5c871 Splash-logo fixes for max-width and position
PC9-M looked wrong; reported by Erik
2022-03-10 20:21:17 +01:00
Richard Harrison
bc9291cb02 Splash: fix logic for nightly build.
I thought it would be right to display a nightly build warning for self build also - but now I've changed my mind as it is an irrelevance.
2022-03-10 15:54:29 +01:00
Richard Harrison
e3c2a39420 Define splash screen from property tree
Refactor Splash to be data drive using definitions in <content> for the system splash and <model-content> for model related content.

All system splash is at fixed index and should not be changed except for good reason.
2022-03-10 15:12:34 +01:00
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
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
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
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
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
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
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
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
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
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
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
James Turner
7d2955347e Initialize a pointer to null. 2021-12-25 13:40:26 +00:00
James Turner
5b537a176e Adjust EnvironmentMgr API to avoid copying
getEnvironment encouraged pass-by-value of FGEnvironment
which is heavy and mostly unnecessary.
2021-12-25 13:40:25 +00:00
James Turner
a12a7e9bec Autopilot code tweaks
Move config.h include to correct place, and use
override instead of virtual in a few places.
2021-12-25 13:40:25 +00:00
Erik Hofman
6414df325d Cope with SGPropertyNode::getStringValue() now returning std::string by value. 2021-12-25 12:56:49 +01:00
Scott Giese
a993ff7ccb Revert "APT.DAT version 810 and 850 are both obsolete."
This reverts commit 913eb83e10.
2021-12-25 02:16:40 -06:00
Julian Smith
ee4d97097c src/Aircraft/continuous.cxx: reduced a diagnostic. 2021-12-24 14:49:06 +00:00
Roman Ludwicki
82f967ab92 Cope with SGPropertyNode::getStringValue() now returning std::string by value.
This is by Lars Toenning <dev@ltoenning.de>, Roman Ludwicki <romek21@op.pl> and
SDeAstis <salvatore.deastis@gmail.com>, in 2021 Hackathon.

Also cope with removal of SGPropertyNode::getName() - use getNameString()
instead.
2021-12-24 14:49:06 +00:00
James Turner
93d278d63a ATC: use owning ref for AIAIrcraft
Avoid a crash where the raw pointers in AcitveRunway become
stale; use a real owning ref-ptr instead.
2021-12-24 13:06:10 +00:00
Florent Rougon
63df3351db Fix for --view-offset
Make --view-offset set /sim/view[0]/config/heading-offset-deg instead of
/sim/current-view/heading-offset-deg. Setting the latter has no effect
because of what flightgear::View::createFromProperties() does when it
initializes flightgear::View::View. This was discussed at [1].

[1] https://sourceforge.net/p/flightgear/mailman/message/37406317/
2021-12-24 08:58:49 +01:00
Scott Giese
913eb83e10 APT.DAT version 810 and 850 are both obsolete.
Remove 810 parsing.
Eliminate version strings from method names and messages.
2021-12-22 23:55:38 -06:00
Scott Giese
eefd878529 AirportBuilder: missing header guard corrected. 2021-12-22 23:50:37 -06:00
Erik Hofman
930ed00ba9 Adjust friction factors and bumpiness when the material is a lake and frozen solid. For JSBSim take precipitation and temperature into account, YASim is a bit simpler. 2021-12-22 14:38:17 +01:00
Erik Hofman
f287bd9133 Set the inland-ice property when the mean ground temperatures get low enough 2021-12-21 10:31:37 +01:00
Erik Hofman
dbba5d9ad2 Read annual precipitation fro the blue channel 2021-12-20 11:44:55 +01:00
James Turner
c3beaee307 Launcher: fix a lingering season reference 2021-12-19 18:44:21 +00:00
Julian Smith
ef38e07c61 src/Time/TimeManager.cxx: support fixed-dt when not in simple-time mode. 2021-12-19 16:34:28 +00:00
Julian Smith
cb7343eb35 src/Time/TimeManager.*: fixed simple-time indeterminism that could cause hang on startup.
_simple_time_fdm was not being initialised, which was causing occasional hangs
on startup. So set to zero in constructor and TimeManager::init().

For simplicity, we also initialise all other basic type state in the
TimeManager class.

If _simple_time_fdm's starting value happens to be very large (e.g. 1e228),
_simple_time_fdm + fixed_dt would result in _simple_time_fdm, so we would end
up always setting simDt and realDt to zero.

This stops SGEventMgr from processing any events, which means that
initPosition()'s event to call finalizePosition() is never processed so
/sim/position-finalized is stuck on false, which results in the FDM never
setting /sim/fdm-initialized.
2021-12-19 15:57:16 +00:00
James Turner
5f66ffc96b Disable Sentry if init fails
This will fix other uses of the APi blocking because the backend
failed to start. Enable debug logging in non-release builds so
it's obvious when the deploymenty is not configured right.
2021-12-19 12:39:23 +00:00
PlayeRom
271073d869 Remove 'Season' option from Qt Launcher 2021-12-19 11:45:58 +00:00
Bertrand Coconnier
a49f865515 Avoid spurious error messages when the property is already untied. 2021-12-18 17:32:59 +01:00