1
0
Fork 0
Commit graph

9479 commits

Author SHA1 Message Date
Rebecca N. Palmer
db825d3119 fix "QObject::connect: No such slot
NaturalEarthDataLoaderThread::onFinished()" error message
2016-08-15 23:10:06 +01:00
Rebecca N. Palmer
34394c91a9 fix hang on exit when multithreaded (bug 1830) 2016-08-15 07:58:40 +01:00
Erik Hofman
bd9e43e613 Fix a problem for MSVC 2016-08-12 11:48:34 +02:00
Rebecca N. Palmer
63ab28f0e6 QtLauncher: fix build with Qt < 5.4 2016-08-11 22:32:29 +01:00
James Turner
a60d07ea9c Incremental insert of NE data to the index. 2016-08-09 09:38:54 +01:00
James Turner
7cebc76b9d Async loading of NaturalEarth data for launcher. 2016-08-08 23:13:57 +01:00
James Turner
8577d74430 Move launcher summary to a separate tab.
This is an experiment to reduce the vertical height needed by the
launcher.
2016-08-08 17:47:09 +01:00
Erik Hofman
1c8542b65b Remove some debugging statements 2016-08-08 11:19:14 +02:00
Erik Hofman
fa99be7766 Use a bit less intrusive solution 2016-08-08 11:16:21 +02:00
Erik Hofman
02d037d205 Fix the startup position error. I'll leave it to Bertrand wether this is the best way to fix it 2016-08-07 11:41:03 +02:00
Torsten Dreyer
1947c100d9 Also use SBRJ as fallback.
Sigh. No real good idea how to /not/ hardcode this.
2016-08-06 23:12:43 +02:00
Alessandro Menti
2d86fc11ad Replace the NOAA METAR URL with the new, updated one 2016-08-04 20:34:34 +02:00
Erik Hofman
9ec4d7749f Add support for AeonWave 2016-08-04 18:43:10 +02:00
James Turner
ffdf542871 Launcher: fix ‘midnight’ time of day option.
TimeManager uses ‘midnight’ so we need to do the same.
2016-07-31 23:24:51 +01:00
James Turner
b06f4208e4 Adjustments to mouse picking API 2016-07-31 22:44:03 +01:00
James Turner
b8e2fb07df Port more HUD code to use line-segment list. 2016-07-31 22:44:03 +01:00
Erik Hofman
c17c3595c8 Set /sim/rendering/initialized to true at the appropriate moment and use it instead of /sim/initialized for the messagebox 2016-07-21 13:55:31 +02:00
Erik Hofman
08916602bb Make sure FlightGear is initialized before using the PUI dialog box, dump the the console otherwsise 2016-07-21 13:42:09 +02:00
Erik Hofman
e2216891be Move the PUI dialog code to James' new messagebox code and use that one instead for SG_LOG_POPUP to get a native popup window if available and fall back to a PUI one if not 2016-07-21 08:56:05 +02:00
Erik Hofman
5ab2d82c89 Show a popup dialog for every SG_POPUP message in the queue 2016-07-20 15:03:15 +02:00
James Turner
e30c886068 Adjust runway startup position with MP enabled
Relocate the start-up position to a plausible hold-short position
when MP is active and a runway start is requested. This does not (yet)
use ground-net data to identify a real hold-short position.
2016-07-17 21:11:14 +01:00
Erik Hofman
f1f2e9f21d Brendan Black:
when active does not touch the way the YASim jet calculates fuel flow, but separates out the afterburning component of thrust, calculates the TSFC of that component and uses the same method of fuel flow calculation for the afterburning component then adds it to the existing fuel flow

