1
0
Fork 0
Commit graph

14148 commits

Author SHA1 Message Date
James Turner
910bd2c0fd Fix for sub-model initial offsets
The offset in body coordinates is needed by the FGAIBallistic in some
cases, restore this.
2019-05-18 16:20:31 +01:00
Dan Wickstrom
35c24ce5d4 Update radius of AI model after model data is loaded - prevents rendering artifacts at near/far camera boundary. 2019-05-18 07:10:40 -04:00
James Turner
2266c27930 Merge /u/legoboyvdlp/flightgear-src/ branch tcasPatch into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/162/
2019-05-17 09:03:52 +00:00
Lars Toenning
5a662d97fd Fix broken libevent/dbus cmake module 2019-05-17 10:19:38 +02:00
legoboyvdlp R
ee4f4a1273 TCAS: adjust property names to correct format 2019-05-17 08:48:26 +01:00
James Turner
955138d06e Avoid a crash on HID devices with no name. 2019-05-16 11:11:19 +02:00
Stuart Buchanan
5f2f72a4eb Fix AI Scenarios
Due to e43fe82094 models in AI scenarios were
being searched down the AI/Aircraft and Aircraft paths, where in fact
they are by default a full path from FGDATA.

This fixes the problem by setting DATA_ONLY as the search order.
Other search orders can be set in the scenario file by setting
the search-order tag to "DATA_ONLY", "PREFER_AI", "PREFER_DATA"
2019-05-15 21:09:49 +01:00
legoboyvdlp R
16b178a2d9 TCAS Instrument: add configuration options 2019-05-14 19:03:26 +01:00
James Turner
f159b98224 Fix some warnings from procedures loader 2019-05-13 14:41:28 +01:00
Bertrand Coconnier
b486273e0b [JSBSim] Add Windmilling flag
The flag allows to disable the windmilling of Turbine engines.
2019-05-08 16:39:26 +02:00
Bertrand Coconnier
0635380708 Restored humidity simulation in atmosphere.
Based on the dew point temperature supplied by FG, JSBSim updates the atmosphere density and computes all the usual parameters (RH, vapor pressure, saturated vapor pressure, etc.)

The mass fraction of water per unit of air mass is capped according to the record high from ISA 1976 standard atmosphere. As a consequence, at very high altitudes, air is always extremely dry (approx. 30 ppm i.e. 30 parts per million) whatever the conditions at sea level.
2019-05-08 16:11:06 +02:00
Bertrand Coconnier
c934348513 Remove the MSIS and Mars atmosphere files since they are not used. 2019-05-08 15:04:31 +02:00
Richard Harrison
50d4b37a7d Nasal timestamp - add elapsed uSec 2019-05-07 05:16:37 +02:00
Stuart Buchanan
1d1096d6f7 All start from parking position with no ground net
Fix for https://sourceforge.net/p/flightgear/codetickets/2125/

Previously, selecting a non-pushback parking position from the l
auncher that did not have a ground network resulted in the
aircraft being placed in the center of the airport.

This resolves the problem by creating a default segment simply
moving forward 2m.
2019-05-04 17:43:33 +01:00
Florent Rougon
df352346ad jsWindows: fail gracefully when joyGetDevCaps() returns undocumented values
According to Pfeffer's report[1] and many other messages on the
Internet, joyGetDevCaps() can return the (so far) undocumented value
165, which some say is JOYERR_PARMS. Since this is a valid return code
for joyGetPosEx() (not joyGetDevCaps()!), handle a few return codes from
that function too, and don't throw an exception when joyGetDevCaps()'s
return value is not one of the documented ones (we simply can't trust
its documentation).

[1] https://sourceforge.net/p/flightgear/mailman/message/36657149/
2019-05-04 08:58:15 +02:00
Richard Harrison
7db06300c0 Nasal binding for SGTimeStamp via maketimestamp
usage:

var timer = maketimestamp();

timer.stamp(); # start timing

