1
0
Fork 0
Commit graph

11468 commits

Author SHA1 Message Date
Erik Hofman
658aa4a764 Add a climate section under the /environment properties. Add relative humidity, mean temperature and dewpoint for sea level and set the snow level based on the mean temperatures. Fix some issues for high-altitude airports (SLLP). 2020-11-09 11:46:34 +01:00
Stuart Buchanan
0982b2827a WS3.0: Initial commit of WS3.0 rendering 2020-11-08 22:43:49 +00:00
Erik Hofman
f21b9b651b Fix ocean humidity calculation, adjust humidity based on altitude and calculate sea level temeprature based on ground level temperature and altitude. 2020-11-08 15:54:54 +01:00
Erik Hofman
6e34ea5ab5 Relative humidity is low when the temperature is high and vice versa. This also makes it time-of-day dependent 2020-11-08 13:13:04 +01:00
Erik Hofman
3384a85650 Clean up the code, impement relative humidity (and related to that dew point) and better implement arid climates 2020-11-08 10:28:23 +01:00
Erik Hofman
1ae2e4c4cd Implement a set of non-lineair seasonal interpolstion fnctions and use them. 2020-11-06 13:49:16 +01:00
Erik Hofman
e3a7ab6cb3 Implement temperature and precipitation for temperate and continental climates 2020-11-05 16:05:53 +01:00
Erik Hofman
39602d98d5 * Updates as suggsted by James.
* Fall back to Ocean climate if the koppen-geiger image is not found.
* Fixes to temperature calculations based on viewer and sun lat and lon.
* Fix season and day progress factors, add an autumn progress factor.
* Set the environment parameters like ice-cover, dust-cover and wetness:
  for now always active, should be a menu option in the future.
* Add a compile-time option to dump a climate report to the console.
2020-11-05 10:09:30 +01:00
James Turner
5386051413 MP-DNS: cancel pending request on close. 2020-11-04 22:32:30 +00:00
Erik Hofman
04ff8a5e5e Add the climate class to the build, for now it's not altering anything. 2020-11-03 14:41:38 +01:00
Erik Hofman
370a412ee6 Add an early implementation of a Köppen-Geiger climate subsystem which can be used to provide to plausible weather and enviroment settings based on latitude and longitude with a resolution of 3x3 km. 2020-11-03 11:54:34 +01:00
Julian Smith
bf7d8bbbb3 src/Main/positioninit.cxx: don't open popup if unable to position on taxiway.
Have downgraded from SG_POPUP to SG_ALERT.
2020-11-02 10:53:38 +00:00
Julian Smith
cf55c5f4f5 src/GUI/new_gui.cxx: disable rescan of style files because causes problems. 2020-11-02 10:53:38 +00:00
Julian Smith
6c1387e35b src/Instrumentation/commradio.cxx: don't use and/or keywords because breaks on windows. 2020-11-01 14:46:14 +00:00
James Turner
3cbbbe3df4 Sentry: fix a merge error when enabled. 2020-11-01 11:18:55 +00:00
Julian Smith
d34f7dc451 src/Main/positioninit.cxx: open popup if we can't find taxiway to avoid starting on runway. 2020-11-01 09:29:20 +00:00
Julian Smith
fd723c0497 src/FDM/YASim/Propeller.cpp: set thrust to zero if feathered. 2020-11-01 09:29:20 +00:00
Julian Smith
2e35b01c89 src/FDM/YASim/FGFDM.cpp: show negative thrust in engines/engine[]/thrust-lbs
We previously only showed the magnitude of the thrust; this patch uses the sign
of first element of thrust vector. Makes things less confusing if an engine is
stopped or otherwise causing drag rather than thrust.
2020-11-01 09:29:20 +00:00
Julian Smith
3591bd8631 Be able to control atis speech pitch, volume and speed.
Uses these properties:
    /sim/atis/speed
    /sim/atis/volume
    /sim/atis/pitch

Values 1.0 behave as default. Other values are used to multiply default
settings.

Changes don't take affect immediately. But changing com frequency seems to
often cause an update which will then pick up the new values.
2020-11-01 09:29:20 +00:00
Julian Smith
1a4d3785c4 src/Main/fg_commands.cxx: incremented diagnostic if profiling not available. 2020-11-01 00:03:03 +00:00
Julian Smith
b78ef0c1ab src/Scripting/NasalSys.cxx: fix call to sglog() to pass function="".
Nasal function names are not persistent strings so are not handled correctly by
sg_log_delta code.
2020-11-01 00:03:03 +00:00
Julian Smith
68938ddb4b src/GUI/QtLauncher.cxx: fix call to sglog() to pass __FUNCTION__. 2020-11-01 00:03:03 +00:00
Julian Smith
63fe407d80 src/ATC/trafficcontrol.hxx: fixed warning about const return value with no affect. 2020-11-01 00:03:03 +00:00
Julian Smith
710a11eeda src/Viewer/splash.cxx: show when download speed is zero. 2020-11-01 00:03:03 +00:00
Julian Smith
aa1e0e1d1d src/Main/main.cxx: fixed warning in OpenBSD-specific code. 2020-11-01 00:03:03 +00:00
Julian Smith
a6a7ce3e4b src/Main/bootstrap.cxx: avoid warning on openbsd. 2020-11-01 00:03:03 +00:00
Julian Smith
34e749bc15 src/Main/bootstrap.cxx: disable custom segfault handler on OpenBSD. 2020-11-01 00:03:03 +00:00
Julian Smith
d7614c184c LiveMetarProperties::handleMetarData: increased diagnostics.
Increased diagnostics from SG_WARN to SG_ALERT, to mitigate confusion if METAR
is out of date etc.

