1
0
Fork 0
Commit graph

14548 commits

Author SHA1 Message Date
James Turner
5e04aab318 QtGraphicsWindow: Remove deferred event support.
No longer needed, since we are using windows, not a widget.
2017-06-10 15:49:09 +01:00
James Turner
09972be25a Expose device-pixel-ratio to properties.
This allows scaling of the UI accordingly, to keep things usable on
HiDPi screens. (Note this is not fixed yet, but this is a step)
2017-06-10 15:48:11 +01:00
James Turner
4d900a5c26 Strong and stable ownership of the window, context
Use owning pointers in GraphicsWinQt to own the GLwindow and QOGLContext,
so shutdown is more orderly, especially when driven from the OSG or
window-manager, as opposed to an ‘internal’ quit.
2017-06-10 15:46:16 +01:00
Bertrand Coconnier
34a0c6c2a8 Make some methods public for the AI wake feature.
In order to compute the AI aircrafts wake, the FDM will need access to the list of AI aircrafts as well as being able to compute their range to discard aircrafts which are too far.
2017-06-10 15:28:28 +02:00
James Turner
40cc4cc02c Let Qt pick the default window position.
(For GraphicsWindowQt5 only)
2017-06-08 15:18:23 +01:00
James Turner
bafcf2de38 GraphicsWinQt toggles fullscreen natively.
This also improves handling when starting full-screen, and keeps the
window and internal state in sync.
2017-06-08 14:51:38 +01:00
James Turner
0c59583b32 Fix intermittent crash on exit with Qt+XCB
We can still crash on exit(-1) code paths since we can’t run this from
atexit, but at least the non-error paths are ok.
2017-06-07 17:52:47 +01:00
Florent Rougon
889c1bf0cb Remove alignLocaliserWithRunway(): deemed to be a "misfeature" :-)
In the thread at
<https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/87tw7sm5uw.fsf%40frougon.crabdance.com/#msg35673402>,
it was decided that alignLocaliserWithRunway() was a bad idea overall,
and should just be removed. The feature was already disabled by default
in recent releases via defaults.xml (since FlightGear 2017.1, precisely
FGData commit ea76305e42fd245e79a2b5bb569c8c61161f5721). Remove the code
entirely now.

The properties /sim/navdb/localizers/auto-align and
/sim/navdb/localizers/auto-align-threshold-deg have no effect anymore,
you may remove them from your configs if you somehow set them.

This goes with FGData commit 6dd9f6e8d962b00a1ccddc6af487c404cc935b92.

In case someone wanted to reuse the removed code, please consider
Szymon's proposed change at
<https://sourceforge.net/p/flightgear/flightgear/merge-requests/76/>,
which was:

