1
0
Fork 0
Commit graph

13247 commits

Author SHA1 Message Date
Henning Stahlke
6feca92060 YASIM add struct StallParams to Wing 2017-12-15 15:20:27 +01:00
Henning Stahlke
b288ca3d9d YASIM: add struct Chord to Wing.hpp ; add static method calculateMAC to Wing 2017-12-15 15:20:27 +01:00
Henning Stahlke
6b473fde68 YASIM: move updating of model from Airplane to Wing 2017-12-15 15:20:27 +01:00
Henning Stahlke
fb6f965db7 YASIM: method name clarification (and indention) 2017-12-15 15:20:27 +01:00
Henning Stahlke
0e6552cddf YASIM: move property export code into classes (Wing) 2017-12-15 15:20:27 +01:00
Henning Stahlke
43af435085 YASIM: rename method getMAC to getMACLength 2017-12-15 15:20:27 +01:00
Henning Stahlke
c3bfeb4ba0 YASIM only reformat for better readability 2017-12-15 15:20:27 +01:00
Henning Stahlke
030403db5f YASIM member initialization in class Vector 2017-12-15 15:20:26 +01:00
Henning Stahlke
1194b09525 YASIM rename methods in class Surface 2017-12-15 15:20:26 +01:00
Henning Stahlke
1f721fb6d8 YASIM add new version tag for 2018.1 2017-12-15 15:20:26 +01:00
Henning Stahlke
77a9cca6d5 YASIM refactoring Wing class (flaps) 2017-12-15 15:20:26 +01:00
Henning Stahlke
95ee37c9b9 YASIM refactoring of Wing class 2017-12-15 15:20:26 +01:00
Henning Stahlke
3ac90ee866 YASIM: minor corrections and safeguards. 2017-12-15 15:20:26 +01:00
Henning Stahlke
ea8bfba98a YASim: add method to Wing and clarify member name. 2017-12-15 15:20:25 +01:00
Florent Rougon
c28f63132f Re-add airport(), navaid() and runway() methods of flightplan-leg ghosts
These methods were removed by mistake in commit 0dbb0dff9, which broke
code that relies on them (e.g., FMSDelegate.currentWaypointChanged() in
$FG_ROOT/Nasal/route_manager.nas).

Also remove 'waypointPrototype' from NasalPositioned.cxx, since it is
not used anymore.

Note: the methods can't be easily re-enabled by means of
      'waypointPrototype', because for FPLeg ghosts, 'waypointPrototype'
      was emulated as a parent class before this commit, and thus when
      querying an FPLeg ghost for its 'airport', 'runway' or 'navaid'
      member, the corresponding data member returned by
      waypointCommonGetMember() would be found by legGhostGetMember()
      *before* parent classes are searched. This commit prevents this
      from happening by returning 'airport', 'runway' and 'navaid' as
      member functions *directly* in legGhostGetMember(), before
      waypointCommonGetMember() is queried as a fallback.

Thanks to Eric van den Berg for the bug report.
2017-12-13 11:39:05 +01:00
Florent Rougon
b769ee6fdc AddonManager::registerAddonMetadata(): improve error messages 2017-12-10 22:41:03 +01:00
Florent Rougon
45867058f0 addon-metadata.xml: add meta section (non-leaf node) and file-type node
Move the format-version node inside /meta. It's not compatible of
course, but since the stuff this is breaking is only 2 or 3 days old,
let's go for it for nicer code and file format.

Sorry if you had already written an addon-metadata.xml file of your
own. In this case, just replace:

  <format-version type="int">1</format-version>

with:

  <meta>
    <file-type type="string">FlightGear add-on metadata</file-type>
    <format-version type="int">1</format-version>
  </meta>
2017-12-10 22:41:03 +01:00
James Turner
88940eb6bc Launcher: fix some warnings from QML 2017-12-09 09:46:14 +00:00
James Turner
58fa9fcaa7 Launcher: fix for unreliable aircraft-dir scanning 2017-12-09 09:32:25 +00:00
James Turner
d127a6ff9a Launcher: fix on-disk variant enumeration 2017-12-08 23:18:42 +00:00
Florent Rougon
3985bf4b19 Fix compilation error in src/Add-ons/AddonVersion.cxx
This should fix the following compilation error and other similar ones:

  converting to ‘std::tuple<flightgear::AddonVersionSuffixPrereleaseType,
  int, bool, int>’ from initializer list would use explicit constructor
  ‘constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&&
  ...)