Will add a better mechanism for reporting errors at some point.
2020-11-01 00:03:03 +00:00
Julian Smith
4ec80297bf src/Viewer/FGEventHandler.cxx: NewGUI::setStyle(): added code to rescan style files.
Changing style will reload style from filesystem, so one can edit styles and
see results without restarting fg.

Note that this duplicates initial populating of /gui/styles/ from
defaults.xml's <sim><gui>...</gui></sim> section, so it's a bit of a hack.
2020-11-01 00:02:43 +00:00
Julian Smith
43468727ad Added command 'dialog-toggle' - toggles display of dialogue.
E.g. useful for keyboard shortcuts.
2020-10-31 17:23:28 +00:00
Julian Smith
3c9fae3016 src/Aircraft/replay.cxx:loadTape(): use specified path if it ends with .fgtape.
Used to always prepend /sim/replay/tape-directory and append .fgtape. But it's
convenient to be able to specify exact path.
2020-10-31 17:23:28 +00:00
Julian Smith
e2f2299286 src/Main/options.cxx:fgOptLoadTape(): call fgOSExit() if we fail to load tape.
If user specified --load-tape then failure to load it should be fatal to avoid
confusion. It also avoids needlessly overwriting a valid recovery tape if
/sim/replay/recovery-period is set.
2020-10-31 17:23:28 +00:00
Julian Smith
bdfd42ebd4 src/Aircraft/replay.cxx: try to ensure parent dir of recovery tape.
Avoids unexpected absence of a recovery tape.
2020-10-31 17:23:28 +00:00
Julian Smith
270cada516 src/MultiPlayer/multiplaymgr.cxx: fix multiplayer replay when not connected to multiplayer server.
Previously when replaying a recording, we would not show any recorded
multiplayer aircraft if we were not connected to a multiplayer server.
2020-10-31 17:23:28 +00:00
Julian Smith
f04f902b66 src/GUI/MessageBox.cxx:modalMessageBox(): If no gui, use SG_POPUP to ensure message is printed to terminal. 2020-10-31 17:23:28 +00:00
Bertrand Coconnier
801ec1f7a6 Relax the assert when trying to clip with max < min.
Throwing an exception was too harsh. Instead the clipping is ignored and a warning message issued.
Reintroducing the commit 90a04a that has been inadvertently removed.
2020-10-31 18:06:21 +01:00
Bertrand Coconnier
53fac332c1 Fixes for OpenBSD.
Took the opportunity to switch to the more portable call 'fctnl(... O_NONBLOCK ...)' instead of 'ioctl(... FIONBIO ...)' for all UNIX-like OSes.
2020-10-31 14:29:22 +01:00
Bertrand Coconnier
bb0b69bc41 Fixes assertion failures reported by Julian smith.
These were due to the ground callback instance of FlightGear not setting the ellipse parameters of the 'contact' location. this commit make JSBSim immune to that scenario.
2020-10-31 14:11:14 +01:00
Bertrand Coconnier
388d66b6a6 Sync'ed JSBSim
Includes the following new features and bug fixes:
- The <random> function now uses C++ std::default_random_engine
- WGS84 is now used everywhere in JSBSim (previously a mix of spherical/WGS84 earcth was used resulting in inaccuracies).
- A new <planet> XML element can be used to tweak the planet characteristics (such as semimajor/smemiminor axes, gravity, etc.)
- The FGGroundCallback instance is now managed by FGInertial with a dynamic pointer std::unique_ptr<>. JSBSim was previously using a static pointer which was causing memory access failures when several instances of JSBSim were used or when an instance was replaced by a new one (the structure pointed to by the static pointer was then lost when the old instance was destroyed).
- Removed calls to exit() and replaced them by exceptions that can be caught by FlightGear (should avoid FlightGear from being ungracefully stopped by an error found by JSBSim).
- Sockets interface: replaced the usage of obsolete functions gethostbyname()/gethostbyaddr() by getaddrinfo().
- FGColumnVector3 and FGMatrix33 can now be initialized by C++ std::initializer_list
- Disable the delays implemented in some flight control components during trimming (was sometimes preventing the trim algorithm from converging to a solution).
- Fixed the magnetometer initialization (was not updated during the first 1000 time steps)
- More conversions to C++11 features (nullptr, override, std::unique_ptr<>, etc.).
2020-10-30 13:52:56 +01:00
James Turner
f4298d676f Fix for RMB/MMB interaction with picking
When RMB drag-to-look is active, ignore all other mouse downs, which
might otherwise trigger picks to start.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2108/
2020-10-29 23:20:48 +00:00
Automatic Release Builder
6d2f1d33d8 Launcher: fix L10N issues found by Michael D
Address parts of the issues mentioned in:
https://sourceforge.net/p/flightgear/codetickets/2386/
2020-10-29 21:21:40 +00:00
James Turner
29d171e73a Launcher: port the QQC2 check to next
Since we require QQC2 on next, make it a critical warning.
2020-10-29 21:21:00 +00:00
James Turner
e028c52e42 NavCache: fix writes to a read-only DB
When in read-only mode, we were still allowing writes during the
octree building, which is bad. Add the missing check.