print("elapsed ",timer.elapsedMSec(),"ms");
2019-05-02 07:31:37 +02:00
Lars Toenning
ff7db27cd1 swift: Add version number check 2019-04-30 10:35:30 +02:00
Lars Toenning
cea342a064 swift: Getting pressure altitude 2019-04-30 08:16:38 +02:00
Florent Rougon
a5792617f7 jsWindows: throw exception instead of using an assert
Since asserts can be compiled as no-ops, throw an exception rather than
doing assert(false), in case the code passed to
joyGetDevCaps_errorString() is not one of the expected values.
2019-04-30 08:14:35 +02:00
Florent Rougon
babf0ded0c jsWindows: add debug output
Every code path that causes a joystick to report notWorking() should now
have an associated error message logged with class 'input' at level
'debug' or higher.
2019-04-29 16:38:11 +02:00
Florent Rougon
8e0271d9f6 jsWindows: remove undefined behavior when joyGetNumDevs() > INT_MAX
If joyGetNumDevs() > INT_MAX, casting it to an 'int' leads to undefined
behavior. On the other hand, after the 'ident >= 0' test succeeded, it
is perfectly safe to use static_cast<unsigned int>(ident), since 'ident'
is of type 'int'. Then we get to compare two unsigned ints, which is
well defined.
2019-04-29 13:42:32 +02:00
Florent Rougon
9b019f6b72 FGJoystickInput: increase MAX_JOYSTICKS from 10 to 16
Since PLIBjs uses joyGetDevCaps()[1] on Windows and this function
accepts joystick ids from 0 to 15 (-1 being special), setting
MAX_JOYSTICKS to 16 ensures that FGJoystickInput::init() can scan all
joysticks that joyGetDevCaps() is able to report about.

[1] https://docs.microsoft.com/en-us/previous-versions/dd757105(v%3Dvs.85)
2019-04-29 12:54:03 +02:00
Richard Harrison
9121079cfe Disable time easing if ctrl key pressed. 2019-04-28 19:40:26 +02:00
Richard Harrison
1399640d79 Use OSG to find out the maximum supported texture size
The DDS Texture cache will auto resize textures that are larger than this value.
2019-04-28 19:40:26 +02:00
Richard Harrison
d3ce7adc95 NasalTimers; ensure unique name as this is required to identify the timer for certain operations (e.g. stop) 2019-04-28 19:40:26 +02:00
Richard Harrison
d2a179f1f3 Multiplayer: do not transmit the transmission-frequency-hz 2019-04-28 19:40:26 +02:00
James Turner
bac5d6c713 Windows: read Unicode command line
One more step in full Unicode support.
2019-04-27 18:54:13 +01:00
James Turner
9d71d09072 Enable HID-input on Windows 2019-04-27 18:54:13 +01:00
Bertrand Coconnier
3539b13985 Stricter syntax checking for JSBSim.
JSBSim was not checking the tag names inside <test> and <condition> statements and this has led to abusive use of tags unsupported by JSBSim such as <and> and <or>. The problem is that JSBSim was not interpreting the <or> statement as the user meant it: JSBSim interpreted it as <test logic="AND"> while the user obviously meant <test logic="OR">. As a result JSBSim silently swallowed the tag and gave results which were not was the user expected without any obvious indication about what was going wrong.

As a result, this commit implements stricter syntax checking and rejects illegal tags within <test> and <condition> statements.

This commit also introduces stricter checking on XML elements which allow either a real value or a property name to be used. JSBSim now rejects the statements where the property name is specified inside a <property> statement. For example, the follwoing statement is rejected:

<clipto>
  <min> <property> /fdm/jsbsim/some/property </property> </min>
...

The correct syntax being
<clipto>
  <min> /fdm/jsbsim/some/property </min>
2019-04-27 12:29:22 +02:00
Lars Toenning
aaa753d169 swift: Fixed wrong startup message 2019-04-26 09:37:37 +02:00
Lars Toenning
21124e7b7e swift: CMake adjustment 2019-04-26 09:37:17 +02:00
Florent Rougon
63f6d0b5bf Convert obsolete uses of get_filename_component(<var> <FileName> PATH)
In the context of get_filename_component(), PATH is a legacy alias for
DIRECTORY. Replace it with DIRECTORY, which is recommended[1] for
CMake versions > 2.8.11.

[1] https://cmake.org/cmake/help/latest/command/get_filename_component.html
2019-04-25 19:11:01 +02:00
Florent Rougon
b2d6acdd4d CMake changes related to FGDATA_SRC_DIR and TRANSLATIONS_SRC_DIR
- When FGDATA_SRC_DIR isn't explicitly set by the user, set it to
  ${PROJECT_SOURCE_DIR}/../fgdata if this is a directory.