According to <https://stackoverflow.com/a/32084829/4756009>, the change
wouldn't be needed in C++14 (and it built fine with my g++) but we use
C++11.
2017-12-08 18:39:27 +01:00
James Turner
e6e055dbb0 Launcher: preview image loading feedback
Expose the loading state as a property so the UI can show some feedback
when the image is still loading.
2017-12-08 16:14:47 +00:00
James Turner
033d5f65d5 Usability tweaks for editing ratings
Adjust ratings text now has mouse hover, and sliders can be clicked
on the track to adjust the value directly
2017-12-08 16:14:47 +00:00
Florent Rougon
48f52f14c4 Improved infrastructure for add-ons: C++ classes, metadata file, Nasal interface
This commit adds C++ classes for add-on management, most notably
AddonManager, Addon and AddonVersion. The AddonManager is used to
register add-ons. It relies on an std::map<std::string, AddonRef> to
hold the metadata of each registered add-on (keys of the std::map are
add-on identifiers, and AddonRef is currently SGSharedPtr<Addon>).
Accessor methods are available for:

  - retrieving the list of registered or loaded add-ons (terminology
    explained in $FG_ROOT/Docs/README.add-ons);

  - checking if a particular add-on has already been registered or
    loaded;

  - for each add-on, obtaining an Addon instance which can be queried
    for its name, id, version, base path, the minimum and maximum
    FlightGear versions it requires, its base node in the Property Tree,
    its order in the load sequence, short and long description strings,
    home page, etc.

The most important metadata is made accessible in the Property Tree
under /addons/by-id/<addon-id> and the property
/addons/by-id/<addon-id>/loaded can be checked or listened to, in
order to determine when a particular add-on is loaded. There is also a
Nasal interface to access add-on metadata in a convenient way.

In order to provide this metadata, each add-on must from now on have in
its base directory a file called 'addon-metadata.xml'.

All this is documented in much more detail in
$FG_ROOT/Docs/README.add-ons.

Mailing-list discussion:

  https://sourceforge.net/p/flightgear/mailman/message/36146017/