Sentry-Id: FLIGHTGEAR-8F
2020-10-29 21:13:47 +00:00
James Turner
4075ea02e9 Launcher: Fix scrollbar for next 2020-10-29 21:12:36 +00:00
James Turner
0dfdf63399 Clear atomic listeners too
This is part of trying to reduce possible causes of the property
crash on shutdown.
2020-10-29 17:28:05 +00:00
James Turner
3af8d11e1b Fix for renamed file 2020-10-29 16:26:36 +00:00
James Turner
801ddc59f8 Fix for missing 2D panel
Should be back-ported to 2020.3

Sentry-Id: FLIGHTGEAR-5X
2020-10-29 16:24:53 +00:00
Automatic Release Builder
77d7476ba6 Fix route-path crashes on empty
This could be triggered by doing ‘view route’ in the launcher flight-
planning code, wit no route defined.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f8aea84541 Launcher: nicer back button.
Avoid localisation issues for the back button, by switching to an 
icon.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9855e89109 Launcher: Validate restored aircraft state on load
Otherwise a stray state can enter the logic, unless the user
re-selects it.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f0e2a297ae Launcher: Fix excessively large mouse area
The notifications catch are was blocking the summary pane; fix the
size to follow the active notifications.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
d75f05d4c0 ATC_mgr fix: clear user aircraft ATC on reposition
Avoids a stale controller causing crashes after a reposition. Triggered
by C172 tutorials.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9f3f1a8f58 Launcher: Fix translation tag Michael D spotted. 2020-10-29 16:24:41 +00:00
Automatic Release Builder
5b3f0e5cbb Sentry: generate a UUID for report tracking
Because we don’t have any user-identifier, generate a UUID so that
we can filter reports by it.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f78d644a61 Launcher: fix feedback adding default catalog
When adding the default catalog from the aircraft browse tab, 
the list on the add-ons page didn’t refresh correctly.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
8c371cf3bb Launcher: Separate recent-foo data by version
Since our data encoding is incompatible between 2018 and 2020, use
different settings keys so running both versions in parallel is easier.
Without this, each version screws up the data for the other.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9776c56faa Fix a crash (race condition) closing the launcher
When local aircraft scanning is slow, we can end up clearing
the locale while a scan is in progress, which crashes. Ensure we
abandon any in-progress scan when closing the launcher.

Sentry-Id: FLIGHTGEAR-CH
2020-10-29 16:24:41 +00:00
Automatic Release Builder
df42c6f026 Launcher: UI feedback for hangar migrations
Add pop-up notification when we migrate to a new version of a hangar.
Convert the ‘new version available’ message to use a pop-up
notification as well.
2020-10-29 16:24:39 +00:00
Stuart Buchanan
c71f281a58 Launcher: First Run capitalization and grammar. 2020-10-29 16:23:26 +00:00
Automatic Release Builder
3e72fb230f Sentry: block XML parse errors from the launcher
Avoid filling up the logs when the launcher parses broken aircraft XML;
wait until the user actually pick one to fly with, before reporting
XML errors.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
fc037de312 NavDataCache: don’t duplicate FG_ROOT/Scenery path
Check if the path is in the list, before adding it again.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
397aad1d1d Autopilot XML: Improve logging around NaNs
The current NaN message is very noisy, and not very information. Try
to improve that, to avoid filling up the logs.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
e4c0e71424 Environment: Doesn’t need to be a warning 2020-10-29 16:23:26 +00:00
Automatic Release Builder
b35b8c6147 Splash screens: support more, and JPEGs 2020-10-29 16:23:26 +00:00
Automatic Release Builder
19aa0332f2 loadxml() command: add ‘quiet’ bool option
This is to avoid console/log spam from jetways.nas in particular,
which uses loadxml to probe for file existence, every 10 seconds. But
in general it seems useful to have this potentially be quiet, since
there is a result code.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
378fc54b61 Launcher: first-run wording tweaks
As discussed on the devel list, also switch to HTTPS.
2020-10-29 16:23:20 +00:00
Automatic Release Builder
9de60e5729 Change error reporting for -set.xml parsing
Avoid exceptions in the ‘not actually a -set.xml’ case, since this
occurs somewhat frequently.

Sentry-Id: FLIGHTGEAR-3W
2020-10-29 16:22:35 +00:00
Automatic Release Builder
e0df583c14 Launcher: fix appearance of disabled add-ons.
Spotted by Michael Danilov
2020-10-29 16:22:35 +00:00
Automatic Release Builder
38f44e0928 Traffic: fix some crashes detected by Sentry
Sentry-Id: FLIGHTGEAR-68
Sentry-Id: FLIGHTGEAR-67
2020-10-29 16:22:35 +00:00
Automatic Release Builder
f4f261a068 Guard against data errors in rwyprefs.xml
AirportDyanmics::innerGetActiveRunway can unfortunately return an
empty string even when it return ‘true’. Check for this in the wrapper,
and switch to the fallback, to avoid returning a bogus runway to
other parts of the code.

