1
0
Fork 0
Commit graph

343 commits

Author SHA1 Message Date
Erik Hofman
f1f2e9f21d Brendan Black:
when active does not touch the way the YASim jet calculates fuel flow, but separates out the afterburning component of thrust, calculates the TSFC of that component and uses the same method of fuel flow calculation for the afterburning component then adds it to the existing fuel flow

When inactive (atsfc doesn't exist or is zero) it just behaves exactly as before

I finally got around to testing this small patch thoroughly, and I'm satisfied that it doesn't affect anything else & works across many different versions (i've been testing it with current as it has changed over the last 7 months)
2016-07-17 11:30:07 +02:00
Jeremy Bicha
25928bf614 Use CMAKE_INSTALL_BINDIR
Allow /bin install directory to be overriden. Debian for example uses this
to install FlightGear to /usr/games/ instead of /usr/bin/

https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
2016-07-09 18:52:58 -04:00
James Turner
7870e03faf Build fixes for yasim tests / SGPath changes. 2016-07-04 10:17:41 +01:00
James Turner
7f3fe584e3 Update for path-aware easyXML API 2016-07-03 23:43:39 +01:00
James Turner
03ecac9dbc Work with new SGPath API. 2016-06-22 17:36:05 +01:00
James Turner
a549c8fe45 Fix unused constants in YASim 2016-01-12 12:50:44 -06: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
James Turner
f2d6b76b13 Portability: Fix compile errors on MSVC (cmath)
From Scott (xDraconian)
2015-03-24 11:11:42 -05: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
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
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
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
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
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
Thomas Geymayer
ba088d9f1e Fix warnings identified by gcc. 2013-07-04 23:07:36 +02:00
Christian Schmitt
d9026d776c update gitignore 2013-02-28 13:37:49 +01:00
Christian Schmitt
2013f7149d Some headers missing... ;) 2013-02-07 19:00:54 +01:00
Thomas Geymayer
fee2844ec3 Fix #953. 2012-12-03 09:28:48 +01:00
ThorstenB
4e6f0e18fd YASim airborne start-up
Gear should be up when starting in-air.
2012-11-17 20:05:16 +01:00
James Turner
72131a4a49 Alexis Bory:
The purpose of this little cosmetic patch is to ease the use of proptest's output in a ploter.
2012-11-08 09:06:24 +00:00
Mathias Froehlich
26664aaff0 Push SGMaterial use into these classes that need it. 2012-08-29 06:29:29 +02:00
Frederic Bouvier
75fc136931 Remove redundant inclusion of math/SGMath.hxx 2012-05-05 11:20:04 +02:00
ThorstenB
b9260f543b Ganael Laplanche: fix include dependencies for FreeBSD support 2012-05-05 01:08:20 +02:00
ThorstenB
efa18fae1e Add CMake option to disable building test applications. 2012-04-08 18:49:11 +02:00
ThorstenB
cab350d7fc YASim performance optimization
Use stashed property nodes.
2012-04-05 21:06:39 +02:00
ThorstenB
ed1ec90287 YASim performance optimization
Several functions of YASim's math wrapper are hotspots. Allow compiler
optimization/inlining.
2012-04-05 21:02:09 +02:00
ThorstenB
5fb6614c23 Remove unused variables (moment/ias) 2012-04-05 21:02:09 +02:00
Frederic Bouvier
0dcadb7e1a Fix a typo in proptest.cpp 2012-03-30 20:59:39 +02:00
Frederic Bouvier
440234d4eb Compile proptest.cpp with MSVC. There is still a link problem though 2012-03-30 07:41:08 +02:00
Emilian Huminiuc
825d6565a4 YASim: enable building of YASim's proptest utility
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
2012-03-29 09:29:29 +01:00
James Turner
59253531bc Fix YAsim linkage. 2012-03-26 16:09:21 +01:00
James Turner
a38362646d Don't create intermediate static libraries for build fgfs. (Speeds up rebuilds in Xcode dramatically, possible in other IDEs too) 2012-03-26 13:09:39 +01:00
Frederic Bouvier
19e7163971 Compile with MSVC 9 2012-03-25 14:39:24 +02:00
ThorstenB
9264243a71 Use tiedPropertyLists instead of manually matched tie/untie calls.
Ensures we don't forget to untie some individual properties.
2012-03-04 17:38:06 +01:00
ThorstenB
da73dd97d3 Clean-up cmake (linker) dependencies. 2012-02-24 22:23:15 +01:00
Curtis L. Olson
cf86d37514 Fix YASim's /accelerations/pilot/{x,y,z}-accel-fps_sec computations. These
are the accelerations (forces) as felt from the pilot's perspective.  This
combines the accelerations due to change in velocity vector and gravity.

Previosly the gravity part was right, but the body accelerations were being
transformed incorrectly.  The error was very subtle and basically amounted to
the fact that inverting an axis of a vector before transforming it is not
equivalent to transforming the vector and then inverting that axis.

After this fix, pilot accelerations + gyro + gps can be fed into an external
kalman filter and it will converge properly (extra confirmation that there
was a problem and this fix corrects it.)
2012-01-04 19:17:32 -06:00
ThorstenB
dac00efbc7 Fix some compiler warnings.
Comment out unused code.
2012-01-02 23:16:17 +01:00
ThorstenB
d47342a5a4 Add --log-class option, improve logging classes.
Replace SG_GENERAL by more specific log classes in many places.
Allow "," to separate logging classes (using "|" is odd on the
command-line).
Also add new option to make logging more useful for developers.
You can use:
  --log-level=debug --log-class=environment
to only get environment debug messages, or
  --log-level=debug --log-class=sound,ai
to only get debug messages related to the sound or AI subsystem.
2011-12-11 14:06:17 +01:00
Frederic Bouvier
f1d0ac52a6 Fix MSVC9 build 2011-11-14 08:38:58 +01:00