1
0
Fork 0
Commit graph

1387 commits

Author SHA1 Message Date
Edward d'Auvergne
13b05db6f9 UIUC cleanup of -Wunused-but-set-variable compilation warnings.
The two unused variables were commented out.
2015-12-10 09:11:09 +01:00
Edward d'Auvergne
4eeeaf140c UIUC cleanup for -Wsign-compare compilation warnings.
The string find_first_not_of() and find_first_of() functions return string::npos
if not found, rather than -1.
2015-12-10 09:04:23 +01:00
Edward d'Auvergne
e7d405d0ee UIUC and LaRCsim cleanup of -Wunused-variable compilation warnings.
This is for defined but unused variables, many of which are in commented out
code.
2015-12-10 09:04:18 +01:00
Edward d'Auvergne
ce7c6de726 UIUC cleanup of -Wparentheses compilation warnings. 2015-12-10 09:04:09 +01:00
Erik Hofman
5c7d261df5 Sync JSBSim again 2015-12-07 11:10:03 +01:00
James Turner
2314ccfe13 Developer-warnings
- make some existing warnings developer-mode only
- add a warning about legacy aircraft path usage
2015-11-13 22:13:44 +00:00
Erik Hofman
27ca027a7e Fix permissions 2015-11-10 16:15:42 +01:00
Erik Hofman
a0e31b5565 Sync. with JSBSim again 2015-10-30 10:10:01 +01:00
bcoconni
7bcbe8e802 Fixed the pilot acceleration for consistency with the accelerometer computation 2015-08-09 20:00:08 +02:00
bcoconni
adb926eefc Fixed the accelerometer that now reports correctly 0g in orbit and 1g when steady on ground. Bug report by Thorsten Renk. 2015-08-09 19:59:29 +02:00
bcoconni
eb95edf2fc Prevent JSBSim from crashing when the user forgot to specify the axis. 2015-07-14 16:01:33 +02:00
bcoconni
e9239c7178 Clarified the error message: recall the name of the file that has not been found. 2015-07-14 15:59:45 +02:00
Torsten Dreyer
14b97abd8f Fix #1771, wrong groundspeed indication for UFO 2015-07-10 11:07:34 +02:00
Torsten Dreyer
9c637e6b2a UFO and MagicCarpet FDM: avoid negative headings
Both FDM set the heading to negative values when turning left
through north. This should be fixed by this commit.
2015-07-08 11:14:46 +02:00
James Turner
bbff8dcbb6 Remove / reduce level on some debug output 2015-06-08 10:37:26 +01:00
Erik Hofman
752b8d0acc Add the option to (properly) revert the propellers moment of inertia calculation 2015-06-03 13:55:00 +02:00
Bertrand Coconnier
45de8ddf80 Modified the loop so that the simulation is suspended whenever the user
set the property fdm/jsbsim/simulation/terminate to true.
2015-04-12 18:20:00 +02:00
Bertrand Coconnier
475166643c Removed executable flags for JSBSim source files and synced JSBSim (removed warnings about comparison between signed and unsigned / modified FGInput to issue a more explicit message about unknown input types) 2015-04-10 19:21:59 +02:00
Rebecca N. Palmer
27a4be5d87 UIUC: fix check_float (EOF is not an error in this context)
http://sourceforge.net/p/flightgear/mailman/message/33683003/
2015-04-03 14:18:04 +01:00
Erik Hofman
e10b493421 Do not run the HoldDown code until after the aircraft is trimmed to prevent a devide by zero and ultimately a segmentation fault 2015-04-02 20:31:17 +02:00
Erik Hofman
aa63e65122 Sync. with JSBSim just in time for the official JSBSim release. 2015-04-02 15:17:12 +02:00
James Turner
f2d6b76b13 Portability: Fix compile errors on MSVC (cmath)
From Scott (xDraconian)
2015-03-24 11:11:42 -05:00
James Turner
0cff350dab Fix UIUC libc++ compilation. 2015-03-24 09:37:40 -05:00
Edward d'Auvergne
3f3bd6994a Fix to restore the UIUC FDM aircraft after the FGAddon split.
The fix follows from the thread at
http://thread.gmane.org/gmane.games.flightgear.devel/77094, and specifically
implements step 3 in the message
http://thread.gmane.org/gmane.games.flightgear.devel/77094/focus=77214.
The change requires the corresponding <airplane-dir> XML tag deletion
and file system rearrangements in FGAddon as mentioned in the thread to
work.
2015-03-23 18:51:45 +01:00
bcoconni
5349d3367f JSBSim syncing. The changelog is:
* The Pitot angle can now be tweaked with the <pitot_angle> tag in the <metrics> block.
* The refuel rate is now configurable with the <refuel-rate> tag in the <propulsion> block.
* Fixed C++11 compliance. JSBSim can now be compiled with a C++11 compiler.
* Avoid a spurious mass report to be issued when resetting.
* Fixed the moments computation. Previously they were computed with the previous time step CG position.
* Fixed a bug where the CG update was delayed to the next time step when point masses location were modified via the FCS.
2015-02-15 11:37:13 +01:00
Torsten Dreyer
ef2c9b995f JSBSim: populate fuel tank cg 2015-02-04 12:44:20 +01:00
bcoconni
5d2197ae3c Fixed a bug that made FG crash when repositionning the aircraft or resetting the simulation. Thanks to Rebecca Palmer for the bug report and the bug patch. 2015-01-17 14:58:48 +01:00
Anders Gidenstam
df61dfe1b3 JSBSim: Renamed the location properties for external forces to include the unit. 2014-12-18 11:02:41 +01:00
bcoconni
a1df1fb70a Synced JSBSim. Adds the following new features:
- Ability to modify the location of external forces via the property tree
- Ability to specify manually the inertia matrix of "point masses"
- Improvements of the water injection feature in the turbine code
2014-12-15 20:12:18 +01:00
bcoconni
5f0bffde58 Re-sync JSBSim with FlightGear including James Turner's fix for the call to the function to_string that failed to compile on Mac and MSVC. 2014-11-18 19:54:52 +01:00
bcoconni
51e5add743 JSBSim sync 2014-11-15 11:39:49 +01:00
bcoconni
a30dadcf18 Fixed the initial conditions settings where the altitude passed by FG to JSBSim is geodetic instead of geocentric. 2014-10-19 19:05:30 +02:00
Torsten Dreyer
159ec7e08b Expose total-fuel-m3 to the tank properties 2014-08-25 21:40:12 +02:00
Torsten Dreyer
a4b0be3d8a Expose the vertical flight path as a property
write the vertical flight path to /orientation/path-deg
zero means level flight, positive angles climb