Sentry-Id: FLIGHTGEAR-39
2020-10-29 16:22:35 +00:00
Automatic Release Builder
4ac8523bed SetupRootDialog: avoid calling exit()
This causes QApplication to become unhappy and crash, so use a
graceful exit via a new return code and FG_OPTIONS_EXIT instead.

Sentry-Id: FLIGHTGEAR-6B
2020-10-29 16:22:35 +00:00
Automatic Release Builder
582d539a1a Launcher: overhaul local -set.xml parsing
Fix the include context when -set.xml are parsed by the launcher to
extract states and other data. Ensure aircraft paths are available
and handled consistently with normal -set.xml parsing. Without this,
many -set.xmls fail to parse.

Sentry-Id: FLIGHTGEAR-4H
Sentry-Id: FLIGHTGEAR-3B
Sentry-Id: FLIGHTGEAR-3R
Sentry-Id: FLIGHTGEAR-3Q
Sentry-Id: FLIGHTGEAR-3F
Sentry-Id: FLIGHTGEAR-2R
Sentry-Id: FLIGHTGEAR-65
Sentry-Id: FLIGHTGEAR-42
2020-10-29 16:22:35 +00:00
Automatic Release Builder
2b54078023 Additional Sentry message ignores: add AC3D
These make the reports very noisy for no value.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
7597887e60 Fix Sentry issue: FGCom crash on exit
FGCom was added to the wrong group, leading it to be shutdown after
FGSoundManager, and hence, after OpenAL wad closed, which causes
crashes.

Sentry-Id: FLIGHTGEAR-66
2020-10-29 16:22:35 +00:00
Automatic Release Builder
d252740307 Adjust for changed SGXMLSound API
Detect bool return value from init(), use this to allow calmer
failures. Requires corresponding SG commit.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
632d5bc836 Launcher: first-run & help updates
Adjust the wording and links for these pages, after a review session
with Stuart and others. Include a link to the manual and short-ref
from the local installation.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
78c659ec87 Launcher: fix some minor glitches in Aircraft list
- updating of 'no results' box
- sizing of the headers when empty
- double-click to select of the search box when focused
2020-10-29 16:22:33 +00:00
Automatic Release Builder
9748b57971 Launcher: add update checker UI 2020-10-29 16:21:47 +00:00
Automatic Release Builder
1ef6578ad4 Fix scrolling of Launcxher FirstRun
Johnathan R pointed out that for wider windows, the button was
invisible, fix this will a scrollbar.
2020-10-29 14:54:04 +00:00
Automatic Release Builder
f8222da1da Launcher: add help page
Collect some standard information directly in the launcher. Text to be
reviewed, this is just a first draft.
2020-10-29 14:53:51 +00:00
Automatic Release Builder
4c48faf2c7 Remove log warning from geodinfo(), it's too noisy 2020-10-29 14:53:36 +00:00
Automatic Release Builder
c7b90a05d7 Silence a warning on exit. 2020-10-29 14:53:25 +00:00
Automatic Release Builder
cc2178f349 Launhcer: fix enabling/disabling hangars
Part of:
https://sourceforge.net/p/flightgear/codetickets/2380/
2020-10-29 14:53:01 +00:00
Automatic Release Builder
cd2d19f647 Launcher: add UX to enable developer mode 2020-10-29 14:52:51 +00:00
Automatic Release Builder
c7f66ecf1c Fix some warnings from Xcode 12 2020-10-29 14:52:19 +00:00
Automatic Release Builder
b727806bee Launcher: fix favourites behaviour with variants
Fixes ticket: https://sourceforge.net/p/flightgear/codetickets/2380/
Also add a UI prompt when no favourites are selected.
2020-10-29 14:51:45 +00:00
Automatic Release Builder
59e87d0570 Switch a message to MANDATORY_INFO 2020-10-29 14:51:32 +00:00
Automatic Release Builder
b38271f9ae Autopilot: don't warn on un-nmed APs
When no name is defined at all, suppress the 'duplicate name' warning.
2020-10-29 14:51:24 +00:00
Automatic Release Builder
0f01b0cbb6 Launcher: add help panel to instal aircraft
Based on some feedback on the tracker, when few aircraft are installed,
point users towards the 'browse' tab.
2020-10-29 14:51:12 +00:00
Automatic Release Builder
6c0cb998e3 Launcher: show sentry on/off setting everywhere
Since AppImage builds on Linux have Sentry reporting enabled, enable
the on/off UI everywhere
2020-10-29 14:51:02 +00:00
Automatic Release Builder
7ea138038e First-run page for the launcher.
Appears on first launch, gives us a chance to point out some policy
things and where to get help.
2020-10-29 14:50:49 +00:00
Automatic Release Builder
e5a9491d34 Launcher: fix local-weather warning
When a weather scenario doesn’t specify any local-weather data, we
will use METAR anyway, so remove the warning.
2020-10-29 14:50:38 +00:00
Automatic Release Builder
6178457097 Launhcer: Fix an incorrect file-path 2020-10-29 14:50:25 +00:00
Automatic Release Builder
191786d9a0 Launcher: Don't probe for states if the -set.xml is missing
This showed up as frequent exceptions from readProperties in the
launcher, when checking for states.