,----
| Fixed bug in alignLocaliserWithRunway when building NavCacheDb
|
| The position of the localizer was converted to a distance from
| the displaced threshold, and then back to the posistion on the
| centerline, but the origin of the second computation was
| non-displaced threshold.
|
| --- a/src/Navaids/navdb.cxx
| +++ b/src/Navaids/navdb.cxx
| @@ -104,8 +104,8 @@
|  void alignLocaliserWithRunway(FGRunway* rwy, const string& ident, SGGeod& pos, double& heading)
|  {
|    assert(rwy);
| -  // find the distance from the threshold to the localizer
| -  double dist = SGGeodesy::distanceM(pos, rwy->threshold());
| +  // find the distance from the (non-displaced) threshold to the localizer
| +  double dist = SGGeodesy::distanceM(pos, rwy->geod());
|
|    // back project that distance along the runway center line
|    SGGeod newPos = rwy->pointOnCenterline(dist);
`----
2017-06-07 14:03:32 +02:00
James Turner
444864c7ba GraphicsWindow using Qt5, work-in-progress.
Enable by setting:
	/sim/rendering/graphics-window-qt=1

Known issues with HiDPI scaling of PUI & Canvas, and probably many
other issues besides.
2017-06-07 08:23:17 +01:00
James Turner
8bad6f11e5 Merge /u/elgaton/flightgear/ branch disable-deprecated-enhanced-lighting-and-adf into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/99/
2017-06-06 12:10:35 +00:00
James Turner
aac0085253 Merge /u/elgaton/flightgear/ branch new-man-pages into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/98/
2017-06-06 12:08:50 +00:00
Bertrand Coconnier
1a0e5a20ae Fixed LaRCSim matrix computation routines.
There was a couple of typos in the routine. This code will be used by the AI wake feature.
Also added a test for the matrix code to make sure they will be no regression.
2017-06-05 17:18:52 +02:00
Bertrand Coconnier
7d80a48d94 Sync. w/ JSBSim
External moments can now be specified in addition to external forces. This feature is needed for the AI wakes.
Headers clean up to reduce the amount of recompilation when modifying an header file.
2017-06-05 13:09:00 +02:00
Alessandro Menti
7245357751
Mark enhanced lighting options and --adf as deprecated
Print an error message and exit if --{enable,disable}-enhanced-lighting
or --adf are used (those deprecated options will be removed in a future
version of FlightGear).
2017-06-04 16:56:17 +02:00
Alessandro Menti
aa090b5f21
Man pages update
Add man pages for those programs that did not have one (exceptions:
yasim and yasim-proptest) and update the existing ones to make them
compliant with man-pages(7) conventions.
2017-06-04 15:34:50 +02:00
Richard Harrison
ac89ec94a3 Console: restore option to open console early. 2017-05-31 11:38:13 +02:00
Richard Harrison
16a7493de7 Fix --console from the launcher 2017-05-30 17:59:34 +02:00
James Turner
7951abefe2 Auto-select built-in FGdata when possible.
As spotted by Thorsten, reduce user annoyance by asking about FGData
when the built-in data is acceptable. (Advanced users can use the
launcher or other options to change FGdata as normal).
2017-05-30 10:02:41 +01:00
Edward d'Auvergne
d2a6eb69a5 Clean up of the Ephemeris class members, removing the raw pointers.
The property nodes have been switched to SGPropertyNode_ptr and _impl to std::unique_ptr.
2017-05-30 09:57:37 +02:00
Edward d'Auvergne
a0dc7b5ba3 Untied the /environment/moonlight property. 2017-05-29 09:47:31 +02:00
Bertrand Coconnier
24a148880c Fixes to the trim on ground feature.
* Skip the gears when located over water. They will be skipped by the ground reactions anyway making the trim irrelevant.
* Ignore the ground bumpiness during the trim. The trim algorithm seems not to
be robust enough to handle that. This does not make much difference to the
converged solution anyway since the bumpiness is generally low.
* Fixed the WOW status for contacts over water (was 'false' is now 'true').
* All the gear/contact data are now properly reset when WOW==false. The reset
code is now common to all the case where WOW is false.
2017-05-28 20:14:33 +02:00
Bertrand Coconnier
76ef08679d Cleaned up the JSBSim interface. 2017-05-28 20:12:30 +02:00
Alessandro Menti
f1ffe97991
Add CMake Linux install directives for the icons and the .desktop file 2017-05-24 22:47:01 +02:00
James Turner
eb5d482ded Use GetUserDefaultLocaleName
This should improve our locale detection on Windows, since it is the recommended
solution according to MSDN.
2017-05-22 17:50:50 +01:00
James Turner
27b34182c7 Launcher: Enable DPI-scaling
(for Windows especially)
2017-05-22 08:53:27 +01:00
James Turner
15c84139fa Fix launcher failure with custom MP server
When the user specified an MP server without providing a port, the
launcher would pass a malformed command line, leading the the simulator
bailing out. 

(Should go to the release branch)
2017-05-22 08:53:27 +01:00
James Turner
18b8b59af6 Validate MP callsign with a reg-exp 2017-05-22 08:53:27 +01:00
James Turner
42508619ee Validation of METAR in the launcher 2017-05-22 08:53:27 +01:00
Richard Harrison
0c4eaa8b29 Canvas exception during re-init.
Add defensive logic to ensure that a null pointer isn't dereferenced. This happened to me once or twice during a reinit (Location/Position In Air to the current position). It may be related to the model, but in any case the code needs to ensure that the static cast failure is handled correctly.
2017-05-20 13:40:02 +02:00
Richard Harrison
ee951c00e7 2017.2 Multiplayer compatibility fixes
2017.2 in compatible mode was not compatible with 2017.1.x because the V1 packet had V2 properties in it; the protocol version and the new launchbar encoding - both of which should not be transmitted. This only affected 2017.1 because it discards the rest of the packet once an unknown property is encountered (to increase reliability).
2017-05-20 13:32:03 +02:00
Alessandro Menti
ef66ba69c1
Remove distribution-specific packaging files and an old icon
Remove obsolete *NIX packaging files (they have not been updated in a long
time, and packaging is handled by each Linux distribution), plus an old,
generic FlightGear icon used exclusively by the Debian package and not
matching the official logo.
2017-05-18 23:57:08 +02:00
Automatic Release Builder
386196ad4e new version: 2017.3.0 2017-05-18 15:15:52 +02:00
Automatic Release Builder
d562b6147f new version: 2017.2.1 2017-05-18 15:15:52 +02:00
Florent Rougon
a43b9f4a59 org.flightgear.FlightGear.desktop: add Spanish and Catalan translations
Thanks to Catalanoic.
2017-05-18 12:23:06 +02:00
Florent Rougon
4167b40bfc Add and improve translations in package/org.flightgear.FlightGear.desktop
Thanks to Chris Blues, Thorsten Renk, Alessandro Menti,
Andrius Štikonas, Erik Hofman, Chimpa Theist, Emilian Huminiuc
and 梁思地 (Sidi Liang) for their translation work (sorted by
locale name!).
2017-05-18 10:00:57 +02:00
Richard Harrison
ffde50484c Added support for multiplay/generic/bool[0..90] packed into three ints of 31 bits.
Add support for per property encoding.
- encode_for_transmit  - method that will convert from and to the packet for the value.
- decode_received - decodes received data
2017-05-18 00:15:59 +02:00
Torsten Dreyer
406f158067 Change fallback airport to KBOS 2017-05-17 22:34:38 +02:00
Florent Rougon
0cc46a1179 Update (obsolete!) package/debian/rules to use the renamed desktop file
Just for consistency and cleanliness, following commit
4b48aca411. The 'package/debian' directory
is going to be removed soon, anyway[1].

The 'RedHat' and 'openSUSE' directories in 'package' don't need such a
change, because they use their own desktop file (and they should also be
removed after the 2017.2.1 release).

[1] https://sourceforge.net/p/flightgear/flightgear/merge-requests/92/
2017-05-16 21:44:24 +02:00
James Turner
e288ff7fe2 Use osg::createTexturedQuadGeometry
Simplifies splash screen code slightly.
2017-05-16 17:14:08 +01:00
James Turner
3c8bedb9c3 Make launcher summary version dynamic. 2017-05-16 13:25:51 +01:00
Florent Rougon
4b48aca411 Rename flightgear.desktop to org.flightgear.FlightGear.desktop; improve it
This closes ticket #1961
(<https://sourceforge.net/p/flightgear/codetickets/1961/>). To be sure
the file is found, call app->setDesktopFileName() in
src/GUI/QtLauncher.cxx if the Qt version is 5.7 or later.

See <https://sourceforge.net/p/flightgear/mailman/message/35840997/> and
<https://sourceforge.net/p/flightgear/mailman/message/35841007/> for the
small changes to the desktop file contents.
2017-05-16 13:58:37 +02:00
Florent Rougon
2280bd83c7 Improve package/flightgear.desktop
See discussions at
<https://sourceforge.net/p/flightgear/mailman/message/35827063/> and
<http://lists.alioth.debian.org/pipermail/pkg-fgfs-crew/2017-May/001864.html>
for the added keywords, etc.

This conforms to:

  https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

(spec currently at version 1.1, hence the Version field)
2017-05-15 16:55:25 +02:00
Florent Rougon
034fb89db3 Abort with a clear error message for invalid uses of --config inside a config file
The options.cxx code is not ready to handle recursive use of --config
(for config files). Instead of failing in an ugly way, abort with a
clear error message in such situations. See discussion at
<https://sourceforge.net/p/flightgear/mailman/message/35838852/>.

Note: it *is* possible to load XML PropertyList files from config files,
      so --config is not entirely "banned" from config files.

+ add missing include
2017-05-15 11:06:47 +02:00
Florent Rougon
6ef8b5bf94 Qt launcher: more spelling fixes 2017-05-13 17:17:32 +02:00
Alessandro Menti
42495e3251
Qt launcher: spelling fixes 2017-05-13 10:24:17 +02:00
Torsten Dreyer
7d12c9fe36 Fix broken build due to undef'd ref in test_flightplan 2017-05-12 09:22:41 +02:00
James Turner
327f59a105 Fix new splash screen with Rembrandt enabled
Stray depth-test state was causing the splash quad to be discarded.
2017-05-11 23:02:40 +01:00
Rebecca N. Palmer
faf872e7f7 RouteMgr security: don't allow overwriting arbitrary files
(the previous fix 280cd523 missed commandSaveFlightPlan)
2017-05-11 22:21:20 +01:00
Richard Harrison
b80b9a8fc0 Added Nasal methods for ground intersection test and aircraft coordinate conversion
New Nasal method get_cart_ground_intersection

Returns where the given position in the specified direction will intersect with the ground. Returns whether or not a certain position and direction pair intersect with the ground, and if so the intersection point.

Useful for radars, terrain avoidance (GPWS), etc.

Input parameters:
1. vec3d(x,y,z) position
2. vec3d(x,y,z) direction

Returns nil or geod hash (lat:rad,lon:rad,elevation:Meters) intersection

Example Usage:

var end = geo.Coord.new(start);
end.apply_course_distance(heading, speed_horz_fps*FT2M);
end.set_alt(end.alt() - speed_down_fps*FT2M);

var dir_x = end.x() - start.x();
var dir_y = end.y() - start.y();
var dir_z = end.z() - start.z();
var xyz = { "x":start.x(),  "y" : start.y(),  "z" : start.z() };
var dir = { "x":dir_x,      "y" : dir_y,      "z" : dir_z };

var geod = get_cart_ground_intersection(xyz, dir);
if (geod != nil) {
         end.set_latlon(geod.lat, geod.lon, geod.elevation);
          var dist = start.direct_distance_to(end)*M2FT;
         var time = dist / speed_fps;
         setprop("/sim/model/radar/time-until-impact", time);
     }

-----------

Nasal method aircraftToCart : This allows easily computing offsets in aircraft-relative coordinates, and converting to global cartesian (ECEF) reference frame.
2017-05-11 20:05:14 +02:00
Florent Rougon
fd78d32e56 End segfault_handler() with std::abort() rather than kill() on ourselves
This has the advantage, according to my testing on Linux, that core
files obtained after a crash now point to the crashing thread again,
when one starts 'gdb' on the core file and runs the 'bt' command.

Apparently, when using kill(), the signal is seen as coming from the
outside and gdb's 'bt' command points to the wrong thread in general
when debugging using a core file (when debugging "live", gdb intercepts
the signal even before FG's signal handler is started).

See discussion starting at
<https://sourceforge.net/p/flightgear/mailman/message/35833221/>.
2017-05-11 12:19:31 +02:00