Also use SGD_DEGREES_TO_RADIANS (and vice versa) for double computations
instead of the float constants
2014-08-19 00:01:08 +02:00
bcoconni
beedd9e683 Fixed a bug where the rate_limit was ignored if it was set by a property. 2014-08-09 20:02:44 +02:00
bcoconni
1c867eb99d Bug fix for the issue #1497. JSBSim calculations of geodetic coordinates were producing a NaN at the North and South poles (i.e latitude +/-90deg). 2014-08-03 13:59:30 +02:00
bcoconni
a428d611c3 Fixed the erratic behavior of <actuator> when rate_limit is read from a property. See more details about the bug in the issue #1503 in FlightGear bug tracker. 2014-07-19 00:23:41 +02:00
bcoconni
5deeeaf781 Fix for the bug reported in the FlightGear 1503 2014-07-17 01:11:09 +02:00
bcoconni
d830430e61 Kévin Seroux: C++11 fixes for MSVC++ 2014-06-14 00:29:39 +02:00
Torsten Dreyer
29990c40bf No JSBSim debug msg without having SG_FLIGHT class 2014-05-20 22:58:38 +02:00
bcoconni
105cba0bda JSBSim sync 2014-05-18 13:39:31 +02:00
Colin Douglas Howell
54f954fd02 Fix for issue 1463 (YASim underestimates off-axis aerodynamic forces on fuselages)
Change the drag coefficient for fuselages along the Y and Z axes
(i.e. perpendicular to the fuselage's main axis) to use a fixed
value of 0.5. (The value can still be adjusted using the fuselage's
"cy" and "cz" XML attributes.)

For the Y-axis and Z-axis drag on fuselages, YASim originally used
a drag coefficient equal to:

	(solver drag factor) * (fuselage length/width ratio)

This value turns out to be way too small for well-streamlined
aircraft, even those with long, narrow fuselages, and especially
so for those with short, stubby fuselages. Such fuselages are
streamlined in the X direction, but not along Y or Z.

0.5 is only a ballpark estimate, but it's reasonably close for the
common case of a fairly long fuselage with a round cross section. For
flat-sided fuselages, a larger value should be used, up to a maximum
of 2 for a slab-sided block. For short fuselages, the value should be
reduced to account for end effects. The fuselage's "cy" and "cz" XML
attributes can be modified to make such adjustments.

This fix won't affect straight flight much, but it should have a strong
impact on some maneuvers. For example, it will make slips more
effective and may make knife-edge flight easier on aerobatic aircraft
which should be capable of it.

Only aircraft which specify version="YASIM_VERSION_32" or newer are
affected.
2014-05-12 19:07:10 -07:00
Colin Douglas Howell
907209746f Separate fuselage drag adjustment from that for landing gear and external weights.
This commit is in prepartion for the following commit, which is a bug fix for
Issue 1463 (YASim underestimates off-axis forces on fuselages).

Previously the solver would adjust the drag factor for all of an Airplane's
non-Wing Surfaces in one pass, with no attempt to distinguish Fuselage Surfaces
from the Surfaces for Gear and Weights. This makes it difficult to modify how
fuselage drag is calculated while leaving unaffected the drag for landing gear
and external weights.

Now the solver adjusts the drag for an Airplane's fuselages, landing gear, and
external weights in three separate passes. To do this, each Fuselage now has a
list of its Surfaces. The fuselage pass simply iterates through the list of
Fuselages, running through each Fuselage's list of Surfaces.

The Airplane's list of non-Wing Surfaces, "_surfs", is no longer used here, but
there may still be uses of it elsewhere.
2014-05-12 14:29:48 -07:00
Colin Douglas Howell
4d1aebad79 Fix for issue 1394 (YASim's geometry for non-cylindrical fuselages is wrong)
Correct handling of fuselage's "midpoint" XML attribute so that the midpoint's
location matches the point assumed by all aircraft developers and YASim docs.
This means the fuselage won't be generated "back-to-front".
Also correct the variation of diameter for tapered fuselages so that both ends
of the fuselage narrow from the midpoint to the endpoints.
Before this, one end was narrowing from the endpoint to the midpoint, the
opposite of what was expected.
These changes affect both weight distribution and the distribution of lateral
aerodynamic forces.
2014-05-06 10:38:48 +02:00
Torsten Dreyer
86b3469fbf JSBSim: fix zero agl above scenery discontinuity
see http://osdir.com/ml/flightgear-sim/2014-04/msg00145.html
2014-04-30 16:41:27 +02:00
Torsten Dreyer
4e89d05fb4 YASim: implement a versioning system
user attribute "version" of the airplane element of the YASim config file
to define the version this config uses.
Example:
<airplane mass="1344" version="YASIM_VERSION_CURRENT">

Initially, the following can be used:
YASIM_VERSION_ORIGINAL - The original version of YASim as implemented up to
                         FlightGear 3.0.0
YASIM_VERSION_32 - The version of YASim implemented in FlightGear 3.2.x
                   (and the development version 3.1.x)
YASIM_VERSION_CURRENT - The current and latest version of YASim.
2014-04-20 20:58:12 +02:00
Colin Douglas Howell
ef2898f25c Corrected fix for issue 1423 (YASim miscomputes incidence rotation of force vector)
I got the sign wrong in my previous fix, causing the vector to be rotated the
wrong way. See my latest comments in issue 1423. Sorry about that.
2014-04-05 11:58:16 +02:00
James Turner
5002814554 FreeBSD fixes
From Ganael Laplanche.
2014-04-04 15:33:27 +01:00
Torsten Dreyer
ec2baa1a41 Merge commit 'refs/merge-requests/1579' of git://gitorious.org/fg/flightgear into yasimfixes 2014-04-04 08:57:16 +02:00
Torsten Dreyer
efc5c32633 Merge commit 'refs/merge-requests/1578' of git://gitorious.org/fg/flightgear into yasimfixes 2014-04-04 08:57:12 +02:00
Colin Douglas Howell
8cca0adc58 Fix for issue 1427 (YASim fuselage's "cx" affects drag on all axes)
Correct Airplane::compileFuselage() so that a Fuselage's "cx"
only affects drag on the X axis.
2014-03-27 02:12:11 -07:00
Colin Douglas Howell
aa27b38666 Fix for issue 1423 (YASim miscomputes force vector on Surfaces with nonzero incidence)
Surface::calcForce() now does reverse incidence rotation of force vector properly.
2014-03-25 01:50:21 -07:00
Colin Douglas Howell
8a9ce0ccf7 Fix for issue 1400 (YASim slats always give full stall enhancement)
Surface::stallFunc() now scales _slatAlpha by _slatPos when adjusting stallAlpha.
2014-03-22 12:11:39 -07:00
James Turner
f07771f3d5 Fix a crash after reset. 2014-03-10 17:43:15 +00:00
James Turner
a8fe586e48 Revert wiping of /fdm on reposition.
This is too destructive for many established things, so revert it.
Instead, make the FDM shell save /fdm state on postinit(), and
restore it on re-init (which reposition invokes).
2014-03-10 12:00:51 +00:00
James Turner
5ce2a067ca Fix JSBsim trimming on reposition.
- remove the entire /fdm tree on reposition
- force the initial NED wind values to 0.0 in JSBsim,
pending advice from people who know better.
2014-03-06 22:33:42 +00:00
Anders Gidenstam
4a5dce9f48 Added support for shared JSBSim engine and system configurations in fgdata.
Adds $FG_ROOT/Aircraft/Generic/JSBSim/{Engines,Systems} to the JSBSim
engines and system search paths. Internally JSBSim already searches
$aircraft_dir/Engines and $aircraft_dir/Systems.
A file in $aircraft_dir/{Engines,Systems} have higher priority than one
in the shared directories.
2014-03-05 22:41:34 +01:00
James Turner
826ea8139f Re-apply the Clang/C+11 fix for JSBSim
Hopefully an equivalent change will occur upstream before the next
JSBsim sync.
2014-02-14 17:42:50 +00:00
Erik Hofman
73a519a95c Make the JSBSim terrain handling code compile time configurable by calling cmake -DJSBSIM_TERRAIN=1 2014-01-29 13:50:06 +01:00
Erik Hofman
7bdd1d617d Integrate the latest terrain handling code 2014-01-29 13:45:19 +01:00
James Turner
64cbc06003 clang / libc++ fixes for JSBSim
(needs to be upstreamed too)
2014-01-25 10:34:19 +00:00
Erik Hofman
fe79be0702 Do not use the new JSBSim ground reactions code by default until there is a good way to identify Nasal scripts that do this themselves 2014-01-19 15:23:15 +01:00
Erik Hofman
e3e44e49ee Sync. with JSBSim CVS: although it looks a large part it is mostly bug fixes and fixing compiler warnings 2014-01-18 10:56:15 +01:00
James Turner
8aba04c3a2 Reset: change FDM ownership
- make the FDM owned via a SGSharedPtr
- drop some property references explicitly.
2013-12-01 21:37:17 +00:00
James Turner
8bcf597086 Remap JSB-sim debug levels from SG_LOG levels.
(Avoids the entire aircraft config being dumped to the console at
log-level info)
2013-12-01 21:37:16 +00:00
bcoconni
b996eca299 Fix for bug #1238: the accelerations, velocities, etc. are now updated to a consistent set of values prior to exiting the trim routines. 2013-11-29 19:37:39 +01:00
bcoconni
69baf3a9d6 Synchronized with JSBSim/CVS 2013-11-24 20:12:17 +01:00
James Turner
ea822a99e1 Fix some warnings identified by Clang
_ unused private members. Removed in most cases, commented
out in a couple of cases where it feels as if the code might be used in the future.
2013-11-16 09:41:33 +00:00
bcoconni
139af0026f Synchronized FG with the removal of 'using std::*' in simgear's easyxml 2013-11-14 22:07:50 +00:00
janodesbois
78301e95b4 make YASim report /velocities/mach as the speed's norm 2013-10-31 20:25:08 +01:00
janodesbois
00aacd6442 Revert "JSBSim fix: /velocities/mach was reported as totale mach speed"
This reverts commit 4dde865cbc.
2013-10-31 20:21:13 +01:00
janodesbois
4dde865cbc JSBSim fix: /velocities/mach was reported as totale mach speed
should be the U axis component (machU)
2013-10-28 05:48:53 +01:00
janodesbois
a6030bc9ce forgot a .hxx modif in larcSim for bug 202 2013-10-27 14:51:19 +01:00
janodesbois
ecfdf354f1 considering u,v,wbody-fps are the ECEF velocity expressed in body axis, change in all functions/variables name dealing with them, wrongly named with wind, or even north, east, down. 2013-10-27 13:24:54 +01:00
James Turner
dfa1353a8a Kill another BOM. 2013-09-27 18:06:18 +01:00
James Turner
c55849d644 Remove UTF-8 BOM.
Seems to be upsetting the compiler on Jenkins.
2013-09-27 17:08:36 +01:00
Anders Gidenstam
5a4b9c617c Restored JSBSim to a working state in FlightGear. 2013-09-23 22:33:23 +02:00
Anders Gidenstam
22d91528f8 Synchronized with JSBSim/CVS. 2013-09-23 22:30:44 +02:00
James Turner
dab588c789 Fix for CVE-2012-2091:
add checks against buffer overruns
 CVE-2012-2091 mentions various buffer overruns in simgear and
 flightgear. This patch addresses this issue in Rotor::getValueforFGSet().
From: Tom Callaway
2013-09-14 17:39:49 +01:00
janodesbois
04764f8288 #901, yasim report the wrong sign in side-slip-deg and -rad. 2013-09-05 08:28:40 +01:00
Tom Paoletti
1f88d1d11b Performance optimization: empty() instead of size()>0
empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
2013-08-19 09:02:06 +01:00
James Turner
cff6b2034d Remove unnecessary includes/using
flight.hxx (FGInterface) was pulling in list, string and vector, and
'using' them, despite no actual need.
2013-07-29 22:59:45 +01:00
James Turner
948aa70af7 Fix native protocol crashes.
As part of this, kill off the evil global FDM state, and avoid us
copying FGInterfaces (which is bad since it contains TiedProperties
and an FGGroundCache, neither of which are especially keen on being
copied). Will probably disable copy/assignment on TiedProperties in
a future commit.
2013-07-18 12:01:36 +01:00
Thomas Geymayer
ba088d9f1e Fix warnings identified by gcc. 2013-07-04 23:07:36 +02:00
James Turner
e5bace53af Bug http://code.google.com/p/flightgear-bugs/issues/detail?id=1077
Fix rotation rate of UFO to compensate for large
dead-band value. (makes small rotational speeds
possible, yay). Patch by Jean Pellotier
2013-06-25 21:47:51 +01:00
Anders Gidenstam
9c8d2e046d src/FDM/JSBSim/models/FGPropagate.{h,cpp}: Do not return reference to local. 2013-06-11 22:15:03 +02:00
Anders Gidenstam
f9689a561c Synchronized with JSBSim/CVS. 2013-06-11 22:14:51 +02:00
James Turner
0d6cd11dd4 Work with revised NetChannel poll() API. 2013-06-09 22:57:45 +01:00
Thomas Geymayer
1ad9756a4b Fix jsbsim gear location in the property tree.
Need to convert from feet to inch.
2013-05-26 20:57:28 +02:00
Christian Schmitt
d9026d776c update gitignore 2013-02-28 13:37:49 +01:00
James Turner
b0a879a5b1 Fix ADA compilation.
Patch by Roland Haeder
2013-02-11 22:16:02 +00:00
James Turner
37f783e92d File mode fixes.
Contributed by Roland Haeder
2013-02-11 22:15:23 +00:00
Christian Schmitt
2013f7149d Some headers missing... ;) 2013-02-07 19:00:54 +01:00
James Turner
7ad55a206e Adapt to revised logging API. 2013-02-07 12:02:52 +00:00
James Turner
5826cea0a8 Work-around a JSBSim reset issue following the sync.
Thanks to Ron Jensen for the catch. I've added a comment so we know to update this on the next JSBSim sync.
2013-01-28 12:54:21 +00:00
Torsten Dreyer
07720af693 sync with JSBSim 2013-01-19 22:39:28 +01:00
Thomas Geymayer
fee2844ec3 Fix #953. 2012-12-03 09:28:48 +01:00
ThorstenB
a784443a24 Remove static property dependencies
preventing us from wiping properties on reset/reinit/subsystem recreate.
(more work required for "native_gui" and "ATC-Outputs" protocols)
2012-11-18 16:35:54 +01:00
ThorstenB
4e6f0e18fd YASim airborne start-up
Gear should be up when starting in-air.
2012-11-17 20:05:16 +01:00
ThorstenB
adc95a4b55 #600, for Curt... ;-) allow speed-up value to use fractions
"speed-up" can now also be used for slow-motion (i.e. 0.5 / 0.25 / ...)
or fractional speeds (3.141...). This was already working for instruments
(for replay) before, now it's also considered by FDM simulation.
2012-11-17 20:01:19 +01:00