Sentry-Id: FLIGHTGEAR-2R
2020-10-29 14:50:13 +00:00
Automatic Release Builder
eb1d8a7dc8 Fix trafific crash that was reported.
Probably an edge case of and edge case, but let's guard for it anyway,
since it causes traffic to terminate.

Sentry-Id: FLIGHTGEAR-2Q
2020-10-29 14:49:53 +00:00
Automatic Release Builder
c75388f4b7 Sentry: white-list another libPNG warning
These are not useful for tracing, so filter them out
2020-10-29 14:47:57 +00:00
Automatic Release Builder
6e947f59eb Change MP on-runway-start message to MANDATORY_INFO 2020-10-29 14:47:48 +00:00
Automatic Release Builder
18aabbdbb5 AITraffic: workaround missing node
Avoid 'findShortestRoute' exception by checking both the start
and end nodes are valid first. Doesn't fix the error but avoids
a traffic shutdown.

Sentry-Id: FLIGHTGEAR-2F
2020-10-29 14:47:07 +00:00
Automatic Release Builder
77b6d635fe Multiplayer: change how we log activation
Use MANDATORY_INFO and set a Sentry tag when MP is active
2020-10-29 14:46:47 +00:00
Automatic Release Builder
39bc7f2acd Nasal: reduce exceptions from loadxml()
When the file path is not preset, check for this and don’t let
readProperties() fail with an exception, since this makes for very
noisy event reporting.
2020-10-29 14:46:35 +00:00
Automatic Release Builder
d803875997 Sentry: fix exception reporting formatting 2020-10-29 14:46:07 +00:00
Automatic Release Builder
063d7bf53f Move some warnings to Dev-mode
These are autopilot XML issues, so not useful for regular users.
2020-10-29 14:44:53 +00:00
Automatic Release Builder
c564c667df Sentry: avoid duplicate events for exceptions
Since fatalMessageBox already logs an event when it’s invoked, don’t
report the event a second time.
2020-10-29 14:44:40 +00:00
Automatic Release Builder
a2ba405d8e Sentry: log SimGear exception throws 2020-10-29 14:44:27 +00:00
Automatic Release Builder
d07360b37d Launcher: guard against missing data files
More robust checking that FGData is setup correctly, when we try to
parse defaults.xml from the launcher.

Relates to Sentry exception:
https://sentry.io/organizations/flightgear/issues/1901193353
2020-10-29 14:44:08 +00:00
Automatic Release Builder
db4e71955e Sentry: track compositor on/off 2020-10-29 14:42:24 +00:00
James Turner
dfcae619cf Crude startup logging.
To diagnose startup hang, will revert once we have fix the issue.
2020-10-29 13:44:59 +00:00
James Turner
58f0b4a16a TimeManager: expose the speed=up factor nicely 2020-10-29 13:44:59 +00:00
James Turner
423c754009 Reposition: tolerate more scenarios in ATC_mgr
When starting at an airport, but not at parking or a runway, create
an empty AIFlightPlan, and ensure the AIManager code doesn’t choke on
empty FPs.

Add a unit-test which simulates the C172 tutorial reposition logic,
which is a little gnarly.
2020-10-27 18:32:18 +00:00
Erik Hofman
46435edf19 The fixed 60 degrees offset at EHAL turned out to be the lattitude offset (actually 53.45 degrees): The moon seems to be dragging the tide with an almost perfect 45 degrees 'bow-wave' along the equator. 2020-10-27 08:31:54 +01:00
James Turner
7510f7d487 AI Fix a crash where a valid flightplan is assumed
Sentry-Id: FLIGHTGEAR-GX
2020-10-26 16:03:29 +00:00
James Turner
f2a108945d Expose version number parts in the header
This will avoid strutils::split to extract these values.
2020-10-26 16:03:29 +00:00
Erik Hofman
f24da5ac3d Fix tide levels to match th reported ones exactly, for today and months ahead 2020-10-26 10:24:33 +01:00
Erik Hofman
9a54ff575c Fix the calculation of the moons longitude since the moon does not specify xs but xg instead. This required a nasty strcmp of the body name so switch to parsing a boolean instead and convert to strings when required. 2020-10-26 10:23:54 +01:00
James Turner
afb43edbdf Make EDDF procedures work better.
Allow mis-match of STAR and approach, which is necessary for EDDF
operations. When there’s a mismatch, just route the common section
and don’t try to build a STAR -> approach transition.

Fix by Tobias Dammers.
2020-10-25 20:31:53 +00:00
James Turner
a21c0f9c16 Groundnet parsing: Fix exception for missing value
Sentry-Id: FLIGHTGEAR-CJ
2020-10-25 20:14:10 +00:00
James Turner
358fb70ee0 Catch XML errors parsing traffic files
Sentry-Id: FLIGHTGEAR-EQ
2020-10-25 20:14:10 +00:00
James Turner
fd630b6d37 Traffic: adjust failure of for reachedEndOfCruise
When reachedEndOfCruise fails, return true, so we trigger the next
phase of the flight. Without this we get stuck logging the error
message, but not progressing the flight.
2020-10-25 20:14:10 +00:00
James Turner
4bbff581f3 Fix crash in flight-plan UI
Sentry-Id: FLIGHTGEAR-ES
2020-10-25 20:14:10 +00:00
James Turner
3b01aaf33f Fix crash with missing airport in ATC
Sentry-Id: FLIGHTGEAR-ER
2020-10-25 20:14:10 +00:00
James Turner
e0bd74e982 RouteManager: validate changes to current-wp
Since FlightPlan::setCurrentIndex throws, ensure we validate the value
coming from the property before setting it.