2017-12-08 00:36:41 +01:00
James Turner
ac50a3c7ed Restore OSG 3.2 compilation support 2017-12-05 21:39:30 +00:00
James Turner
3ffed7d867 Style singleton for the QML UI 2017-12-05 21:30:09 +00:00
James Turner
31c781257b Remove obsolete UI files 2017-12-04 22:34:39 +00:00
James Turner
d34edaa569 Pure QtQuick aircraft-UI
Moves previews, searching, rating handling and extended aircraft
information entirely into QQ. Many cosmetic tweaks and improvements
still to come.
2017-12-04 22:34:39 +00:00
James Turner
041b9527d3 Seperate aircraft cache from the model.
Allows exposing aircraft data to QML (via a helper object) outside the
context of the model.
2017-12-04 21:48:20 +00:00
James Turner
78950fea57 Fix crash on reset if terrasync is disabled
Also use C++11 iteration for group names in reset start code.
2017-12-04 21:41:05 +00:00
James Turner
8e6500ae47 Orderly destruction of canvas elements
Driven from the object destroyed signal, ensure children and 
corresponding QQ items are also destroyed when the property is removed.
2017-11-28 22:54:12 +00:00
James Turner
e4b5a699d8 Remote canvas: fix crashes on remove 2017-11-28 22:32:30 +00:00
James Turner
731097bca3 Remote canvas: fix snapshot loading
Visibility prop was being saved incorrectly.
2017-11-28 16:20:23 +00:00
James Turner
5dcfdf593a Merge /u/sanhozay/flightgear/ branch sanhozay into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/101/
2017-11-27 17:09:04 +00:00
ThorstenB
147ff104cd Adds support for NMEA messages for traffic reporting (flarm). Also extends the NMEA base class to handle bidirectional communication. Allows FlightGear to feed position and traffic data (for multi-player and AI aircraft) to NAV/moving-map clients, like xcsoar, skydemon, skymap etc. Some basic flarm configuration commands are also emulated, to properly persuade the clients. By default, all moving aircraft are reported (traffic information). Actual threat-alerts are also supported, but require the installation of the "TCAS instrument". 2017-11-24 22:54:32 +01:00
Gijs de Rooy
8ca9dd89c9 QtLauncher: fix aircraft ratings
Index of rating indicators starts at 0 while ratings that correspond to a point/star/dot start at 1
2017-11-22 16:35:21 +01:00
James Turner
d638e7a73b Merge /u/thbr/flightgear/ branch tb-next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/107/
2017-11-20 19:44:33 +00:00
James Turner
089abcfe40 Fix FGQCanvas compilation with Qt 5.7
Use raw OpenGL type constants instead of the QSG aliases which were
only added in 5.8
2017-11-19 21:57:14 +01:00
ThorstenB
ad866afd81 Revised nmea and Garmin protocol classes.
The Garmin protocol implementation really is an NMEA protocol with a few
extra messages. Instead of duplicating the code, introduce the NMEA protocol
as a base class, which is reused for the Garmin class. The input/output
has not changed at all (and it maintains the FG-specific quirks, like our
NMEA class using LF-only linefeeds, while the Garmin protocol uses
CR-LF linefeeds.
2017-11-19 17:33:27 +01:00
ThorstenB
6ff4805361 TCAS: add default value when checking valid flag 2017-11-19 17:32:49 +01:00
ThorstenB
19b19f05bd Correct range checks for network protocol parameters.
Several checks were off by one, resulting in a segfault when only one
parameter was missing.
Also improve error messages, giving details about what is expected.
2017-11-19 17:30:12 +01:00
ThorstenB
27e2776890 Minor cleanup in parse_port_config. 2017-11-19 17:30:05 +01:00
Florent Rougon
94a8ba8f9b Add missing space in a log message 2017-11-19 11:14:51 +01:00
Florent Rougon
83fef08a04 Use common definition of simgear::enumValue() from <simgear/sg_inlines.h>
This avoids code duplication.
2017-11-19 08:23:14 +01:00
Florent Rougon
0537d569d5 Remove method FGAirport::isAirportType()
FGAirport::isAirportType() was redundant with
FGPositioned::isAirportType(). Remove the former and change existing
calls to use the latter.
2017-11-16 20:28:00 +01:00
Florent Rougon
a2254d891a Add missing include <algorithm> for std::max() and std::min()
<algorithm> was missing in src/AIModel/AIFlightPlanCreate.cxx and
src/Navaids/routePath.cxx. Thanks again to Alan Teeder for the reports!
2017-11-16 12:54:49 +01:00
Florent Rougon
0dbb0dff9e Three Nasal properties of waypoint objects now accessible: airport, runway, navaid
Waypoint objects used in Nasal code can now return their airport,
runway or navaid object (Nasal ghost). More precisely:
  - if waypoint 'wpt' was made from an airport object[1], then
    'wpt.airport' is this airport object;
  - if waypoint 'wpt' was made from a runway object[2], then
    'wpt.runway' is this runway object, and 'wpt.airport' is the
    airport containing that runway;
  - if waypoint 'wpt' was made from a navaid object[3], then
    'wpt.navaid' is this navaid object.

When one of the three properties 'airport', 'runway', and 'navaid' is
not applicable to a given waypoint due to the type of the underlying
FGPositioned, its value is nil.

The code for these properties was already mostly there, but
unreachable from Nasal.

[1] For instance, with createWPFrom(airportinfo("LOWI"))

[2] For instance, with createWPFrom(airportinfo("LOWI").runway("26"))

[3] For instance, with:

      var apt = airportinfo("LOWI");
      var navaid = findNavaidByFrequencyMHz(apt, 109.7);
      var navaidWpt = createWPFrom(navaid);
2017-11-16 11:22:39 +01:00
Florent Rougon
91470cbc54 Add FGPositioned static methods: isAirportType(), isRunwayType(), isNavaidType()
For consistency, define these three static methods in FGPositioned.
FGPositioned::isAirportType() is the same as FGAirport::isAirportType()
(piece of code moved from airport.cxx to positioned.cxx, and
FGAirport::isAirportType() now calls FGPositioned::isAirportType()).

- FGPositioned::isAirportType() returns true for AIRPORT, HELIPORT,
  SEAPORT;
- FGPositioned::isRunwayType() returns true for RUNWAY;
- FGPositioned::isNavaidType() returns true for NDB, VOR, ILS, LOC, GS,
  DME, TACAN.
2017-11-16 11:22:39 +01:00
Florent Rougon
9d4cbb005f Update header comment of src/Airports/airport.cxx 2017-11-16 11:22:39 +01:00
Florent Rougon
e68e73d252 Add missing include <algorithm> for std::max()
<algorithm> was missing in src/Instrumentation/airspeed_indicator.cxx
and src/Instrumentation/tacan.cxx. Thanks to Alan Teeder for the
reports.
2017-11-16 11:20:24 +01:00