- When TRANSLATIONS_SRC_DIR isn't explicitly set by the user, look for
  translations in ${FGDATA_SRC_DIR}/Translations instead of
  ${PROJECT_SOURCE_DIR}/../fgdata/Translations (i.e., honor the setting
  of FGDATA_SRC_DIR for the sake of translation lookup).

This fixes the problem explained in [1] and [2].

[1] https://sourceforge.net/p/flightgear/mailman/message/36645499/
[2] b2274fbbed/
2019-04-25 19:11:01 +02:00
James Turner
b83c069b0b Move power-btn and operable props into base class
AbstractInstrument now handles a generic power-btn and operable
property, and hence includes them in the serviceable-and-powered
check.
2019-04-25 17:11:50 +01:00
James Turner
40b96fef48 Convert ADF and (old) NavRadio to use new base class
This enables separate power-supply for each installation.
2019-04-25 17:11:50 +01:00
James Turner
9cd8ccae80 Merge /u/fgarlin/flightgear-src/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/157/
2019-04-25 12:52:46 +00:00
Dan Wickstrom
1948304157 Fix problem where AI planes are placed on top of user aircraft when user either selects a specific spot or user selects parking to be an available spot. 2019-04-25 11:39:41 +01:00
James Turner
6261b71774 Add AbstractInstrument base class and convert DME
Base class handles some common instrument features, such as the
serviceable node and electrical supply. The electrical supply node
and minimum voltage to operate can now be set in the configuration
via <power-supply>/path/to/output/volts</> and <minimum-supply-volts>
2019-04-24 18:56:56 +01:00
Fernando García Liñán
e0507e9095 Fixed the aircraft showing on top of the splash screen when relocating/resetting 2019-04-23 13:21:19 +02:00
James Turner
b2bedfd485 Fix typo in submodels commit 2019-04-22 11:58:55 +01:00
Scott Giese
7ef4fb50ec [fgpanel] resolve linking error with GLEW 2019-04-20 21:56:16 -05:00
James Turner
ea336af4dc Submodel offset supports pitch/yaw values
Reported by Stewart Andreason
2019-04-19 10:15:36 +01:00
James Turner
79562bcf31 Avoid crash on Cmd-Q exit of the app on macOS
On this code path, AppKit uses exit, rather than letting main run as
normal. We handle most things via C++ destructors, which do run, but
Qt is happier if we clean it up explicitly.
2019-04-17 22:53:10 +01:00
James Turner
e2ed179f4c Temporarily log out UI languages on launcher start
This is to help with diagnosing:
https://sourceforge.net/p/flightgear/codetickets/2121/
2019-04-17 15:11:23 +01:00
Florent Rougon
b405bd47d0 Use the system CppUnit only when -DSYSTEM_CPPUNIT=ON is passed to CMake
According to the discussion around [1], using the system CppUnit library
is rarely useful but likely to cause problems (due to possible
incompatibilities between versions); that is, unless people doing so
really know what they are doing. For this reason, this commit changes
the CMake config logic as follows: the system CppUnit library is now
only used when explicitly asked for with -DSYSTEM_CPPUNIT=ON on the
CMake command line.

[1] https://sourceforge.net/p/flightgear/mailman/message/36636483/
2019-04-11 22:14:53 +02:00
James Turner
4e8e69b4f8 Migrate invert-mouse-wheel setting from pre 2019.x
Flip the sense of this property, since the interpretation in SG is
also flipped now.
2019-04-11 20:40:17 +01:00
James Turner
4d562e2a90 Check existence of an OpenGL extension 2019-04-11 11:36:22 +01:00
Lars Toenning
85acefab95 Swift: initial support 2019-04-11 11:36:22 +01:00
Richard Harrison
8e1e6c8254 AI Traffic - better integration with terrasync.
- allow on demand update

new property traffic-manager/active indicating that AI Traffic is running
2019-04-07 09:00:01 +02:00
Stuart Buchanan
ff12994554 Execute load/unload Nasal for both detailed and AI
Previously only the first of a detailed/bare AI model tuple's Nasal
would be executed when the model is loaded.  This loads both.
2019-04-06 22:22:02 +01:00