When inactive (atsfc doesn't exist or is zero) it just behaves exactly as before

I finally got around to testing this small patch thoroughly, and I'm satisfied that it doesn't affect anything else & works across many different versions (i've been testing it with current as it has changed over the last 7 months)
2016-07-17 11:30:07 +02:00
James Turner
4e239d2628 Fix persistence of on-ground location. 2016-07-16 18:23:48 +01:00
James Turner
07109d79f5 Improve rendering of longer parking names. 2016-07-16 17:49:12 +01:00
James Turner
e765d1c0fa Enforce a minimum pixel width for runway clicking
- ensures runways can be clicked when zoomed out.
2016-07-16 17:48:55 +01:00
James Turner
d90b8dcb33 Fix selection of parking positions by clicking. 2016-07-16 16:57:19 +01:00
James Turner
38202b0774 Launcher: show selected parking in yellow. 2016-07-16 12:07:34 +01:00
James Turner
4aee633be3 Fix starting up at a parking location.
Move parking-pos selection to finalizePosition, so that dynamics and
ATC controllers are available and work correctly.
2016-07-16 11:45:30 +01:00
James Turner
c0d93235de Fix for launcher always enabling MP 2016-07-15 22:48:37 +01:00
James Turner
100e8bf2b2 Further SGPath API usage improvements. 2016-07-15 16:49:13 +01:00
James Turner
ecb8ec57c0 FlightGear path API tweaks 2016-07-15 10:16:08 +01:00
James Turner
d800c49cb9 Custom MP server support. 2016-07-12 16:52:59 +01:00
James Turner
2eb5e6f0f4 Merge /u/jbicha/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/49/
2016-07-11 09:04:58 +00:00
Bertrand Coconnier
a1a7aa267c JSBSim sync.
* Fixed the initial conditions settings (geodetic altitude is now correctly computed).
* FGLGear reports the time at which it detected a violent ground hit (aka crash)
* Doc update of the kinematic component
* TurboProp code cleanup with the removal of lots of obsolete/no-op members.
2016-07-10 14:45:09 +02:00
Jeremy Bicha
25928bf614 Use CMAKE_INSTALL_BINDIR
Allow /bin install directory to be overriden. Debian for example uses this
to install FlightGear to /usr/games/ instead of /usr/bin/

https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
2016-07-09 18:52:58 -04:00
James Turner
9650cf4e6a Initial MP support in the launcher. 2016-07-08 09:36:54 +01:00
James Turner
7e607b8403 Fix fgValidatePath on Windows 2016-07-04 22:22:32 +01:00
James Turner
7870e03faf Build fixes for yasim tests / SGPath changes. 2016-07-04 10:17:41 +01:00
James Turner
400901c239 Update for changed SGPath::realpath signature 2016-07-04 09:06:42 +01:00
James Turner
8e875b22f5 fgValidatePath uses SGPath 2016-07-03 23:59:40 +01:00
James Turner
fc3d47cd34 More std::ifstream -> sg_ifstream 2016-07-03 23:48:44 +01:00
James Turner
7f3fe584e3 Update for path-aware easyXML API 2016-07-03 23:43:39 +01:00
James Turner
9cffcf63ae Further SGPath encoding fixes. 2016-07-01 04:54:29 -05:00
James Turner
40b74c4e32 Fix an assert on Windows 2016-06-29 16:25:42 +01:00
James Turner
0b11dd626a Further Windows SGpath fixes 2016-06-28 16:52:42 +01:00
James Turner
6d0c2070fd Use future-proof SGPath APIs.
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
2016-06-28 10:08:38 +01:00
Erik Hofman
1eb6fb65dd Use the SimGear sample format types 2016-06-27 13:21:13 +02:00
Bertrand Coconnier
54274a4b9c convert another path to std::string before using it to prevent a compiler error 2016-06-25 21:26:50 +02:00
Erik Hofman
e165fc5ebe convert the path to std::string before using it to prevent a compiler error 2016-06-25 15:00:35 +02:00
Erik Hofman
7f4fe977a1 Convert PKGLIBDIR to SGPath before returing it to prevent a compiler error 2016-06-24 12:54:01 +02:00
James Turner
16814800ce Use Paths instead of strings. 2016-06-22 17:36:05 +01:00
James Turner
03ecac9dbc Work with new SGPath API. 2016-06-22 17:36:05 +01:00
James Turner
6f95e61da8 For stable versions, download data tarball directly
Part of https://sourceforge.net/p/flightgear/codetickets/1865/
2016-06-17 22:48:24 +01:00
James Turner
1d912c91df Avoid overlap of ratings / progress bar
Part of issues mentioned in:

https://sourceforge.net/p/flightgear/codetickets/1865/
2016-06-17 22:42:33 +01:00
James Turner
e4e0db5cac Aircraft-states feature. 2016-06-17 18:15:35 +01:00
James Turner
3f7e59a1a5 Allow scenery installation from the launcher.
Replaces FGadmin functionality.
2016-06-15 22:28:54 +01:00
Erik Hofman
010d13445a Code cleanup after fixing the sound position and orientation 2016-06-14 14:11:12 +02:00
Erik Hofman
3963d2cdee Do not use properties but get the position and orientation information straight from the view manager 2016-06-13 13:50:40 +02:00
Bertrand Coconnier
a61c0bfdb4 Sync'ed with JSBSim: avoid the lag in <kinematic> while trimming. This allows the trim on ground for the P51 to succeed. 2016-06-12 17:04:35 +02:00
Bertrand Coconnier
dc7f065e08 Sync'ed with JSBSim:
* Fixed the trim on ground algorithm. Now JSBSim aircrafts should no longer be 'dropped' on the runway at start.
* Removed a correction on the propeller induced velocity that was giving erratic results when the aircraft aero velocity is very small.
* Various source comments updates.
2016-06-12 11:36:45 +02:00
James Turner
a3d660e423 Revert "Special case this define"
This reverts commit 58731a01e2.
2016-06-09 20:34:43 +01:00
James Turner
58731a01e2 Special case this define 2016-06-09 16:20:25 +01:00
James Turner
e672626558 Explicitly shut down logging
- needed to call FreeConsole on Windows.
2016-06-09 11:04:32 +01:00
James Turner
3a15b2f979 Launcher: fix a crash on searching locations
When hitting return multiple times, could hit a null-pointer
crash here.
2016-06-09 11:04:32 +01:00
James Turner
9c612af124 Improved feedback from scenery download. 2016-06-09 11:04:32 +01:00
James Turner
95f86b658c Hide add-ons tab when running launcher in-app 2016-06-08 12:00:35 +01:00
James Turner
861b682acf VS2015 fixes
Explicitly specialize these templates.
2016-06-01 22:57:11 +01:00
Erik Hofman
1a0f3d8826 Revert some debugging code which krept in 2016-05-28 10:05:09 +02:00
Erik Hofman
ea6e1c9854 Fix the header name change from sample_openal.hxx to sample.hxx 2016-05-28 09:57:03 +02:00
Bertrand Coconnier
f25304ace5 Tentative to fix JSBSim bug SF #115 : don't compute cl-squared when qbar is too low otherwise its value will go through the roof and so will the induced drag. 2016-05-27 13:50:35 +02:00
Erik Hofman
b9c2ddb94f Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2016-05-27 08:06:12 +02:00
James Turner
5d624b4882 Fallback URL when official catalog is not found.
Tolerate the case where a URL matching the exact FG version is
not found; lookup a generic URL, in the hope it supports our
version (additional changes will make this more likely)
2016-05-26 17:37:26 +01:00
Erik Hofman
94f6db5857 Prevent rf2 from becoming inf 2016-05-25 10:30:34 +02:00
Bertrand Coconnier
adeb0241ae Bug fix for JSBSim SF bug #115: P51D crashes when advance ratio goes through zero 2016-05-23 20:02:36 +02:00
Erik Hofman
013770b3f8 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2016-05-23 11:39:59 +02:00
Erik Hofman
6fb6446189 Fix file permissions 2016-05-23 11:39:40 +02:00
Erik Hofman
34011c1dec Code cleanups, code updates and fix at least on (possible) devide-by-zero 2016-05-23 11:38:05 +02:00
James Turner
7dfe556b4a Real fix for Mac deployment issues. 2016-05-21 14:00:29 +01:00
James Turner
f2273c7793 Testing if this change broke Mac deployment.
Hopefully it didn’t but the time-frame is correct and it’s just
about the only code that happens before QApplication is created.
2016-05-21 10:36:51 +01:00
Florent Rougon
959ac91a8b Add missing include in src/Navaids/NavDataCache.cxx
#include <sstream> is needed for NavDataCachePrivate::init()
which uses std::ostringstream.
2016-05-19 09:19:06 +02:00
Torsten Dreyer
a4a3659ee9 Expose the type (loc/vor) for the navradio 2016-05-18 08:28:27 +02:00
Richard Harrison
b128de3bc6 Fix MSVC10 compilation errors by using streams. 2016-05-12 12:05:28 +02:00
Richard Harrison
887916b26e Multiplayer packet boundary warnings
* Add warning if multiplayer packet boundary reached
* Add warning if string too big for remaining space in packet

ref: https://sourceforge.net/p/flightgear/mailman/message/35059961/
2016-05-12 09:38:03 +02:00
Edward d'Auvergne
977ec5063f Shift of management of the precipitation OSG scene graph to the scenery manager.
The precipitation branch of the OSG scene graph is now centrally managed by the
scenery manager rather the precipitation manager itself.  The scene graph
initialisation from the constructor has also been shifted into the new
FGPrecipitationMgr::sceneGraphSetup() function.
2016-05-03 18:44:46 +02:00
Edward d'Auvergne
b12a56b526 Prevention of the creation of multiple OSG scene graph roots.
As the scenery manager's init() function is called twice on start up, two OSG
scene graph roots would be created.  A number of scene graph branches would be
initalised on the first root, but then be lost as the second is created.  This
fixes the precipitation branch, for example.
2016-05-03 18:42:43 +02:00
Florent Rougon
2b8937c2c2 apt.dat parser: indentation fixes; add a comment
- The first place where indentation is fixed was really misleading, at
  least.

- The added comment "'line' may end with an \r character [...]" just
  clarifies something that has been there for ages, to avoid people
  falling into the trap.
2016-04-27 10:57:19 +02:00
Florent Rougon
d85fc7b7e7 apt.dat parser: various little improvements
- don't duplicate the line buffer (array of char as well as
  std::string), it is not useful here;
- don't corrupt (truncate) input lines longer than 2048 bytes: there is
  no such limitation in the apt.dat v1000 format spec;
- fix comments handling: the apt.dat v1000 format spec states they must
  start with *two* '#' characters.
2016-04-27 10:39:21 +02:00
Florent Rougon
b0b81bcd3e apt.dat parser: better input stream handling
- use ( in.getline(...) ) as the main loop condition instead of
  ( ! in.eof() ). This should behave better (see
  <https://gehrcke.de/2011/06/reading-files-in-c-using-ifstream-dealing-correctly-with-badbit-failbit-eofbit-and-perror/>);
- check in.bad() after exiting from each reading loop; if the exit was
  caused by an error, log an appropriate message and throw an
  exception.
2016-04-27 10:39:21 +02:00
Florent Rougon
d6f0bc6fb5 apt.dat parser: separately handle the first two lines; fix line counting
- The first two lines of apt.dat have their own special syntax -> handle
  them separately. Before this commit, the test "is the first character
  an 'I' or an 'A'?" was done for *every* line of apt.dat, while it is
  only relevant for the first one.

- Fix counting of the current line number (it was most of the time
  0-based so far, which could be seen in error messages, because the
  second line of apt.dat was absorbed without going through the common
  code path where lines are normally read at the top of the while loop).
  With this commit, line numbers in apt.dat are consistently counted
  starting from 1.
2016-04-27 10:39:21 +02:00
Florent Rougon
85653f04d4 apt.dat parser: remove useless code
Remove useless code before parsing the "row code" (terminology from the
apt.dat v1000 spec). The row code is parsed with atoi(), which will
automatically stop at the first space found if it saw at least one
digit, thus there is no need to replace it with '\0', AFAICS.

One could replace the existing atoi() call with things that do better
checking, but my tests showed that would be a bit slower, so I let it
this way (tried with std::istringstream and strtol()).
2016-04-27 10:39:21 +02:00
Florent Rougon
a43786f8dd apt.dat parser: clearer log and exception messages
- the 'apt_dat' variable introduced here will be used in further
  commits;
- use two spaces for indentation, as seen in most of the file.
2016-04-27 10:39:21 +02:00
Richard Senior
29fe6569c4 Fix incorrect QNH in spoken ATIS when using live weather fetch
When using live weather fetch, the QNH should be obtained from
environment/metar/pressure-inhg.

See: http://sourceforge.net/p/flightgear/mailman/message/35037125

Add new method getQnhInHg to ATISInformationProvider and its implementations
to avoid rounding errors converting from hPa back to inches in ATIS reports.

The CurrentWeatherATISInformationProvider (used when live weather fetch is
not in use) continues to use the property environment/pressure-sea-level-inhg.
This produces the incorrect QNH at airports significantly above sea level
but this needs fixing elsewhere to calculate the correct QNH.
2016-04-26 10:52:29 +01:00
Richard Senior
f825bb4f3c Eliminate use of non-standard round() function in ATISEncoder
Use of round() produces compilation errors with MSVC10 and the build server
2016-04-26 10:42:48 +01:00
Torsten Dreyer
5c0a477a47 Slightly better handling of setting initial pos
don't use KSFO as default when an unknown ID was
specified for --airport arg
TODO: don't hardcode default airport
2016-04-24 10:42:58 +02:00
Richard Senior
13f31782a1 Improvements to spoken ATIS
- Add section tag to support inclusion of ATIS fragments.

- Add visibility, QNH and cloud tokens to support new ATIS formats.

- Add support for starts-with, ends-with and contains comparisons in
  conditionals, including negated versions.

- Strip and convert case in comparisons.

- Speak VRB wind direction as "variable".

- Speak zeroes in fractional part of QNH inHg.

- Force US voice in US, Canada and Pacific; UK voice in UK.
2016-04-24 10:42:26 +02:00
James Turner
2da1d38c56 Clearer aircraft search prompt. 2016-04-17 18:00:37 +01:00
Alessandro Menti
98a6b60b00 Launcher: silence 'Unknown aircraft URI scheme' warning on empty selection
------------------------------------------------------------------------
If no aircraft is selected in the launcher, the routine
AircraftItemModel::indexOfAircraftURI is called with an empty QUri,
triggering a warning in the terminal.

This commit removes such warning by ignoring QUris with empty schemes
(the routine still returns an invalid index).
2016-04-17 17:55:05 +01:00
Alessandro Menti
550dde314f Launcher: do not launch the simulator when closing the Qt launcher with ESC 2016-04-17 17:54:41 +01:00
Alessandro Menti
4820026907 Launcher: fix window flags on the "Add catalog" progress dialog 2016-04-17 17:54:02 +01:00
Alessandro Menti
e9e05081d5 Launcher: state that it is needed to press Enter to search for the airport 2016-04-17 17:53:36 +01:00
Alessandro Menti
0381ba8468 Launcher: disable Close button on the initial progress dialog 2016-04-17 17:53:24 +01:00
Alessandro Menti
34fd51d35c Launcher: spelling fix in "Add Catalog" dialog window 2016-04-17 17:53:02 +01:00
Bertrand Coconnier
43f2daa7ae JSBSim: - Fixed the forces/hold-down feature. The velocities are now zeroed when the property is set which should prevent aircraft from drifting as has been reported by G. Agostinho.
- Fixed a bug that was skipping the <system> initialization.
2016-04-16 14:49:12 +02:00
James Turner
bbd15eb370 Fix a typo 2016-04-15 18:03:01 +01:00
James Turner
a63da0cbde Minor improvement to hangar list in the launcher. 2016-04-15 17:27:29 +01:00
James Turner
31cad6d384 Fixes to launcher description rendering. 2016-04-15 17:21:49 +01:00
James Turner
6095646a62 Prompt the user when the default hangar is missing.
In the Qt launcher, when the default hangar isn’t found, show
a hint in the aircraft list.
2016-04-15 17:06:53 +01:00
James Turner
c15e4753ac Different fix for traffic shutdown crash.
Fix for: https://sourceforge.net/p/flightgear/codetickets/1864/
2016-04-15 16:26:54 +01:00
James Turner
43add4f820 Fix stray back-button in Qt launcher
- when no location is set, don’t show the back button.
2016-04-14 18:54:27 +01:00
James Turner
7a36b96790 Update from SimGear API change
- support new HTTP cancellation API
2016-04-14 09:33:28 +01:00
Stuart Buchanan
56374621c5 Make LOD of buildings/trees/objects/STG configurable.
Now using /sim/rendering/static-lod/rough.
2016-04-08 22:38:17 +01:00
James Turner
5e4063b761 Move launcher settings store inside FG_HOME
Settings now in .ini format, at $FG_HOME/flightgear.org/FlightGear.ini
2016-04-08 10:40:26 +01:00
James Turner
5341d327fd Restructure paths handling in the launcher
- move the dialog into a new ‘add-ons’ tab

- separate out ‘restore settings’ from selecting a new fg-data

- actually relaunch the app
2016-04-08 10:26:34 +01:00
Torsten Dreyer
f837f1e808 Merge /u/sanhozay/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/35/
2016-04-07 09:47:01 +00:00
Richard Senior
78de2af130 Allow ATIS format specifications to compare tokens against text values
Prior to this change, it was only possible to compare the values of tokens
to each other for use in conditionals, e.g. landing and departing runway.
This change allows comparison of a token to a text value, e.g. to compare
wind speed to zero.
2016-04-07 00:58:34 +01:00
Erik Hofman
02174a1df6 Add the latest fixes and expose all inertias in the property tree 2016-04-06 14:26:30 +02:00
James Turner
ca6424f76a Fix a reset crash with pager threading.
Ensure pager thread is stopped before we touch
the sgUserData reference to the main props tree.
2016-03-28 23:50:47 +01:00
James Turner
08ea386197 Fix corrupt HUD fonts
osg::texture2D changes GL_UNPACK_ROW_LENGTH, which fntLoadTXF is not
prepared to deal with. Reset the value back to 0 before loading +
caching TXF fonts on the PLIB side.
2016-03-28 22:54:24 +01:00
James Turner
c29fa35840 Updated Canvas adaptor getImage API
Return the Image by ref ptr instead of raw pointer.
2016-03-26 20:25:31 +00:00
James Turner
e8398d5cee Fix Clang unused member warnings in JSBsim. 2016-03-26 20:24:57 +00:00
James Turner
6fc2403449 Fix iterator const-ness. 2016-03-24 20:23:39 +00:00
James Turner
5baca8598f Improve download-dir behaviour.
When set on the command line, will be used for aircraft packages. When
set in the Qt launcher, will also be used for aircraft downloads at
all times.

When changing the path in the launcher, the set of aircraft catalogs
is refresh automatically. Note the default catalog may need to be
re-installed.
2016-03-24 15:10:06 +00:00
James Turner
733e3b3f0c HTTP subsystem has a default name.
Switch to using type-safe accessors now.
2016-03-24 15:08:38 +00:00
James Turner
88bfaca2b3 New options setting/clearing helpers. 2016-03-24 15:05:03 +00:00
James Turner
ff7b82885f Fix for view look-at orientation bugs.
Force a manual re-calc of view parameters inside update. Will refactor
this in the future since shouldn’t really be necessary.

Ticket: https://sourceforge.net/p/flightgear/codetickets/1855/
2016-03-24 12:26:16 +00:00
James Turner
cbf16b7966 Fix copy-paste bug setting season in the Qt guy
Spotted by Adrian Serrano!
2016-03-22 10:56:05 +00:00
James Turner
d0c341fa47 Guard against a crash. 2016-03-22 10:42:21 +00:00
Erik Hofman
209194ecba Reload user preferences after reading the video configuration file 2016-03-21 11:50:11 +01:00
Florent Rougon
0cfa4ced9c Make --metar automatically imply --disable-real-weather-fetch
The --metar option has no effect unless --disable-real-weather-fetch is
also passed. This often makes users believe that --metar doesn't work.
Change the implementation for --metar so that it automatically implies
--disable-real-weather-fetch.
2016-03-20 19:56:18 +01:00
Torsten Dreyer
585b4a7f70 Fix "failed to load file: Models/..."
After removing /Models from FGData loading of shared models from
within a scenery model failed because the ResourceManager did not know
about additional scenery paths.
2016-03-19 21:08:24 +01:00
James Turner
74f17d2882 Fix missing menubar on Mac in some setups
- Only clear the OSG ‘pose as standalone’ flag when we really show
  a dialog, as opposed to when we /might/ show.

Tested:
 - Qt build using launcher
 - No Qt build 
 - Qt build but launcher not requested
2016-03-19 14:46:11 +00:00
Erik Hofman
e1bb47bc89 Add support for Video adapter rendering presets 2016-03-19 13:10:36 +01:00
Torsten Dreyer
1bf5fe1c27 Fix for FreeBSD and a typo
Fix provided by Ganael LAPLANCHE, thanks!
2016-03-12 20:55:46 +01:00
Torsten Dreyer
a1e81a2fdc Make some more noise if (stale) fgfs.pid file exists 2016-03-08 18:37:32 +01:00
Durk Talsma
31c66226e1 AI traffic refused to take-off, because the TrafficRecord destructor would unassign an AIAircraft from it's ATC. This caused it to get stuck in front of the runway and block all other traffic.
This patch may introduce an occasional crash on exit again, because it effectively undoes commit [a972df]. I'll try to find a better fix for that later on.
2016-03-06 21:23:26 +01:00
James Turner
43b4db7ef7 Improve UI around adding aircraft dirs
- Check if the selected path, or an ‘Aircraft’ subdir,  contains
some -set.xml files, and if not, warn the user.
2016-03-05 09:35:02 +00:00
James Turner
688ae7d156 Bugfix: Qt launcher, enable variant aircraft on-disk
When mapping a URI to a QModelIndex, we were only considering the 
primary aircraft path, for on-disk aircraft as opposed to packages.
2016-03-05 09:34:16 +00:00
Torsten Dreyer
4f8cbbb204 Fix #1851, wrong type in multiplayer messages
See https://sourceforge.net/p/flightgear/codetickets/1851/
for details
2016-02-29 22:29:32 +01:00
James Turner
1aa6482a59 Fix bug #1845, closing the Qt launcher
Intercept the close event and quit the app instead of continuing to
run the main FlightGear application.

https://sourceforge.net/p/flightgear/codetickets/1845/
2016-02-24 21:50:48 +02:00
Rebecca N. Palmer
41b78ce150 Nasal security: allow reading explicit --terrasync-dir
(but not /sim/terrasync/scenery-dir - https://bugs.debian.org/780716 )
Needed for animated jetways:
https://sourceforge.net/p/flightgear/mailman/message/34870606/
2016-02-21 20:25:02 +00:00
James Turner
de959a14f3 Rename Viewer/viewer.cxx to view
- keep class and file names in sync.
2016-02-17 21:25:39 +00:00
James Turner
1515154e12 View::updateData becomes a private helper. 2016-02-17 21:25:39 +00:00
James Turner
5b81333768 View offset/target-offset props are tied
- make these View properties work like all the others, i.e
  bound and unbound when the view changes.
2016-02-17 21:25:39 +00:00
James Turner
5629cf1a8d Remove legacy ‘axes/lat’ and ‘axes/long’ props.
- only exits to support some legacy joystick hat configs,
  which have been updated to use the goal- properties directly.
2016-02-17 21:25:39 +00:00
James Turner
7b08c621b4 Make many View APIs private
- many things are now only needed by tied methods, and 
  hence can be made private.
2016-02-17 21:25:39 +00:00
James Turner
a3382fec6d Simplify setting view eye/target offsets 2016-02-17 21:25:39 +00:00
James Turner
e404ebc38a Sink more properties into View 2016-02-17 21:25:39 +00:00
James Turner
27d739084a View-manager binds like a normal subsystem.
- no longer need the unusual init-bind order
2016-02-17 21:25:39 +00:00
James Turner
00a4f1ecbb Clean up view-number property handling 2016-02-17 21:25:39 +00:00
James Turner
ae1d96cdfb Move FOV property into View 2016-02-17 21:25:39 +00:00
James Turner
daf8c79705 View-Mgr absolute position is gone. 2016-02-17 21:25:39 +00:00
James Turner
65d5038962 Tie view orientations directly
- remove need for cached orientations in view-manager
2016-02-17 21:25:39 +00:00
James Turner
3171cbce75 copyToCurrent removed. 2016-02-17 21:25:39 +00:00
James Turner
bf69781ae0 Remove dead code. 2016-02-17 21:25:39 +00:00
James Turner
fa4a5e7a64 Better types for eye/target position 2016-02-17 21:25:39 +00:00
James Turner
03d5e55b57 Move data updating into the View class 2016-02-17 21:25:39 +00:00
James Turner
7391b9d76a ViewManager::copyToCurrent is a no-op 2016-02-17 21:25:39 +00:00
James Turner
655ac851e0 Start moving view-manager logic into View
- work in progress, goal is to make copyToCurrent and most of
  the bind/unbind logic sink into each specific View, avoiding all the
  null pointer checks in view manager.
2016-02-17 21:25:39 +00:00
James Turner
8c918c6cec Make View::set_clean private. 2016-02-17 21:25:39 +00:00
James Turner
d4d2121641 View can created itself from config properties
- use in view manager
- make View constructor private
2016-02-17 21:25:39 +00:00
James Turner
02ff854603 Re-Name FGViewer to flightgear::View
- avoids confusion with osgViewer and fgviewer application.

(source files to be renamed in a follow-up commit)
2016-02-17 21:25:39 +00:00
James Turner
e60d9a191e Viewer: move camera-group to view manager
- also devirtualise many methods in FGViewer
2016-02-17 21:25:39 +00:00
Edward d'Auvergne
97f8cdaaea Fix for the particle system.
The problem was that the change to make FGScenery a standard subsystem caused
the particle OSG group to no longer be inserted into the scene graph.  The
solution was to convert the particle group to be set up as a standard branch of
the scene graph, alongside the terrain, models, aircraft, and interior branches.
The particle system is now set up as part of the init() subsystem function call,
so it is compatible with the new subsystem design.
2016-02-16 17:33:40 +01:00
Edward d'Auvergne
34daa4de0b HUD fix for MSVC math.h incompatibility with C-99 and the round() function. 2016-02-11 19:36:32 +00:00
Rebecca N. Palmer
e1d0699bdb add new QtFileDialog to avoid using Nasal in file selectors
(and hence avoid applying Nasal security rules to them)
2016-02-10 22:58:56 +00:00
Rebecca N. Palmer
16e6009255 Nasal security: give a more user-friendly error on self-check fail
https://sourceforge.net/p/flightgear/mailman/message/34701972/
2016-02-10 22:54:52 +00:00
Edward d'Auvergne
c889198d09 Redesign of the latitude and longitude formatting for the HUD.
This follows from http://thread.gmane.org/gmane.games.flightgear.devel/78650 and
resolves the sign bug https://sourceforge.net/p/flightgear/codetickets/1778/ .

Combined with a matching change to FGData, this changes the HUD formats from the
current set of 3 (note that the text in brackets is not shown in the HUD
preferences PUI dialog, but is show here for reference):

    0) Decimal degrees (37.618890N -122.375000W)
    1) Degrees, minutes (37*37.133N -122*22.500W)
    2) Degrees, minutes, seconds (37*37 08.0 N -122*22 30.0 W)