Sentry-Id: FLIGHTGEAR-71
2020-10-25 20:14:03 +00:00
James Turner
4c3aa8b484 Check for missing file in several places
Replaces a ‘missing tag at line 1’ error with a simpler ‘file not
found’ message.

Sentry-Id: FLIGHTGEAR-5X
2020-10-25 20:01:57 +00:00
James Turner
9ebbfb90af Traffic: Fix crash in createTakeoff
Likely relates to repositioning, and a stale ‘active runway’ value.
2020-10-23 15:40:33 +01:00
Erik Hofman
029ad744b2 base the tides on the viewer, moon and sun longitude for an accurate prediction. 2020-10-22 20:44:42 +02:00
Erik Hofman
3e75668194 Remove references to unused functions 2020-10-22 15:26:51 +02:00
Erik Hofman
ef8dc106ce Explicitly set the daylight-saving time flag to zero since we specify in GMT 2020-10-22 12:02:28 +02:00
Erik Hofman
f3e47ef3b7 Switch to make_unqiue 2020-10-19 14:49:07 +02:00
Erik Hofman
23252df726 Move tide calculations from FGLight into it's own subsystem 2020-10-19 14:28:56 +02:00
Erik Hofman
5fcbd46d53 Switch to more modern C++ 2020-10-18 11:24:45 +02:00
James Turner
497636c3dc Fix for Linux build 2020-10-15 16:17:30 +01:00
Bertrand Coconnier
4049acd84e Bump the protocol version because Chris Speck's changes broke the backward compatibility. 2020-10-02 21:30:54 +02:00
Florent Rougon
8985626ad5 Fix LaRCsim build errors
The previous commit (88c2b7a83) used '#if ENABLE_UIUC_MODEL' instead of
'#ifdef ENABLE_UIUC_MODEL' in a few places, causing a build error.
2020-09-30 16:45:11 +02:00
Erik Hofman
88c2b7a833 Make LaRCsim work again when UIUC is dissabled. Unfortunately only the c172 seems to be stable. The Navion and Cherokee fail to trim at the runway. 2020-09-30 15:39:30 +02:00
Florent Rougon
b1b12a924f Simplify NavDataCache::NavDataCachePrivate::findDatFiles()
- Use a range-based for loop instead of an iterator.

- Don't bother checking if the previously-visited directory was the
  same: the potential saving that the previous code was hoping should be
  null because FGGlobals::append_fg_scenery() doesn't add a path to
  FGGlobals::fg_scenery if it's already there---this assumes that all
  paths added to FGGlobals::fg_scenery go through
  FGGlobals::append_fg_scenery(), of course.

