1
0
Fork 0
Commit graph

13189 commits

Author SHA1 Message Date
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
James Turner
00845b17b9 Prevent PUI menubar obscuring startup tips
Add an additional visibility flag to the menubar implementations, 
conditional on whether or not the menubar overlaps the window content.
(I.e for PUI but not Cocoa). This flag is linked to a new property
/sim/menubar/overlap-hide, which the renderer drives off the splash-
screen visibility.
2017-05-11 08:39:48 +01:00
Florent Rougon
4dc2e4fc09 Disable use of the WindowsFileDialog class
On Windows, use:
  - QtFileDialog if FG was built with Qt support;
  - PUIFileDialog otherwise.

Behavior on other platforms is unchanged. This change is motivated by
the fact that some Windows users have reported[1][2] weird,
non-deterministic behavior of WindowsFileDialog and unfortunately, no
one seems to be willing and able to fix the problem. The Qt
implementation comes for free and should be quite robust. Of course, if
someone wants to maintain the WindowsFileDialog class again, the change
can be reverted.

See discussion at [3].

[1] https://forum.flightgear.org/viewtopic.php?f=25&t=31945
[2] https://sourceforge.net/p/flightgear/mailman/message/35761650/
[3] https://sourceforge.net/p/flightgear/mailman/message/35759819/
2017-05-11 00:12:20 +02:00
Florent Rougon
7f59846644 Splash screen: support text encoded in UTF-8
This fixes handling of non-ASCII splashscreen text for me (Debian
GNU/Linux). The XML input files don't technically *have* to be encoded
in UTF-8, as long as they properly declare the encoding and it is
supported by Expat. Of course, we prefer UTF-8 nowadays.

With this commit, startup tips and splash screen progress strings
("Loading scenery", "Initializing subsystems", etc.) can at last be
written correctly in languages that need non-ASCII characters.

The Expat doc is unfortunately unclear on its *output* encoding, saying
the following (expat.h):

  The characters are passed exactly as they were in the XML document
  except that they will be encoded in UTF-8 or UTF-16.

The only relevant header I can see in SimGear is
3rdparty/expat/sg_expat_external.h, which has interesting stuff around
XML_UNICODE, however it doesn't seem to take position.

I fear that whether UTF-8 or UTF-16 is used for Expat's output (and thus
for what easyxml.cxx gives us) depends on how it was compiled. Let's
hope everyone has it compiled for UTF-8 output...
2017-05-10 16:59:29 +02:00
Florent Rougon
33c54e5d76 Fix crash in PT_vs_hpt() due to invalid data in ISA_def
In commit 15525aab58, a layer with
lapse=0.0 was added to ISA_def (atmosphere model). However, the last
layer *must* have lapse == -1.0, otherwise the code in PT_vs_hpt()
doesn't know when it's on the last element of ISA_def, and does an
illegal memory access with (pp+1)->height. This is why -1.0 is the
default value for lapse ('l') in the ISA_layer constructor.

Fix: add the -1.0 terminator to the last element of ISA_def.
2017-05-10 16:54:55 +02:00
Florent Rougon
9a64150d57 Fix crash in src/ATC/trafficcontrol.cxx (invalid iterator dereferenced)
When the test:

  if (i == activeTraffic.end() || (activeTraffic.empty()))

was true, the iterator named 'current' was uninitialized and later
dereferenced.

Fix:
  - when the previously-mentioned test is true, return;
  - initialize 'current' only when it is really needed (i.e., later and
    after the test), and since we don't need it for iterating, make it
    an FGTrafficRecord&.
2017-05-10 16:54:55 +02:00
Henning Stahlke
43e19c1123 YASim: revert a change in Model.cpp that caused segfaults on some systems. 2017-05-10 16:27:46 +02:00
Alessandro Menti
c00f98b0d1
QT Launcher spelling/style fixes
Fix a couple of spelling mistakes, as well as some terms which are
styled differently in the main FG interface.
2017-05-08 21:29:42 +02:00
Henning Stahlke
222361bf66 YASim bufix segfault with helicopters. 2017-05-05 13:47:47 +02:00
Henning Stahlke
35f6811ce3 YASim: trivial code clarification in Wing.cpp 2017-05-04 15:33:13 +02:00