to (here the text in brackets will be shown in the PUI dialog):

    0) DDD format (37.618890N 122.375000W)
    1) DMM format (37*37.133'N 122*22.500'W)
    2) DMS format (37*37'08.0"N 122*22'30.0"W)
    3) Signed DDD format (37.618890 -122.375000)
    4) Signed DMM format (37*37.133' -122*22.500')
    5) Signed DMS format (37*37'08.0" -122*22'30.0")
    6) Zero padded DDD (51.477500N 000.461389W)
    7) Zero padded DMM (51*28.650'N 000*27.683'W)
    8) Zero padded DMS (51*28'39.0"N 000*27'41.0"W)
    9) Trinity House Navigation (51* 28'.650N 000* 27'.683W)
2016-02-10 21:49:56 +00:00
Rebecca N. Palmer
f749953493 Nasal security: don't break file dialogs
Include the directory itself when allowing reading
Don't kill the script on a denied directory read
2016-02-09 23:17:41 +00:00
Rebecca N. Palmer
74356e84f7 Nasal security: make directory() use fgValidatePath
Being able to list arbitrary directories is a privacy violation;
existing in-fgdata uses of this are all permitted paths
(i.e. not Terrasync; FileSelector doesn't use it)
2016-02-06 21:26:05 +00:00
James Turner
c72309360e Defensive handling of locales.
- Use setlocale() to ensure consistent handling of locales and
  string handling irrespective of whether or not QCoreApplication
  is invoked. Forces a the C locale for numerics and collation,
  since many pieces of FG assume this.
2016-02-02 20:44:46 +00:00
Erik Hofman
5ef3413373 Add the latest batch of JSBSim changes. Tested with the Shuttle 2016-01-29 12:23:58 +01:00
James Turner
9172a8a8a9 VS2013 fixes for some FDMs. 2016-01-27 14:00:09 +00:00
James Turner
bb9fd9defe Fix a bug with updating packages.
- always refresh the catalogs each launch, so we don’t get mismatches
  between the cached copy the and package zips.
2016-01-26 16:46:58 +00:00
James Turner
acb630095d Possible fix for Mac strncmp crashes. 2016-01-26 07:48:30 +01:00
James Turner
2677b3a226 Use target_include_directories in some places.
I didn’t know about this feature when doing the original CMake files,
we can use this to target header-file includes more precisely.

(Probably more cases exist that can be changed from global to target-
specific includes)
2016-01-26 07:48:30 +01:00
Gijs de Rooy
9e7c3c5c89 Fix #1744: disable commradio when unserviceable 2016-01-25 16:38:57 +01:00
James Turner
81792bd6d0 Adjust fg root processing order
- ensure fg-root and FG_ROOT are higher precedence than the Qt gui
2016-01-19 18:32:20 -05:00
James Turner
d81d353940 Improved fg-root control from the Qt Launcher
- add a button to the main dialog, explaining how to adjust the 
  fg-root path via the GUI
- tweak the GUI flow to support explicitly changing the path even
  when the default path is acceptable.
2016-01-18 20:06:43 -05:00
bcoconni
bf851605fb Fixed a bug which caused the solid propellant thrusters of the space shuttle to be unconditionnally ignited during the trimming. 2016-01-17 10:26:25 +01:00
James Turner
e37e0d1bcf New log class for TerraSync 2016-01-16 15:50:13 -06:00
Bertrand Coconnier
95b932e9b3 JSBSim dropped the support of the simplex trim code 2016-01-16 19:36:32 +01:00
Bertrand Coconnier
f526dcdf3a Fixed the initialization process for JSBSim models: the error message "FGTrim::calcRotation DistPlane^2 larger than sqrRadius" should no longer be issued 2016-01-16 19:32:50 +01:00
bcoconni
4d2f9e7955 Remove the error message about the property atmosphere/P-sl-psf that can't be tied 2016-01-16 13:14:51 +01:00
Torsten Dreyer
6f09b9e31e httpd: expose /fg-home and /fg-root 2016-01-13 13:25:16 +01:00
James Turner
e3fe8ae199 Log options to INFO level when processing
- ensures they occur in the fgfs.log which should aid problem
  tracing.
2016-01-12 17:33:57 -06:00
James Turner
eb0f724c13 Fix a typo breaking some takeoff-state logic. 2016-01-12 17:26:06 -06:00
James Turner
e32b02b28f Launcher: fix slot name for old-style syntax 2016-01-12 17:25:54 -06:00
James Turner
ef1fd62b4b Fix an unused variable in non-developer-warning mode. 2016-01-12 12:50:58 -06:00
James Turner
a549c8fe45 Fix unused constants in YASim 2016-01-12 12:50:44 -06:00
James Turner
c62b004438 Fix many clang errors in UIUC code
- because uiuc_warning_error always called exit(-1), it can be marked
  no return, so Clang realises that when it’s used in the ‘else’
  side of a parsing test, uninitialised variables in the enclosing
  call site are safe.

(Requires Simgear update to define SG_NO_RETURN helper)
2016-01-12 12:50:31 -06:00
James Turner
dc17b5dda2 Fix unused variable in LaRCsim 2016-01-12 12:49:14 -06:00
James Turner
a972df05dc Fix a potential use-after-free in ATC code
- when dynamics shuts down the ATC controllers, they clear their
  traffic vectors (destroying the records), but we didn’t notify
  the AI aircraft of this. Ensure the controller is cleared so
  the AI aircraft shutdown doesn’t crash.
2016-01-12 12:22:23 -06:00
Erik Hofman
508c367c5b Sync. again 2016-01-12 19:05:51 +01:00
Erik Hofman
6e1b5e9f2e Fix a singed/unsigned warning 2016-01-12 19:05:51 +01:00
Torsten Dreyer
296849cf3d Fix a bug for allowed paths
Under some conditions on my system
aircraft_paths.begin() was equal to scenery_paths.end()
This resulted in neither of them being added to read_allowed_paths
followed by failure to load Nasal scripts from the aircraft directory.

This might happen, if scenery_paths gets allocated just before aircraft_paths
in memory.
Better loop across the desired lists instead of using fancy tricks with
the iterator.
2016-01-12 11:19:26 +01:00
James Turner
0250d2ee5b Bugfix: pause works for JSBsim/Yasim again 2016-01-11 11:47:40 -06:00
Erik Hofman
f19c8ac05d Apperently maybeRestoreAircraftSelection() needs to be a slot 2016-01-11 09:46:16 +01:00
James Turner
409ffc971d Fixes to launcher aircraft delegate.
- fix some text size computation issues
2016-01-10 23:46:44 -06:00
James Turner
4396c035df Linux build fix. 2016-01-10 22:11:32 -06:00
James Turner
f2bf30bcc7 Current time of day (warp) fixes:
- sim-speed-up (a/A keys) offsets warp correctly. This means at 4x speed
  up the warp will increase by 3 seconds for one elapsed real second.
  In practice this means simulation elements timed using sim ‘current time’
  will be correctly synchronised with those using simulated elapsed time.

  (AI traffic being a prime example of this)

- warp-delta (t/T keys) is independent of frame rate, and works when
  paused. The warp-delta values in the keybindings / GUI dialog
  will need to be updated since warp-delta in now seconds-per-second,
  as opposed to seconds-per-frame.
2016-01-10 22:10:10 -06:00