This should have no effect on FG's behavior.
2020-09-30 11:09:44 +02:00
Erik Hofman
56d4662468 Next big step: proper ground reactions. Also make it possible to run fgfs --aircraft=aisim --aero=<aircraft> for different aircraft configurations (which requires an upcoming update to FGData 2020-09-25 13:19:10 +02:00
James Turner
5329c4024b Sentry experiment: record warnings/alerts
This means that when a crash/exception occurs, we can see the preceding
warnings and alerts. Not sure if this will really help, so giving it
a test.
2020-09-18 10:34:40 +01:00
James Turner
d56e3857b6 Fix sentry setting of dist
Was missing header and string conversion, oops.
2020-09-18 10:14:23 +01:00
James Turner
3b5b301e98 Launcher: Disable Qt 5.15 QML warnings 2020-09-17 21:45:39 +01:00
James Turner
aea0a1a12a Sentry: set dist (build) data 2020-09-17 21:45:39 +01:00
James Turner
3a69e20248 Reduce the default log-level for the launcher. 2020-09-14 11:05:46 +01:00
James Turner
cae06a79b7 Attempt to fix crash-on-exit seen for Windows
Can’t reproduce this crash but it’s happening for some users on Windows,
so this should either fix it, or make the problem more obvious. Let’s
see.

https://sentry.io/organizations/flightgear/issues/1890563449
2020-09-14 11:05:46 +01:00
Erik Hofman
f2a96eaa6c Stabilize the forces and moments, clean up the code some more 2020-09-10 11:41:06 +02:00
James Turner
4fc0948dbf Fix Windows compilation 2020-09-08 21:51:57 +01:00
James Turner
e26a2ecab0 Crash:harden against malformed menu bar entries
If a menu-bar item is missing a <name>, we can end up building a string
from nullptr, which is a SEGV.

Reported as Sentry issue FLIGHTGEAR-1D

Will back-port to LTS once verified.
2020-09-08 14:01:39 +01:00
James Turner
830a890eff Tests: skeleton ViewManager/Views tests 2020-09-08 12:31:42 +01:00
James Turner
1fe82206a0 Make view subscripting more robust
Trying to fix a crash raised by Sentry
2020-09-08 11:23:14 +01:00
James Turner
395a3e70e9 Logging: use new MANDATORY_INFO level.
Requires corresponding SG commit.
2020-09-08 10:59:29 +01:00
Erik Hofman
abb8ce0120 AISim: Implement a JSON configuration file reader, fix gear positions and engine thrust calculation. 2020-09-07 11:48:38 +02:00
James Turner
e46c6f587b AIFlightPlan: remove ‘erase’ option from Decrement
Thankfully, the erase option to DecrementWaypoint was never used, so
remove it, since it’s … mental.
2020-09-05 11:16:36 +01:00
James Turner
f802e09c57 ASan: QtMessageContext doesn’t copy file names
Use the ‘file name copying’ version of log(), to avoid an ASan use-
after-free. Note this requires SG change 
 908496d43dd7c3a7ca1de42b0e0c21aa0498c7df
to work correctly.
2020-09-05 10:44:43 +01:00
Slawek Mikula
c9d1d58146 [Launcher] #2316 - fixed sorting in the aircraft grid/listview.
When there are installed the same aircrafts from different sources 
(fgdata + fgaddon + git) with identical descriptions, use the URI to
provide stable sorting.
2020-09-05 10:44:43 +01:00
James Turner
f5b5828bd0 AIFlightPlan: add test for XML parsing
This meant some slight refactoring to expose some easier APIs for
testing, but the normal methods should be unaffected.
2020-09-05 10:44:43 +01:00
James Turner
3a3ff07883 Start testing FGAIFlightPlan 2020-09-05 10:44:43 +01:00
Erik Hofman
0272a4fa3f Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2020-09-04 16:03:39 +02:00
Erik Hofman
a95aaab0f4 use in-place declarations and clean up the code a bit 2020-09-04 16:03:04 +02:00
James Turner
2147eb8da9 Missed fixes from previous Yasim commit. 2020-09-04 13:05:11 +01:00
James Turner
d2fb16e071 Fix mismatched new/strdup/delete[] froub by ASan
See: https://sourceforge.net/p/flightgear/codetickets/2367/ for the
issue. Switch to using std::string instead of char*, and hence any
need to manually free the memory.
2020-09-04 12:41:56 +01:00
James Turner
4402d7b81d NavCache: only remove if the file exists.
Otherwise we block trying to re-create the cache, which is dumb. This
showed up as Sentry issue:
https://sentry.io/organizations/flightgear/issues/1875854826

Will back-port to 2020.2 once verified.
2020-09-04 12:29:45 +01:00
James Turner
1fd5502e9b Nasal removecommand: use a return value
Change removecommand() to indicate success or failure via a return
value: 1 for success, 0 for failure.
2020-09-04 10:56:41 +01:00
Erik Hofman
c6cb845f90 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2020-09-04 11:45:33 +02:00
Erik Hofman
6bd87586b0 Fix stability: CL and CD must be negative 2020-09-04 11:44:37 +02:00
Erik Hofman
e8fe8345bf Start using or own types for vectors and matrices for sharter and more readable code. Fix some sign issues 2020-09-04 10:58:18 +02:00
James Turner
9090d91be3 Fix a missed pu.h rename. 2020-09-03 20:25:14 +01:00
James Turner
61c6cfb050 AIAircraft: fix type of non-Swift aircraft 2020-09-03 17:51:40 +01:00
James Turner
d1fc4b58cb Start creating tests of AIModel code
First test just creates the manager, and ensures the user aircraft
updates in sync with the real aircraft.
2020-09-03 17:51:40 +01:00
Erik Hofman
ce1e85f656 Get the AISim FDM in a semi-flyable state 2020-09-03 14:39:38 +02:00
Erik Hofman
bdc66d5535 Rename our own version of pu.h to FlightGear_pu.h per James advice. Remove inclusion of pu.h where it isn't requirted. 2020-09-03 12:56:01 +02:00
Erik Hofman
0451816a82 Add our own version of pu.h and use it to prevent bug #2362 on all systems. This can be done since pu.h is to be considered in code freeze forever anyhow. 2020-09-01 10:12:42 +02:00
Scott Giese
ad2bf3cd09 Revert "Resolve Deprecation Warnings"
This reverts commit 8cede3f065.
2020-08-30 17:58:36 -05:00
Scott Giese
7b914bc5fb Removed unreachable code 2020-08-29 11:20:40 -05:00
Scott Giese
a87d9ca76f BezierNode: logic error in initialization 2020-08-29 11:03:31 -05:00
Scott Giese
532d879f72 Dead code removal 2020-08-29 11:00:55 -05:00
Scott Giese
e079f0d1eb Resolve warnings: comparison between unsigned and signed types 2020-08-29 10:15:02 -05:00
Scott Giese
8cede3f065 Resolve Deprecation Warnings 2020-08-29 10:12:35 -05:00
James Turner
37d820120d Unit-testing: tests for Nasal SGCommand API
Test adding/removing/invoking commands, and error handles when
duplicate adding and removing a command name.
2020-08-26 17:20:58 +01:00
James Turner
66f938be8e Sentry: fix naming clash. 2020-08-26 15:29:55 +01:00
James Turner
a882b75c9b Sentry: fix fatal-error event type. 2020-08-26 13:57:44 +01:00
James Turner
5dbab6e90e CMake: overhaul how we find 3rd-party files
Handle the standard windows-3rd-party setup (used by fgmeta) with no
extra options, and also handle the slightly odd setup we use on Jenkins.
Try to tolerate all permutations of setting MSVC_3RDPARTY_ROOT to 
different places in the hierarchy.

We no longer try to guess Boost_INCLUDEDIR by looking at parent dirs of
MSVC_3RDPARTY_ROOT, since this seemed kind of bad to me. Let’s try 
it and see.
2020-08-26 13:57:24 +01:00
Automatic Release Builder
9d775cdfe7 Fix duplicate init of Sentry on reset 2020-08-26 09:52:16 +01:00
Automatic Release Builder
73b4c3839d Sentry: more breadcrumbs 2020-08-26 09:52:09 +01:00
Automatic Release Builder
d9b7435dab Sentry logging of exceptions, fatal errors 2020-08-26 09:52:02 +01:00
Automatic Release Builder
bade1ec4c6 Attempt to fix ref-ptr crash on exit
Fixing Sentry issue FLIGHTGEAR-9
2020-08-26 09:51:55 +01:00
James Turner
06b026a218 GUI/knob animation: fire release binding over PUI
Fire the release bindings for active pick callbacks, even for a ‘handled’
mouse release. This means knobs, etc will fire their release binding
if the mouse is over a PUI dialog.

https://sourceforge.net/p/flightgear/codetickets/2347/
2020-08-25 20:48:29 +01:00
James Turner
8a1109160b Fix Nasal ‘removecommand’ so it actually works. 2020-08-25 19:23:43 +01:00
James Turner
cf424e4344 Rename buildId header file
Avoid the very common name ‘build.h’ in favour of something clearer
and FlightGear specific.
2020-08-24 15:05:16 +01:00
James Turner
178d1beb80 Cmake: Remove version.h machinery
Merge this file into config.h, this means we can save an include path
everywhere.
2020-08-24 15:04:24 +01:00
James Turner
6dfbda9bd1 Cmake: ifx abuse of OBJECT libraries
Use STATIC intermeidate libs for these pieces, to keep older CMake
versions happy.
2020-08-24 13:19:57 +01:00
James Turner
11932bac4e Trying to fix EnvironmentManager shutdown crash.
Not sure this will fix it, but it’s the only scenario I can spot so far,
so let’s try anwyay.

Reported at Sentry as: FLIGHTGEAR-8
2020-08-24 10:25:09 +01:00
James Turner
4fe8a118cc Traffic: Improve iterator robustness
Attempting to fix Sentry crash FLIGHTGEAR-B, crash on shutdown. Not
sure this is quite right, but the logic is clearer and we handle
invalid iterators better.
2020-08-24 10:23:50 +01:00
James Turner
95fd692af1 CMake: move install() rule for compatability
Older CMake versions can’t install(TARGET…) from a different directory.
2020-08-23 21:50:36 +01:00
James Turner
476b9eb3d1 Ensure OSG headers are founding building the UI 2020-08-23 21:10:56 +01:00
James Turner
f7dc02d009 Fix Swift build with CMake 2020-08-23 11:31:37 +01:00
James Turner
218df89b29 Embedded resources: better cmake command
Use add_custom_command and an intermediate OBJECT library to avoid
rerunning fgrcc unless the XML input file has actually changed.
2020-08-23 11:31:37 +01:00
James Turner
47ff3e9f67 Improve CMake strucutre 2020-08-23 11:31:37 +01:00
Scott Giese
63d3dd4cbd REVIEW: Memory Leak - FLITEVoiceSynthesizer ctor
1,696 bytes in 4 blocks are definitely lost in loss record 6,145 of 6,440
2020-08-23 00:21:11 -05:00
Scott Giese
0ce2fdf190 REVIEW: Memory Leak - PositionedOctree.cxx
1,728 bytes in 36 blocks are still reachable
1,280 bytes in 8 blocks are still reachable
480 bytes in 3 blocks are still reachable
2020-08-23 00:15:42 -05:00
Scott Giese
dc1519bfe8 REVIEW: Memory Leak - screensaver_control
2,056 bytes in 1 blocks are still reachable
352 bytes in 1 blocks are indirectly lost
320 bytes in 1 blocks are still reachable
2020-08-22 22:59:33 -05:00
Scott Giese
f84a522f12 REVIEW: Memory Leak - FGPUIMenuBar::add_enabled_listener()
3,920 (3,136 direct, 784 indirect) bytes in 98 blocks are definitely lost
2020-08-22 22:22:47 -05:00
Scott Giese
9d6239031f REVIEW: Memory Leak - wxRadarBg::init()
4,096 bytes in 1 blocks are indirectly lost
2020-08-22 21:48:52 -05:00
Scott Giese
6c14eaa6e8 REVIEW: Memory Leak - FGLinuxEventInput::postinit()
4,995 (40 direct, 4,955 indirect) bytes in 1 blocks are definitely lost
2020-08-22 21:26:03 -05:00