1
0
Fork 0
Commit graph

1056 commits

Author SHA1 Message Date
andy
c89e5203a5 Insert a sanity hack from Melchior that apparently prevents a NaN from
popping up and crashing when the B-29 model is in use.  This isn't the
right solution; we should fine the NaN condition.  But it's harmless
and allows development with the B-29 to continue.
2005-03-23 18:54:58 +00:00
andy
e4142d94d4 I fixed the gear-ratio handling in the solution computations a while
back, but forgot to put the same fix into the runtime code.  Also
added some comments so I don't get confused again the next time I come
through here. :)
2005-03-22 18:17:08 +00:00
ehofman
d871ca845f Cygwin fixes. 2005-02-18 12:40:38 +00:00
ehofman
02a757f9e6 MSVC (warning) fixes. 2005-02-18 10:16:30 +00:00
ehofman
b5bfbcf706 Add the missing carrier files. 2005-02-17 10:37:26 +00:00
ehofman
c2e688244d Mathias Frohlich: Add carrier capabilities for YASim aircraft. 2005-02-17 10:26:14 +00:00
curt
5783208d9d Fix a "signededness" error. 2005-02-15 18:07:06 +00:00
ehofman
a7ee9554e7 Make sure snprintf can be found 2005-02-02 08:47:33 +00:00
andy
671bffe9af Constant-speed props were seeking to engine speed, not prop speed. 2005-01-26 18:30:45 +00:00
ehofman
18ff3a6108 Make yasim accept the launchbar and hook properties. They are not tied to anything yet though. 2004-12-27 13:18:29 +00:00
ehofman
c09d1c92ca Sync. w. JSBSim CVS 2004-12-16 12:47:20 +00:00
andy
28f50df1d5 Support for a new "contra" attribute on propellers, which properly
models them as contra-rotating pairs.
2004-12-13 23:48:43 +00:00
ehofman
8214364414 Mathias Fröhlich:
I still work on getting the YASim models see the detailed environment
especially the carrier.

I have *forgotten* to initialize and to destruct the ground cache object!
Oooopppss!
2004-12-08 14:48:06 +00:00
ehofman
63c1f4b613 Mathias Fröhlich:
This patch makes the aircraft carrier's hardware  appear in the scenegraph.
2004-11-26 10:24:48 +00:00
curt
91ae7ce82a Add a *really* crude model of ITT, Oil Temp, and Oil Pressure. This
currently just returns a lagged normalized value in the range of 0-1 that
is proportional to N1.  It's up to the engine gauge to scale to the right
range.  This is for lack of a real model of these items so we can have
something to drive the engine gauges.
2004-11-23 21:35:30 +00:00
ehofman
7159e318e1 Mathias Fröhlich:
I have now split out the ground cache functions into src/FDM/groundcache.[ch]xx
Attached are the two files and the patch to integrate that cache into
FGInterface.

The code is nowhere used at the moment, the fdm's need to be updated to use
that ground cache. The JSBSim-dropin.tar.gz from Martins ftp server does this
for example.

The carrier's scenegraph is not yet processed to be visible for ground
intersection testing. So the only benefit up to now is that the api is set
up. Using this I can put the changes to make JSBSim work with that into
JSBSim's cvs. Also I aim to provide Andy a patch to make use of that with
YASim.
2004-11-22 10:10:33 +00:00
ehofman
337d0d1be6 Add some missing bits from Mathias' carrier code. 2004-11-20 12:44:42 +00:00
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
ehofman
0ab2a40c2a Roy Vegard Ovesen:
I've added two new debug log types for the instrumentation and systems. They
used to use the autopilot debug log, because I couldn't figure out how to
make new log types. Well, now I have figured it out.  ;-)
2004-10-24 11:05:14 +00:00
ehofman
3d3922cd46 Accelerations should be added to the velocity, not multiplied 2004-10-20 14:27:29 +00:00
ehofman
133a7d4271 Use the right conversion factor and multiply the accelrations by dt. 2004-10-20 09:47:37 +00:00
ehofman
dfb822e461 Directly updating the right properties doesn't work when not uing --fdm=null, create a separate branch instead. 2004-10-20 09:21:08 +00:00
ehofman
8b53b86aa0 A first stab at an ACMS (Aircraft Condition Monitoring System) Special Purpose support FDM. Move the ADA FDM into the Special Purpose directory and make the SP FDM's a configure option. 2004-10-19 11:10:20 +00:00
ehofman
e6c6c666c2 I forgot a linker dependency. It really si time to figure out why these are all needed. 2004-10-08 11:30:07 +00:00
ehofman
5c02b0baf0 Melchior FRANZ:
As I had reported on 2004/8/4 00:02:56 ("yasim + bo105 + vrp + @#%$#@ == argh!")
there must be a bug somewhere in YASim, which is responsible for the Bo105
turning around the FDM origin (nose tip) rather than the CG. Some people assumed
that I was just another victim of the "view offset" illusion, but this wasn't
and isn't the case.

Maik Justus (the rotor man) has now supposedly found the bug in YASim[1].
Look at this code in FDM/YASim/Integrator.cpp:35--66:
2004-10-07 20:34:56 +00:00
ehofman
b22ece2e01 Handle the new linker dependencies after rearranging the FlightGear header files a week or two ago. 2004-10-06 09:23:51 +00:00
ehofman
2836b35989 Sync w. JSBSim CVS 2004-09-15 12:19:46 +00:00
ehofman
5b340578ae Sync. w. JSBSim CVS. 2004-09-11 12:41:05 +00:00
curt
85fe50dcc5 Add support for a turbo prop condition lever.
Add support in the aircraft config file for a low idle and high idle n2.
2004-07-27 20:39:56 +00:00
ehofman
73e70fdb29 Fix a numeric_limits problem for older stdc++ libraries. 2004-07-21 06:56:59 +00:00
curt
77e21b26d2 Curt:
Stub in hooks for Propeller feathering controls and the turbo prop "condition"
lever.

I added a line in FGFDM.cpp to force control properties to exist if they
don't already.  This way you can specify anything you want and find them
in the property browser, otherwise no one else may create them and you are
stuck.

In PropEngine::solve() the code original sets _running = true at the
beginning and then sets running = false at the end.  I changed this to
save the current value at the start, set to true, solve(), and then
restore the original value at the end.  That way if we start off with
_running = true, we don't have to hack up the calc() routine which wasn't
using the value anyway.

Finally I added some very initial support to shut down a turbine engine
(_running = false) when the condition lever goes to zero.
2004-07-20 22:17:58 +00:00
ehofman
1d2af567bf Frederic Bouvier:
I have 3 issues that are fixed by this set of patches.

1. In extensions.cxx
  #else if !defined( WIN32 )  must be changed by
  #elif !defined( WIN32 ) because the text after #else
  seems to be ignored

2. banner is not available on windows, only cygwin

3. ANSI escape sequences are not interpreted on the
   windows console. We just have garbage that is hard
   to read.
2004-07-03 10:59:34 +00:00
ehofman
5c685b34de Sync. with JSBSim CVS again. This fixes some small issues. 2004-06-27 19:35:54 +00:00
david
2bcec1fbbc Ignore generated files. 2004-06-15 12:48:22 +00:00
ehofman
8e1482f746 Sync w. JSBSim CVS 2004-06-14 11:40:45 +00:00
ehofman
22c0529280 Work around a potential never ending loop problem. A proper fix will be in the next JSBSim update. 2004-06-13 18:44:21 +00:00
ehofman
a3c8bc99a2 Incorporate some of the changes from the Linspire diff. 2004-06-06 14:28:45 +00:00
ehofman
b3e9697262 Add the AIModel based air traffic subsystem from Durk Talsma. 2004-06-03 17:59:14 +00:00
andy
3ef1c6f540 Fix a bug with propeller gearing. The torque computations weren't
properly correcting for the gear ratio.  This is the source of the
problems Vivian and Jim were having with the Spitfire and Mustang.
2004-05-18 01:46:36 +00:00
curt
944a82b576 Clean up some sound buffer allocation/deallocation issues. 2004-05-10 21:24:30 +00:00
andy
aadb3cb94f Fix from Melchior: It replaces the ridiculous 5 seconds by
the 30 seconds that Maik had originally intended, according to the comment.
This is important for the pending sound and rotor disc changes (and of course
for realism).
2004-05-06 16:28:08 +00:00
andy
2aaa1803d3 Reverse the sense of manual propellers. Low numbers == fast
propeller, silly.
2004-05-01 15:18:27 +00:00
andy
e14aa3627f Oops, I broke engine starting. 2004-05-01 14:30:00 +00:00
andy
0bd25eb082 It can't be turned off, so force the running flag to true to avoid an
uninitialization stupidity.
2004-05-01 04:59:09 +00:00
andy
a3ba94c39e Initial checkin of a TurbineEngine implementation. This hasn't been
tested at all yet, but it doesn't seem to have broken anything so it
should be safe.  See the README in the base package for docs.
2004-05-01 00:26:33 +00:00
andy
9f2a8d4651 Attempt at a fix for the propeller torque problems in the
"slow/windmilling propeller" regime.  I'm happy with the foundations
of the solution, but this hasn't been complete tested yet.  The
solution behavior seems fine on the planes I tried.
2004-05-01 00:25:56 +00:00
andy
b1c964030d Refactoring in preparation to add a turbine engine to YASim. The
PistonEngine class has grown an "Engine" superclass.  Some other stuff
moved around too, and I cleaned up some property naming while I was in
there.  This hasn't been tested very thorougly, hopefully I didn't
break anything.
2004-04-30 19:06:29 +00:00
andy
7ceb85d454 Changes to get FlightGear (well, the src directory at least) to
configure and compile out-of-the-box on a MinGW target:

Use -lSDL instead of -lglut32 on windows builds when --enable-sdl
is set.

Link against alut.dll in addition to openal32.dll.

Replace BSD bcopy() with ANSI C memmove() in a few places.  This is
simpler than trying to abstract it out as a platform dependency in a
header file; bcopy() has never been standard.

The ENABLE_THREADS handling has changed to be set to 0 when threads
are not in use.  This breaks expressions like #ifdef ENABLE_THREADS.
Replace with a slightly more complicated expression.  It might have
been better to fix the configure.ac script, but I didn't know how and
this whole setting is likely to go away soon anyway.

The MinGW C runtime actually does include snprintf, so only MSVC
builds (and not all WIN32 ones) need _snprintf in JSBSim/FGState.cpp

Building on a platform with no glut at all exposed some spots where
plib/pu.h was being included without a toolkit setting (it defaults to
glut).  Include fg_os.hxx first.

And when still using glut, glut.h has a bizarre dependency on a
_WCHAR_T_DEFINED symbol.  It it's not defined, it tries to redefine
(!!) wchar_t to disasterous effect.
2004-04-30 00:52:11 +00:00
curt
795abb81a4 Change the message passing structure just a bit in order to remove a possible
time dependency ambiguity on the remote end.
2004-04-20 22:53:38 +00:00
andy
7b3c6c0ff7 Units bug. 2004-04-14 17:05:33 +00:00
curt
0490631250 Jim Wilson:
This update contains a change to not overwrite the altitude-ft preset during
"onground" start.  The change also prevents a ground trim issue with the
JSBSim fdm when a "reset" is done by FlightGear.
2004-04-05 16:47:13 +00:00
curt
b5c9a3c0e2 Clean up some debugging output. 2004-04-02 16:17:08 +00:00
curt
2acdd02879 Clean up various compiler warnings that have crept into the code. This
by no means get's them all, but it's a start.
2004-04-01 15:27:53 +00:00
andy
dc41cdb948 More work to get the starter behavior right, without breaking David's
work on the pa28 idle and without creating ridiculous side effects
(like being able to fly the aircraft with the starter motor, heh).
This one looks pretty good for now, pending work on the propeller to
get its low speed drag in line with reality.
2004-03-27 18:34:04 +00:00
andy
c62048d5e2 YASim now supports the new fuel.nas fuel management system. It
reads the /consumables tree for input to determine weights, but
places output only in /engines/engine[n]/fuel-consumed-lbs where
it gets picked up by the Nasal code.
2004-03-27 04:07:18 +00:00
andy
17b6142a76 Tune up the starter torque to match the recent changes to engine
friction.  We should get these better calibrated at some point...
2004-03-26 22:53:41 +00:00
curt
349195795e Jim Wilson:
This is a fix for my earlier "Remove some hardcoded dependencies between fdm,
viewer and acmodel" patch.  The problem was discovered when testing the
wrightFlyer.
2004-03-23 13:19:40 +00:00
curt
bcc42cbe4c Various final tweaks for the 0.9.4.pre1 release. 2004-03-22 20:19:18 +00:00
curt
ba840da288 plib-1.8.0 no longer defines the cchar type (which we used because we were
deriving a class and the base class used this type.)  Return to using
const char and hope people compiling against earlier versions of plib
have compilers that think typedef const char cchar; char *abc; is equivalent
to const char *abd;
2004-03-22 15:00:42 +00:00
ehofman
f08625d64d A hack to prevent a devide by zero sotuation. Should we still leave the balloon in CVS without WeatherCM? 2004-03-22 10:59:08 +00:00
curt
f7fc455b0d Jim Wilson:
Remove some hardcoded dependencies between fdm, viewer and acmodel classes and
replaced them with property references.   Fix roll offset in viewer.
2004-03-19 03:30:18 +00:00
curt
fe7321e91e Add extern "C" wrappers. 2004-03-16 20:44:00 +00:00
david
25290c4467 Remove the old WeatherCM module. 2004-03-16 20:19:07 +00:00
curt
fbee3d10f0 Rob Deters: UIUC updates from March 1, 2004. 2004-03-16 04:01:38 +00:00
ehofman
c37874e140 Fix an issue where math.h doesn't define sqrt in namespace std (at least on MSVC) and remove DOS line-endings. 2004-03-15 09:24:57 +00:00
ehofman
f63d336ebc Sync. with JSBSim CVS. 2004-03-14 14:57:07 +00:00
ehofman
a97b69056e Fix a string clearance issue with certain compilers. 2004-03-12 17:33:30 +00:00
david
620832274a Increase friction at idle, so that the engine idles more slowly.
The friction factor should be tunable through a runtime parameter;
right now, it is optimized for the PA-28-161.
2004-03-07 01:26:30 +00:00
andy
8d1698d21a Added a <solve-weight> subtag of the approach/cruise parameters that can
be used to set the variable weights to specific values for the solution.
2004-02-18 15:36:35 +00:00
andy
500b081ca5 Allow a "fuel" attribute in the approach and cruise tags to have
values other than the defaults (20% and 50%, respectively)
2004-02-17 23:24:36 +00:00
ehofman
1c576866b2 Adjust the turbine names for N1, N2 and EGT_degC to match those already specified by YASim (n1, n2 and egt_degf). 2004-02-17 09:07:27 +00:00
ehofman
c92cb650eb Add the latest version of JSBSim including support for a Visual Reference Point 2004-02-14 10:19:56 +00:00
andy
1bc3c5eca0 Yank the sqrt() terms from the twist calculations. They were causing
solution failures for reasons I have still to investigate.
2004-02-13 18:12:08 +00:00
ehofman
7da5a741fb Revert to the previous version because it looks it isn't the friction force after all. 2004-02-13 15:20:13 +00:00
ehofman
c648bc18f7 Make sure the friction forces are positive, otherwise they will push the aircraft rather than holding it into place. The ground reaction code still needs some attention. 2004-02-13 12:54:38 +00:00
andy
fc565ebd86 Put the sqrt(frac) terms back into the wing twist. 2004-02-09 19:53:14 +00:00
andy
85115ef347 Fix the left/right terms in the twist handling to be symmetrical. 2004-02-09 15:18:33 +00:00
ehofman
869aa997a5 Initialize the varables *before* reading in the configuration file 2004-02-05 13:47:48 +00:00
andy
5a9c5d80c8 Thrust reversers. Very simple implementation. 2004-01-30 23:21:26 +00:00
andy
e8009ed8fa Forgot the gear ratio handling in stabilize() method, so the solver
got wrong values.
2004-01-25 18:57:11 +00:00
andy
5af1e589de Wire up a "gear-ratio" attribute for geared propeller aircraft 2004-01-24 23:09:41 +00:00
andy
0a9a72f209 Don't default to exactly zero RPM if the RPM property isn't there.
The engine model doesn't like that.
2004-01-21 22:51:21 +00:00
ehofman
fbd21c499f Turn the console colors back to default before continueing 2004-01-19 13:51:05 +00:00
ehofman
2c59d1621f MSVC fix 2004-01-15 10:18:51 +00:00
curt
95440173ca Curt Olson:
Sync with most current JSBSim CVS.
2004-01-14 22:09:39 +00:00
curt
9c49534907 Attempt #1 to sort out confusion between left / right / parking brake
controls in the cockpit vs. which wheels they apply to.  FlightGear now
sets /controls/gear/brake-left, /controls/gear/brake-right, and
/controls/gear/brake-parking.  It should be up to the FDM to sort out
which wheels under which circumstances are affected by these controls
and ultimately what happens to the physical motion of the aircraft.
2004-01-12 17:39:41 +00:00
andy
ba44655796 Attenuate turbulence near the ground. Tweak turbulence numbers. 2004-01-12 04:03:55 +00:00
andy
dfffe9c924 Move the turbulence "airmass" according to the local wind.
Clean up and better document the magic numbers in Turbulence.cpp
2004-01-10 22:34:49 +00:00
andy
ce91286e19 First cut at a turbulence model for YASim. It's a
perlin/scale-invariant vector field implemented as a 2D lookup table.
Seems to work OK, but needs testing and feedback.
2004-01-09 17:05:26 +00:00
ehofman
4cc853e2a2 MIPSpro 7.4 fixes 2003-12-27 22:27:27 +00:00
andy
a59a272702 Yank more debug code. 2003-12-22 19:02:20 +00:00
andy
d0af0c5f58 Export a "/sim/crashed" property to indicate a crash.
Yanked some ancient debug code and cleaned up some whitespace while I
was in there.
2003-12-19 19:02:48 +00:00
andy
439a9fa1e4 Minor API changes to support the new sg_geodesy implementation. A few
places now use sgCartToGeod() instead of rolling their own
approximation.  And YASim is now using exactly the same 3D coordinate
system as the rest of FlightGear is.
2003-12-19 02:42:32 +00:00
ehofman
76585fb801 STL chnages 2003-12-11 14:50:30 +00:00
ehofman
44ce4cdb97 Melchior FRANZ:
I think the ufo turns a bit too fast. 25 is better.
2003-12-08 18:08:27 +00:00
ehofman
7ac15db168 Melchior FRANZ:
Everyone knows that ufos can turn on the spot.
Turn on rudder input at low speeds. (Quite useful when using the
ufo fdm for exploring the scenery.)
2003-12-07 17:39:48 +00:00
andy
9d15561937 My refactoring left two values uninitialized when running a
helicopter.  Melchior caught the bug.
2003-12-03 21:26:03 +00:00
andy
3b2d97289c Cleanup and refactoring to better integrate the helicopter code into
the core YASim stuff.  Mostly cosmetic: whitespace adjustment, dead
code & meaningless comment removal, a little code motion to better
partition the helicopter handling from the original code (no more
giant if() { ... } around the solver).  Added a warning to the parser
to try to eliminate the string booleans that crept in.

There should be NO behavioral changes with this checkin.
2003-12-01 01:22:27 +00:00
ehofman
3459147f5f Add a refference to sprintf 2003-11-27 13:44:20 +00:00
ehofman
c7ae0e3b0f Partability fix 2003-11-27 10:24:05 +00:00
david
195eadc739 Use SG_LOG for debugging messages from the YASim helicopter model. 2003-11-25 18:50:47 +00:00
david
5644f22513 Make more output honour debug_lvl. 2003-11-24 17:59:41 +00:00
david
5fa04adf68 Try to coordinate between the different logging idioms of JSBSim and
FlightGear: when FlightGear wants things quiet, make JSBSim quiet as
well.
2003-11-24 17:59:10 +00:00
curt
a37515d7fe Add support for passing a CG offset (in inches) to an external FDM. 2003-11-13 03:10:09 +00:00
curt
23c1057a19 Add support for sending out a requested aircraft weight to an external FDM
via the "pipe" interface.
2003-11-10 21:56:32 +00:00
curt
69f2597a0c Fix an automake squawk. 2003-10-31 21:15:43 +00:00
ehofman
a0216af01d Fix a potention buffer overflow 2003-10-24 12:39:31 +00:00
ehofman
a793268be3 David Culp: Heres are some tweaks to the FGSimTurbine module that smooth out the animation between engine phases, and between afterburner and non-afterburner operation. 2003-10-24 12:25:24 +00:00
ehofman
bf859a91c3 Update to the latest version of JSBSim 2003-10-19 09:48:44 +00:00
ehofman
2ca827a3a4 Fix a bug that gets triggered at least in MSVC and gcc-2.95 2003-10-19 09:27:27 +00:00
david
d4b9ca371c Set the RPM from the property tree with each iteration. This allows a
YASim prop model to start with the prop spinning.
2003-10-18 20:07:46 +00:00
david
202e79b4ad Add the ability to set the RPM from the outside. 2003-10-18 20:07:06 +00:00
curt
5161029fc5 Fix a typo which Frederic's compiler flagged. 2003-10-17 19:17:17 +00:00
curt
cca9f49425 Remove and extraneous starting character. 2003-10-17 14:26:23 +00:00
curt
5333f82eb1 Maik Justus: modifications to add helicopter modeling to YASim. 2003-10-16 14:56:13 +00:00
curt
78cad450e6 Initial revision.
Maik Justus: First pass at helicopter support for YASim.
2003-10-16 14:40:13 +00:00
ehofman
f9b85dc2fd Fix a dependency problem 2003-09-25 09:09:35 +00:00
ehofman
980012e168 Move FGEventMgr and FGSubsystemMgr over to SimGear, add SGEventMgr to FlightGear's globals structre and some small code cleanups 2003-09-24 17:20:55 +00:00
ehofman
b431775273 David Culp:
Here's a new FGSimTurbine module.  Changes are:

1.  Adds starting and stopping functionality
2.  Calculate() now calls other functions, based on the engine's state, which gives more readable code.

Until now turbine engines were always running as long as fuel was available. With this new module the engine defaults to OFF.  To start with the engine running, the variable FGEngine::Running must be set to true at sim startup. In FlightGear this is done with --prop:/engines/engine[n]/running=true.

To start the engine (on the ground), first set the starter to ON, i.e. FGEngine::Starter is set to true.  In FlightGear this is done by toggling /controls/engines/engine[n]/starter to TRUE.  Note that the current FlightGear key binding will not work, as it causes the starter to quit when the key is released.  A new key binding is needed, without the mod-up.

When N2 reaches 15% or greater, place the fuel cutoff control to FALSE.  This is FGEngine::Cutoff.  In FlightGear this is done with /controls/engines/engine[n]/cutoff set to FALSE.  The engine will then accelerate to idle.  Upon reaching idle, the starter is automatically turned off, and the engine is running.  There is presently no FlightGear key binding for the fuel cutoff switch.

To shut off the engine, place the fuel cutoff control to TRUE.

If you shut down the engine in flight it will windmill.  To airstart you will need at least 15% N2, just as with a ground start.  When you have enough N2, place the cutoff control to FALSE and the engine will restart. Note that if you can't get enough N2 by speeding up, you can get it by using the starter.

The reverser still works, and is controlled in FlightGear with /controls/engines/engine[n]/reverser.  With the reverser control on (TRUE), the engine will produce negative thrust in proportion to throttle position, i.e. to get more reverse
thrust, increase throttle.
2003-09-23 09:25:24 +00:00
ehofman
4a5dbf1106 David Culp:
Here's a new FGSimTurbine module.  Changes are:

1.  Adds starting and stopping functionality
2.  Calculate() now calls other functions, based on the engine's state, which gives more readable code.

Until now turbine engines were always running as long as fuel was available. With this new module the engine defaults to OFF.  To start with the engine running, the variable FGEngine::Running must be set to true at sim startup. In FlightGear this is done with --prop:/engines/engine[n]/running=true.

To start the engine (on the ground), first set the starter to ON, i.e. FGEngine::Starter is set to true.  In FlightGear this is done by toggling /controls/engines/engine[n]/starter to TRUE.  Note that the current FlightGear key binding will not work, as it causes the starter to quit when the key is released.  A new key binding is needed, without the mod-up.

When N2 reaches 15% or greater, place the fuel cutoff control to FALSE.  This is FGEngine::Cutoff.  In FlightGear this is done with /controls/engines/engine[n]/cutoff set to FALSE.  The engine will then accelerate to idle.  Upon reaching idle, the starter is automatically turned off, and the engine is running.  There is presently no FlightGear key binding for the fuel cutoff switch.

To shut off the engine, place the fuel cutoff control to TRUE.

If you shut down the engine in flight it will windmill.  To airstart you will need at least 15% N2, just as with a ground start.  When you have enough N2, place the cutoff control to FALSE and the engine will restart. Note that if you can't get enough N2 by speeding up, you can get it by using the starter.

The reverser still works, and is controlled in FlightGear with /controls/engines/engine[n]/reverser.  With the reverser control on (TRUE), the engine will produce negative thrust in proportion to throttle position, i.e. to get more reverse thrust, increase throttle.
2003-09-23 09:24:36 +00:00
curt
7807a68fa3 Another step towards making aircraft more self contained. YASim aircraft
now read the config file out of the individual aircraft directory rather
than the collective Aircraft-yasim/ directory (which is now obsolete.)
This requires a corresponding update of the base package cvs.
2003-09-20 03:33:06 +00:00
ehofman
3ba01fa762 New automake, new problems. Add $base_LIBS for programs since $LIBS isn't substituted automatically anymore 2003-08-29 09:03:49 +00:00
ehofman
0a7cc77d5e Initialize some variables 2003-08-11 08:35:29 +00:00
david
1d4a7659fc Fix drag when engine is shut down, by avoiding negative RPM.
The Propeller class ignored negative RPM but still returned a torque
value, which ratcheted up a higher and higher negative RPM until drag
overwhelmed the aircraft.

In reality, the propeller should windmill at a reasonable postive RPM,
introducing a constant drag on the aircraft -- the propeller should
*not* stop unless the plane is flying very slowly.  That's a future
project.
2003-08-06 21:38:01 +00:00
curt
562ce6f5e2 Ooops, I added another item to what I write to the buffer, but
forgot to make it big enough to hold the new item.  This was manifesting
itself as a crash on reset (if the ExternalPipe FDM was being used.)
2003-08-01 17:06:11 +00:00
mselig
c0eea29af8 Fixes namespace conflict with the variable ch. Changed to chord_h. 2003-07-27 17:54:18 +00:00
ehofman
0ff5f409c0 Add the abillity to attach a propeller thruster to a turbine engine 2003-07-26 09:12:54 +00:00
mselig
7dd8eb61d0 Comments added to printf statments. 2003-07-26 00:19:14 +00:00
mselig
658a838ea0 Includes mods to greatly shorten the uiuc_recorder.cpp code. 2003-07-25 17:55:27 +00:00
mselig
6adfea97e4 Fixes compiler warning related to this gcc message: This file includes at least one deprecated or antiquated header. Also, mods made to improve the uiuc_recorder code. 2003-07-25 17:55:20 +00:00
mselig
6ae39d57fa Fixes compiler warning related to this gcc message: This file includes at least one deprecated or antiquated header. 2003-07-25 17:53:53 +00:00
mselig
2606555bf6 UIUC code initilization mods to tidy things up a bit. 2003-07-25 17:53:35 +00:00
mselig
9f518ef343 Adds a basic FDM model for LaRCsim debugging purposes. 2003-07-25 17:53:13 +00:00
mselig
27a7b7f5d9 Adds a basic FDM model for LaRCsim debugging purposes. There is a bug in FGFS-LaRCsim that I have yet to put my finger on. 2003-07-25 17:53:08 +00:00
ehofman
a2b71872ad This fixes the K to F conversion for the EGT output 2003-07-24 14:43:11 +00:00
curt
419f09f804 Curt:
I have added a fledgling replay system that records flight data and control
positions during the flight.

I have added an internal command called "replay" which will trigger a replay
of the entire saved flight data set.  This could be bound to a keyboard or
menu command, in fact this entire module is screaming for someone to build
a gui to control playback speed, amount of playback, etc.

This is the initial version so there are kinks that still need to be worked
out, please be patient.
2003-07-17 18:24:17 +00:00
tony
36183cbc3d Make initTheta() use the results of the search it performs. 2003-07-17 02:32:39 +00:00
david
b8a8d2194a More turbulence tweaks and fixes.
Skip turbulence calculations with magnitude is 0.
2003-07-14 22:34:08 +00:00
david
5d3b58438a Make sure sign is preserved for turbulence direction. 2003-07-14 20:48:23 +00:00
tony
16c029c609 Fix for setting initial pitch angle on the ground. 2003-07-14 11:47:25 +00:00
david
9d318461b9 It's a direction, not an axis. The z direction is the one that should
occur full force for turbulence.
2003-07-13 20:18:51 +00:00
david
1691d3ba19 Add the ability to control turbulence rate as well as magnitude.
Square the normalized direction acceleration for the y and z axes, so
that turbulence predominantly affects pitch.

Bind to the /environment/turbulence/magnitude-norm and
/environment/turbulence/rate-hz properties in FlightGear.
2003-07-13 20:13:18 +00:00
ehofman
92ae2adeb1 Fix a mistake 2003-07-07 13:56:23 +00:00
david
16635b6b98 Move the turbulence magnitude away from the peaks. 2003-07-01 20:52:12 +00:00
ehofman
53aceeafe8 Solaris namespace clash fix 2003-07-01 16:12:21 +00:00
david
c5be967fba Avoid strong oscillations at turbulence extremes. 2003-06-29 21:17:21 +00:00
ehofman
0ff6c68c01 This patch normalizes the heading value YASim reports to the interface 2003-06-28 21:49:45 +00:00
ehofman
45e20b6565 Get rid of a multiple defined symbol warning" src/FDM/LaRCsim/ls_step.c
"
2003-06-20 19:53:56 +00:00
mselig
ee84e76641 Fixes some weirdness that Fred reported. Used his patch with one mod. 2003-06-10 06:19:31 +00:00
mselig
de16c7d222 putting back the pilot-g used by accel.xml gadget 2003-06-09 06:15:46 +00:00
mselig
d26c1202d4 several init updates + changes init zeros to false 2003-06-09 06:15:40 +00:00
mselig
bd5ea959a0 gear retract rate input line changes 2003-06-09 05:20:52 +00:00
mselig
419860be01 mods made to setup for some initializations in uiuc code 2003-06-09 02:50:23 +00:00
mselig
3bd9321418 minor mods 2003-06-09 02:50:03 +00:00
david
6f3456a734 Rolled last change back out -- it was causing the default 172 to hang
on loading, because the fuel-quantity token was never consumed.
2003-06-08 12:04:41 +00:00
ehofman
e3bcb4b619 MingW 0.92 fixes 2003-06-08 12:01:43 +00:00
ehofman
cc0ec0b070 Make it possible for FlightGear to override the fuel tank contents with 0.0 2003-06-08 11:19:14 +00:00
ehofman
1100ae47e4 Fix a problem where the contents could be specified by JSBSim and by FlightGear, where JSBSim would override the FlightGear specified value. Now the JSBSim specified value will be discarded if Contents is already set. 2003-06-08 08:45:07 +00:00
ehofman
2c3fa12eea David Culp:
This version handles a zero fuel load better.  I found that if you try to consume fuel from an empty tank, with zero fuel flow, the FGEngine::Starved flag alternates
2003-06-08 08:44:30 +00:00
ehofman
9b353d3665 Some compiler fixes 2003-06-03 13:51:21 +00:00
ehofman
b0433381a7 I had some old SimGear include directories hanging around, so this got uncought. Thanks Melchior 2003-06-03 09:17:57 +00:00
ehofman
815333af23 sync JSBSim and FlightGear 2003-06-03 08:46:15 +00:00
ehofman
679325b947 Switch roll and yaw trim commands 2003-05-28 17:53:42 +00:00
ehofman
f405ddbce4 Rename some defines to prevent a namespace clash 2003-05-25 12:14:46 +00:00
ehofman
50e8454da3 Fix a typo 2003-05-24 08:41:11 +00:00
ehofman
8ac87ab5e6 Provide a better(?) solution to the windows GDI problem 2003-05-24 08:37:31 +00:00
ehofman
4974b3cc5a Provide a fix for the MSVC/Cygwin GDI build problem 2003-05-23 22:09:35 +00:00
mselig
0d9685184a sign change to rudder SAS 2003-05-22 14:53:17 +00:00
mselig
5c99b9308c Updates to properties for uiuc aircraft 2003-05-22 04:34:27 +00:00
curt
676e4c8846 Oops missed a couple things when I moved LaRCsim.cxx into src/FDM/LaRCsim/
This was masked because I didn't wipe src/FDM/libFlight.a and recreate it.
2003-05-20 11:29:06 +00:00
curt
b07b7c8ad0 Moved FDM/LaRCsim.[ch]xx to FDM/LaRCsim/LaRCsim.[ch]xx 2003-05-20 02:08:31 +00:00
curt
e9f4fc5972 Jim Wilson:
> > Here's a patch to add manual-pitch control to the propeller in YASim.  A new
> > control axis "PROPPITCH" is added.  Requires "manual-pitch" boolean property
> > in the "propeller" tag.
> >
> > Tags and Properties to add in order to enable:
> >
> > manual-pitch="true"
> >
> > <control-input axis="/controls/engines/engine[0]/propeller-pitch"
> > control="PROPPITCH" src0="0" src1="1" dst0="0.40" dst1="0.80"/>
> >
> > Note that for the time being, excessively low RPM or excessively high RPM is
> > brought undercontrol by a scaling range defined in the control-input tag
> > (see "dst0" and "dst1" properties).
2003-05-16 17:27:17 +00:00
ehofman
48fc16432b MSVC fixes 2003-05-15 08:17:53 +00:00
curt
7289eaa8ba Robert Deters:
I have attached some revisions for the UIUCModel and some LaRCsim.
  The only thing you should need to check is LaRCsim.cxx.  The file
  I attached is a revised version of 1.5 and the latest is 1.7.  Also,
  uiuc_getwind.c and uiuc_getwind.h are no longer in the LaRCsim
  directory.  They have been moved over to UIUCModel.
2003-05-13 18:45:04 +00:00
curt
3c7bdc31d9 Cosmetic changes for new code moved into simgear to make the naming scheme
better follow simgear conventions.
2003-05-13 03:18:42 +00:00
curt
56db994994 Moved src/Model/loader.[ch]xx and src/Model/model.[ch]xx to
simgear/scene/model/
2003-05-09 20:40:59 +00:00
curt
51c04e9e4c - Added "SG" prefix to sound classes that recently moved to SimGear.
- Cleaned up some minor compiler warnings.
- Moved src/Model/placement.[ch]xx over into simgear/scene/model/
2003-05-09 19:39:48 +00:00
curt
575b3ac98c Working at unraveling and breaking dependencies inside of src/Model.
I split the FGModelPlacement code out into it's own set of source files.
I created two versions of the fgLoad3DModel() routine.  One that is
  unecumbered by a panelnode dependency and one that is.  acmodel.cxx is
  the only place that needs to load an aircraft with instrument panels.
model.[ch]xx are now pretty much free to move over into simgear.
loader.[ch]xx should be able to follow closely behind.
This will be a big step towards being able to move the material management
code over into simgear.
2003-05-08 20:28:46 +00:00
curt
2119db35c3 This is step "1" of probably "many" in the process of separating out the
scene management code and organizing it within simgear.  My strategy is
to identify the code I want to move, and break it's direct flightgear
dependencies.  Then it will be free to move over into the simgear package.

- Moved some property specific code into simgear/props/
- Split out the condition code from fgfs/src/Main/fg_props and put it
  in it's own source file in simgear/props/
- Created a scene subdirectory for scenery, model, and material property
  related code.
- Moved location.[ch]xx into simgear/scene/model/
- The location and condition code had dependencies on flightgear's global
  state (all the globals-> stuff, the flightgear property tree, etc.)  SimGear
  code can't depend on it so that data has to be passed as parameters to the
  functions/methods/constructors.
- This need to pass data as function parameters had a dramatic cascading
  effect throughout the FlightGear code.
2003-05-06 23:46:24 +00:00
ehofman
ea24640f96 MSVC6 updates 2003-04-13 21:25:46 +00:00
david
64e81d1960 Make sure values get back to FGInterface, in case we're not trimming.
This is especially important for setting multiple values like Euler
angles.
2003-04-04 22:44:32 +00:00
david
7ba6807736 Fix to use renamed /controls properties. 2003-04-01 15:51:15 +00:00
ehofman
c3cefaf883 Updates to the controls properties tree. This is a major update so there may be one or two 'old' refferences left. To simplify the transisition there is a file called README.properties in the docs-mini directory of FlightGear that explains the new controls layout. 2003-04-01 12:43:18 +00:00
curt
68522eb75c There were several typos in the unbinding section of FGInterface. This meant
that after a reset or reposition, several FDM variable were not unbound
correctly and left dangling pointing to unallocated memory.  This wasn't
a crash type bug, but those properties then had bogus values.  This
specifically prevented the turn coordinator gyro modeling from working after
a reset or reposition.
2003-03-30 02:26:05 +00:00
ehofman
b71e0774d6 Make spoilers and speed-brake position accessible 2003-03-24 10:44:45 +00:00
ehofman
60283d19bb Add speed-brake and spoilers controlls 2003-03-24 10:04:19 +00:00
tony
1a50c56d5e Updates from JSBSim, including new turbine engine model from David Culp 2003-03-23 15:12:35 +00:00
ehofman
df2ce45ab7 Change cout and cerr in SG_LOG() where appropriate, otherwise comment it out 2003-03-20 10:43:02 +00:00
ehofman
01be2ed8e4 Compiler warning fixes and small updates 2003-03-19 17:46:52 +00:00
ehofman
cb8b72744c Add mach number to the property tree 2003-03-19 16:06:17 +00:00
david
b3930c9c60 Added a new turbulence type ttStandard, and made it the default.
ttStandard is copied from ttBerndt, with the following modifications:

1. All turbulence is diminished within three wingspans of the ground.

2. The horizontal forces are used to calculate the moments, but then
   zeroed out so that only the vertical force is actually applied to
   the aircraft.

3. The yaw moment is not used.

In fact, the horizontal forces and the yaw moment should be allowed,
but they are extremely rare compared to the vertical force and the
pitch/roll moments.  For now, simply zeroing them gives the most
accurate feel.
2003-03-16 21:14:45 +00:00
curt
2c20e61b4b Removed some extraneous debugging output. 2003-03-09 12:48:29 +00:00
david
4b78f5305f Ignore generated files. 2003-03-09 03:21:34 +00:00
curt
92cfd383d6 Remove std:: 2003-03-04 00:25:35 +00:00
curt
11e0a3b1f8 Don't remove the named pipe on a "Reset" or position change (i.e. when
FGExternalPipe is destructed.)  This leaves the name pipe hanging around
even after flightgear exits, but assuming we put the files in /tmp that
shouldn't be a big deal.
2003-03-03 17:48:09 +00:00
curt
dbf7218c63 A small optimization, pass the number of iterations to the remote end and
have it do all the work, rather than calling the remote end "iteration"
number of times.
2003-03-03 04:59:41 +00:00
curt
ec9c990ae4 Add ExternalPipe subdirectory. 2003-03-03 04:33:51 +00:00
curt
cc269730a5 First stab at a "named pipe" interface to an external FDM. Compared to the
ExternalNet interface:

- allows a much more closely coupled execution.  A remote network FDM will run
  at it's own rate, and maybe a particular data packets will come, maybe it
  won't.  This makes it very hard to control timing and keep the animation
  smooth.  There are also cpu scheduling issues with running multiple
  processes on a single machine.  The linux scheduler by default runs at
  100hz.  If an FDM process uses a sleep/alarm system to avoid wasting
  CPU, it will be forced to run at 100hz, 50hz, 25hz, 20hz, etc.  This
  makes it *impossible* to serve a display system running at 60hz without
  dropping frames.

- the downside is that the FDM process must now run on the same machine as
  the master flightgear process.
2003-03-03 04:30:16 +00:00
david
c8b8722a14 Don't fiddle with control positions at startup -- we can do that in
the *-set.xml files if desired.
2003-03-02 02:22:18 +00:00
david
c7998b9940 Initialize speed from mach number or vcas more-or-less properly. 2003-03-02 01:44:11 +00:00
david
1e5d48d1d9 Add spdFromMach() and spdFromVCAS(). 2003-03-02 01:43:39 +00:00
david
d38685b92f Minor code cleanup. 2003-02-26 19:20:02 +00:00
david
c07f22ea16 Begin supporting a starting speed for YASim:
- NED and UVW are working correctly
- knots is giving true airspeed instead of calibrated airspeed
- mach is not working at all

This desperately needs a trimming routine.
2003-02-22 20:29:43 +00:00
david
8eac88efe9 Fixed calibrated airspeed output so that it accounts for wind. 2003-02-19 17:41:53 +00:00
david
b78d5a0b93 Interpolate the twist linearly over the wing.
Reduce the minimum number of twist segments from 16 to 8.
2003-02-18 17:37:28 +00:00
david
7228024ed5 Added a "twist" attribute for wings to allow for washout (or washin,
if desired) in the stall.  This allows for fairly docile stalls when
desired, as on trainers (you also need to limit the elevator lift).
2003-02-18 16:50:07 +00:00
david
2412c3a334 Integrate code posted by Jon Berndt, so that only the z-direction
turbulence is diminished near the ground.
2003-02-12 23:00:49 +00:00
david
1693a364e4 Square the /environment/turbulence-norm property before scaling it for
FGAtmosphere -- that way, there are finer distinctions in the lower
end, where most people will fly.
2003-02-12 18:34:51 +00:00
david
9f5498acf4 Fade out the turbulence within two wingspans of the ground. 2003-02-12 18:34:39 +00:00
david
4ecd146258 Connect the FlightGear /environment/turbulence-norm property to the
turbulence gain in JSBSim's FGAtmosphere class.

Latest FGAtmosphere from JSBSim with working turbulence support.
2003-02-12 00:30:24 +00:00
curt
fc095c7061 Avoid a potential segfault. 2003-02-03 21:57:25 +00:00
curt
2ce74e14b1 Register that we have been inited so the init routine isn't called repeatedly. 2003-02-03 21:57:07 +00:00
tony
6acae863ec Removing files already removed from JSBSim CVS. 2003-01-27 23:42:08 +00:00
david
acbb9f5aff Renamed /velocities/side-slip-rad to /orientation/side-slip-rad.
Renamed /velocities/side-slip-deg to /orientation/side-slip-deg.

Renamed /velocities/alpha-deg to /orientation/alpha-deg.

Added /accelerations/ned/north-accel-fps_sec.

Added /accelerations/ned/east-accel-fps_sec.

Added /accelerations/ned/down-accel-fps_sec.

Renamed /accelerations/pilot/x-accel-ft_sec2 to
/accelerations/pilot/x-accel-fps_sec.

Renamed /accelerations/pilot/y-accel-ft_sec2 to
/accelerations/pilot/y-accel-fps_sec.

Renamed /accelerations/pilot/z-accel-ft_sec2 to
/accelerations/pilot/z-accel-fps_sec.
2003-01-26 15:53:35 +00:00
david
4526b1b8ee Remove redundant rate properties recently added. 2003-01-25 19:47:35 +00:00
david
f3b00f1598 Publish properties for accelerations and rates. 2003-01-25 17:25:30 +00:00
curt
925f521521 Initial revision. 2003-01-24 18:12:04 +00:00
tony
a9d81f2e65 Latest JSBSim updates, including use of new "JSBSim" namespace 2003-01-24 12:55:28 +00:00
curt
f9ae85b0c0 Consolidate and clean up some of the FDM network interface code. 2003-01-12 22:11:55 +00:00
curt
f918bdcc0c ExternalNet -> Updated to not repeat code from native_ctrls. 2003-01-10 19:45:29 +00:00
curt
7805202fc6 Set SO_REUSEADDR on incoming UDP socket so other processes on the host
can also monitor the UDP broadcasts.
2003-01-06 02:51:07 +00:00
david
71f08e795d Patches from Erik Hofman for SGI compatibility:
Some more cmall changes to the SimGear header files and removed the
SG_HAVE_NATIVE_SGI_COMPILERS dependancies from FlightGear.

I've added a seperate JSBSim patch for the JSBSim source tree.
2002-12-31 18:26:02 +00:00
david
af609fcd93 Patch from Bernie Bright:
FWIW here are patches for src/FDM/ADA.[ch]xx that remove a dependency on
<simgear/io/sg_socket.hxx>
2002-12-31 03:21:49 +00:00
david
c153e21174 Bug fix suggested by Gonzalo Peralta:
Convert the fuel flow from gallons to pounds <kludge>assuming 100LL at
sea level, 6lb/gallon.</kludge>
2002-12-30 22:16:16 +00:00
curt
b30ceec62d Remove DOS line endings. 2002-12-17 15:31:34 +00:00
tony
3cb4d55342 Fix for X-15 crash. 2002-12-17 00:07:46 +00:00
curt
2b74a7c3d6 Additional failure modeling.
Support parking brake in external fdm.
2002-12-16 01:13:39 +00:00
andy
ba84ec24bf Changing the thresholds to be bigger in the previous patch isn't
really useful unless we simultaneously change the per-iteration deltas
to be smaller.  Add another pseudo-tunable to control the speed with
which we change values across iterations.  As it turns out, this is
much more effective than the threshold tunable.  It does come at the
cost of lower solution performance, however.
2002-12-12 02:15:06 +00:00
andy
ac93c22545 Put in some (currently compile-time) tuning for the solver threshold.
A recent change resulted in the Piper Cub oscillating about its
correct solution.
2002-12-11 22:58:47 +00:00
andy
4fb6673ff7 Update masses on the rigid body when consuming fuel. Simply updating
the tank capacity won't change the aircraft.
2002-12-11 22:52:52 +00:00
curt
eac68e9d93 add uiuc_getwind.h to distribution. 2002-12-04 23:02:08 +00:00
tony
75e51b0d81 Sync with JSBSim CVS 2002-12-04 15:32:03 +00:00
david
2e8572a4c5 Ignore more generated files. 2002-12-04 01:01:45 +00:00
curt
35b7d568d0 #include <config.h> where needed for cygwin/gcc-3.2. 2002-12-03 14:59:24 +00:00
andy
d98b7f05ff Honor the /sim/freeze/fuel property to inhibit fuel consumption at runtime.
Link the standalone executable against the source files explicitly rather
than libYASim, as the Irix linker can't handle the unneeded dependance on
other parts of FlightGear.
2002-11-30 20:22:25 +00:00
andy
0b2a45e256 Add the command-line yasim compiler to the automake configuration. It
installs into the build directory as "yasim".  Simply run it with the
xml file as its only argument.
2002-11-30 06:28:18 +00:00
andy
388d714fdc Fuel consumption. Simple implementation without support for tank selection
or engine-specific feeds.
2002-11-30 06:12:20 +00:00
andy
fe4e83a10b Added a tunable "induced drag" number to aircraft. One of the things that
isn't well-constrained by the solution process is the drag-vs-aoa curve.
The default value that YASim picked was very steep, and resulted in most
of the jets flying their approaches *way* behind the power curve.  This
changes the default to be more forgiving, and adds an "idrag" tunable
to the configuration file for tweakers.

Also, change the default gear springiness to be less stiff.
2002-11-30 02:24:16 +00:00
david
9ca42c5fa3 Patch from JSBSim:
Convert DrCmd from percentage to radians.
2002-11-27 21:09:16 +00:00
david
b79c943aa3 Change from JSBSim:
Changed steering to use the rudder command rather than the rudder
position.  During taxi, the rudder trim shouldn't affect the steering
in any serious way.

This should be configurable in the aircraft file, since not all
aircraft use the rudder pedals for ground steering.

[In FlightGear, this may make it easier to taxi straight.]
2002-11-27 01:38:26 +00:00
tony
b672fed418 Updates for cygwin 2002-11-23 15:33:01 +00:00
curt
dc5397b33b Minor property name change to avoid some minor confusion. 2002-11-21 02:54:46 +00:00
curt
52312f2a13 Restructuring some of the initialization code.
The general idea is to help clean up some aspects of the FDM init and be
able to provide startup conditions in a less ambiguous manner.

Previously, things like positions, orientations, and velocites were set on
"the bus".  These had to be read by the FDMs which then were supposed to
initialized themselves to those values and turn write around and start
modifying those values.  It was messy and cumbersome.

Now, all the initial fdm conditions are written to a sub-[property-]tree
under /sim/presets/

The values in /sim/presets/ always stay set to what the user has specified.
The user can change these at his/her liesure, and then request a "reset"
which will reset to the new conditions.  I don't even want to say how this
worked before. :-)

Now, an script, or gui interface can stage a set of initial conditions while
the sim is running (without disrupting it), and then call "reset" to commit
the change.

People who should worry about all this are FDM writters, and a small few
others who care about over all program structure and flow.
2002-11-15 21:13:29 +00:00
andy
e8e1a087fe Add "spring" and "damp" tunables to gear objects. 2002-11-09 21:08:10 +00:00
curt
3640aca191 Robert Deters:
Attached is more UIUC revisions.  Actually it is only an updated
uiuc_wrapper.cpp.  Thanks
2002-11-08 17:05:56 +00:00
curt
4a2c47d9d7 Robert Deters:
Latest revisions of the UIUC code.
2002-11-08 17:03:49 +00:00
andy
7b7de3d3e0 Blindingly stupid ground effect bug. It interpolated in the wrong direction
(zero at ground, maximum at 1-span!)
2002-11-05 21:36:47 +00:00
david
2bc7a538cf Eliminate dependency of flight.hxx on model.hxx, to avoid unnecessary
rebuilding.
2002-11-03 15:41:30 +00:00
curt
5a439826ff Andy Ross:
Make rotational rate FDM values available from the property tree.
This is required for some cool stuff I've been doing with the Harrier.
2002-10-29 19:27:05 +00:00
andy
f80b8660bf Fix coordinate conventions for reporting pilot acceleration. Add a few
digits to the c.g. report.
2002-10-27 04:30:34 +00:00
curt
ae46fe825f Erik Hofman: Irix build fixes. 2002-10-24 14:02:19 +00:00
curt
b699a0aac9 Added support for passing wind speed/direction.
Added support for passing various freeze commands to fdm.
Initial support for in-air starts.
2002-10-16 03:43:52 +00:00
david
fe14223750 Ignore generated files. 2002-10-03 16:59:32 +00:00
curt
4fb56176ce Allow for a user specified timeout when waiting for a response from the
remote fdm command server (http server.)
2002-10-01 16:44:38 +00:00
curt
4763dbae6a Pass data needed to make David's new ASI model work correctly. 2002-10-01 15:26:15 +00:00
tony
09cb9b750c Include gravity in pilot accel calc when Vt < 1 2002-09-29 14:13:39 +00:00
tony
eb05a298e9 Latest JSBSim updates -- includes fix for control surface animations. 2002-09-29 13:33:53 +00:00
tony
2c1889a8b5 Removed delete of dangling pointer -- fixes seg fault on reset 2002-09-28 22:48:21 +00:00
curt
2eaaddc52a Renamed raw_ctrls.hxx -> net_ctrls.hxx which makes more sense and matches
net_fdm.hxx.
2002-09-28 22:10:49 +00:00
curt
0d87fad65c Shuffled location of ExternalNet.[ch]xx to it's own subdir.
Removed External.[ch]xx which is a duplicate of NullFDM.[ch]xx
--fdm=external is preserved but just maps to NullFDM.
2002-09-28 21:42:03 +00:00
curt
d2dbf0a8ee Moved the ExternalNet code to it's own subdirectory. The plan is also
place standalone FDM wrappers here as well so we can build FDM specific
executables that interface with FG via the ExternalNet interface.
2002-09-28 21:38:51 +00:00
curt
dc7103245a My understanding of plib's net libs has expanded slightly. A couple of
small mods here reflect that and allow the external network connection
to play better when other net connections (i.e. telnet) are activated.
2002-09-28 17:37:44 +00:00
curt
de667227c4 Minor formating tweaks. 2002-09-28 04:01:34 +00:00
curt
3a0f56a6e6 Removed some extraneous spaces that crept in some how. 2002-09-28 04:01:20 +00:00
curt
a677ddac5d Pass ground elevation at aircraft position to external FDM, not ground
elevation at view point.
2002-09-28 04:00:55 +00:00
curt
b81139dab3 Pass stall warning info in net_fdm.hxx 2002-09-27 21:20:28 +00:00
curt
c1417a0268 Pass velocities in local body axis. 2002-09-27 01:20:20 +00:00
curt
911e7dbfa8 For flaps power, fuel pump, and starter, send power state rather than switch
state.
2002-09-26 04:49:31 +00:00
curt
d53b005a41 Interchange state of fuel_pump (switches) and master switches (bat, alt,
and avionics.)
2002-09-25 22:08:43 +00:00
tony
04f7625c67 Fixes for flaps, gear, and reset. The c310 takeoff rotation problem seems to be fixed as well, though I don't understand why. 2002-09-25 11:04:20 +00:00
tony
ab242159a3 JSBSim updates. This update changes the file format, so an update of the base
package is required.
2002-09-24 12:54:43 +00:00
tony
743b4848cf Changed much inline code to non-inline. The inline code that remains in the header *must* be there to avoid linker errors. 2002-09-22 15:32:45 +00:00
tony
1ca94a72c0 Latest updates, including a thrust-only turbofan model. It should produce
realistic thrust (including time-dependent effects), but does not provide
N1, N2, EPR, etc.
2002-09-22 15:31:09 +00:00
curt
e2313bfb55 Michael Selig:
A bug lurked into our uiuc code.

There are two changes:
[1] Comment out the chunk of code as shown (compare w/ the old)
[2] Put back in the function call, and in that code change AlphaTail to Alpha.
2002-09-11 18:27:26 +00:00
curt
1784ad74b6 Updates from Rob Deters. 2002-09-11 16:45:47 +00:00
curt
93c9f8cbf4 Updates from Rob Deters. 2002-09-11 02:31:10 +00:00
curt
f8c24745b6 Initial revision 2002-09-10 01:13:59 +00:00
tony
83179a5daf Various clean-ups. 2002-09-05 13:55:16 +00:00
curt
e9dba2caa1 Removed dos line endings. 2002-09-03 13:27:45 +00:00
curt
9de48125cc Initial revision. 2002-09-03 00:50:01 +00:00
curt
9a5ec79e11 Updates to the UIUCModel code. This includes some big compile time
speedups to uiuc_menu.cpp.

(Note these were originally submitted before the cutoff date for new
features, but something was corrupted in the transfer so I granted a bit
of leeway in the schedule.)
2002-09-02 23:26:28 +00:00
tony
408c3d5dda Removed unused and improperly initialized constant. 2002-08-30 13:43:28 +00:00
tony
f8c1e8dc98 Fixed an oops. 2002-08-29 13:39:29 +00:00
tony
b2fe0cc682 Added FGTurbine.[ch]* 2002-08-29 13:27:43 +00:00
tony
3f459636fd New Turbine engine model framework 2002-08-29 13:26:49 +00:00
curt
5aaa533da9 Fix a compile error. 2002-08-28 16:58:57 +00:00
tony
b5d116dad7 Latest JSBSim updates. 2002-08-28 13:46:42 +00:00
curt
21db1e10b2 More tweaks to the automake/conf configuration scripts. 2002-08-28 03:34:31 +00:00
curt
050ba12fba Strip dos line endings. 2002-08-26 22:04:10 +00:00
curt
4f00d9a959 Tidy up the autoconf/automake configuration a bit.
- Removed some old cruft.

- Removed some support for older versions of automake which technically was
  correct, but caused the newer automakes to squawk warnings during an
  initial sanity check (which isn't done very intelligently.)

  NOTE: this fix is technically not correct for older version of automake.
  These older version use the variable "INCLUDES" internally and could have
  them already set to an important value.  That is why we were appending
  our values to them.  However, newer versions of automake don't set this
  value themselves so it is an error to append to a non-existant variable.
  We seem to "get away" with overwriting the value on older versions of
  automake, but if you have problems, consider upgrading to at least
  automake-1.5.
2002-08-25 19:40:04 +00:00
david
c3f4b63258 Remove dependency on acmodel.hxx out of flight.hxx (which is included
many places) and into the files that actually use it.
2002-08-07 01:30:21 +00:00
david
844a55c3d1 Latest JSBSim updates. 2002-08-05 20:13:34 +00:00
curt
f71e09be69 Remove call to function only in plib-cvs. 2002-08-05 18:29:25 +00:00
curt
dc28e74081 Convert several alert/info statements to debug. 2002-08-01 21:51:09 +00:00
curt
acdd550a2f Fixes so that we can read incoming broadcast packets (so we can have multiple
channels driven from one broadcast source.)
2002-07-31 23:24:55 +00:00
curt
94c44fc172 A couple fixes to the network fdm interface. 2002-07-30 04:37:16 +00:00
tony
f04d342f6a Member variable initialization fixes from Cameron Moore 2002-07-11 00:19:19 +00:00
tony
e0fa2db2c9 Fixed typo in SetGammaFallback() 2002-07-10 03:24:57 +00:00
curt
b17e1bb7c0 Update controls so we can specify each tank on/off individually. Also
updated the network interface files to add fuel tank selector information.
2002-07-05 19:04:04 +00:00
david
961804b03e Patch from Dave Luff to use dt properly in CHT calculation. 2002-07-03 04:13:28 +00:00
curt
a28b35f3f2 Fixes for IA-64 with Intel compiler. 2002-07-02 20:45:02 +00:00
david
0c4c182f1e Fixed an uninitialized variable reported by Frederic Bouvier; this
could cause the FDM occasionally to get caught in a very long loop.
2002-06-28 19:06:23 +00:00
david
a26ea45c43 Update from JSBSim - fix bugs reported by Gonzalo Peralta with CHT and
oil pressure.
2002-06-28 18:38:28 +00:00
david
343fb01972 Patch from Julian Foad:
Remove redundant class scope qualifiers.  (Should not be used within
class definition.)
2002-06-28 17:59:44 +00:00
andy
b162cf8707 Wrong units when interpreting <weight> tags. 2002-06-24 04:18:53 +00:00
andy
8199ece7dc Hack in an /accelerations/pilot-g property, for testing a new panel
instrument.  This needs to move somewhere permanent.

Also, remove a bogus fuel consumption setting that (1) was off by a factor
of 3600 (hours, not seconds) and (2) collided with identical code in FGFDM.
2002-06-20 04:11:19 +00:00
andy
9541e06a1e Finally fixed the flap drag issue. Drag modifications need to be based on
the amount of drag that the produced lift *would* have produced given an
unflapped air surface.  A nifty trick involving the assumption that AoA is
small works for this, and produces plausible results in the high AoA case
as well.

Also, trim for approach using the elevator-trim control, not elevator.
Just cosmetic for current planes, but future ones might have differing
implementations of trim.
2002-06-15 05:40:02 +00:00
andy
a682823ada Bugfix. The engine thrust is recalculated based on the current N1 value
(and not the throttle setting), but the recalculation left in a degeneracy
when the target/throttle setting was exactly zero.  Zero times a big number
is still zero.  Fixed to use real math, not theoretical math.
2002-06-12 08:23:05 +00:00
curt
a4e81f4ff0 Erik Hofman:
This patch solves an unknown reference to a function which showed up
when using no-inlining.
2002-06-11 16:32:12 +00:00
andy
df2b147ef5 Really simple command line airplane compiler. Basically a test program;
not integrated into the Makefile.am stuff.
2002-06-10 20:15:35 +00:00
andy
0cabedaa4f Use the density values from the environment subsystem, to properly handle
density variations due to humidity.
2002-06-10 08:47:29 +00:00
tony
9299767541 Oops. Previous versions caused compile errors 2002-06-08 03:20:37 +00:00
tony
0975a42f49 The external atmosphere fix. Really this time. 2002-06-08 03:15:05 +00:00
tony
00dcf9f507 JSBSim updates, including external atmosphere fix 2002-06-08 03:14:03 +00:00
curt
e2e640ef46 Set control surface positions when using an external network fdm.
Fetch all pending remote fdm network packets so there is not chance of
  getting behind.
Add support for driving control panel lights.
Working on better modeling KX 155 tuning behavior.
2002-06-05 05:22:42 +00:00
andy
2852f27bdc Uninitialized data problem. As it turns out, this never bit us because
the _chord member is only used uninitialized in circumstances where the
result is thrown away.  Still, bad practice.  Found with valgrind.
2002-06-04 07:23:34 +00:00
curt
11766afb6c Added flap_deflection so that remote fdm can pass back actual flap deflection
in order to drive the flap sound effects and animation.
2002-06-03 23:35:43 +00:00
andy
04e083083d Need to call recalc() on the RigidBody during solution, or else it
won't apply the right gross weight due to fuel differences.

When solving for zero force, do so in the global frame, not the
aircraft's.  In principle, this shouldn't matter (zero is zero in all
frames), but in practice this should help to avoid oscillations.
Calculating lift as force perpendicular to the ground (and not the
wing plane) is clearly the Right Thing, anyway.

Also added support for a /yasim/gross-weight-lbs property, which
should be generically useful.
2002-06-01 19:59:38 +00:00
andy
713920356b Property name typo. This resulted in all temperatures being 273K,
which is far too warm at altitude.  Thus, air density (and aircraft
performance) was too low for a given altitude.
2002-05-30 18:54:08 +00:00
david
25450e040a Patch from Melchior Franz:
The new dt/multiloop method requires new damping parameters.
2002-05-29 22:38:11 +00:00
andy
7e63c0f6e8 Modify solution heuristics. Do the cruise AoA and tail incidence only
when the lift/drag are really solid.  And defer the approach trim until
the all four of the other variables are perfect.  I believe this should
fix the solution failures under gcc 2.95.2.
2002-05-29 08:41:13 +00:00
andy
adeeed1a0e Oops. Stray checkin. Revert. 2002-05-29 07:09:41 +00:00
andy
f324ea9bad The incidence setting only works on a compiled object. If setIncidence
is called on a non-compiled object, make sure to re-set it after compilation.
2002-05-29 07:07:29 +00:00
david
8cf573ae51 JSBSim change:
Reverse sense of rudder surface position, for consistency with
ailerons and FlightGear controls.
2002-05-28 13:50:51 +00:00
andy
040c508aa8 We don't handle propellers turning backwards. This got clamped
implicitly in PropEngine by disallowing negative torques, but that was
removed at some point.  We really need the explosion protection here
at the source.
2002-05-23 19:47:19 +00:00
andy
6af60f7462 Yank the "castering" attribute and replace it with a ControlMap-enabled
control that can be set via the property system.  This allows implementation
of the DC-3 wheel lock.
2002-05-23 19:30:56 +00:00
andy
4d10297732 Oops, left debug code in the checkin. 2002-05-21 18:45:56 +00:00
andy
4535c84b99 Solve for the elevator control input during approach. It turns out that
the downforce from the tail due to elevator trim is a significant contribution
to total lift.
2002-05-21 07:40:46 +00:00
curt
b1674cb506 From: "Jim Wilson" <jimw@kelcomaine.com>
This is a new improved patch for the previous tile manager fixes.

Rather than building dependencies between FGlocation or the viewer or fdm with
tilemgr what I ended up doing was linking the pieces together in the Mainloop
in main.cxx.  You'll see what I mean...it's been commented fairly well.  More
than likely we should move that chunk somewhere...just not sure where yet.

The changes seem clean now. As I get more ideas there could be some further
improvement in organizing the update in tilemgr.  You'll note that I left an
override in there for the tilemgr::update() function to preserve earlier
functionality if someone needs it (e.g. usage independent of an fdm or
viewer), not to mention there are a few places in flightgear that call it
directly that have not been changed to the new interface (and may not need to be).

The code has been optimized to avoid duplicate traversals and seems to run
generally quite well.  Note that there can be a short delay reloading tiles
that have been dropped from static views.  We could call the tile scheduler on
a view switch, but it's not a big deal and at the moment I'd like to get this
in so people can try it and comment on it as it is.

Everything has been resycned with CVS tonight and I've included the
description submitted earlier (below).

Best,

Jim

Changes synced with CVS approx 20:30EDT 2002-05-09 (after this evenings updates).

Files:
http://www.spiderbark.com/fgfs/viewer-update-20020516.tar.gz
 or
http://www.spiderbark.com/fgfs/viewer-update-20020516.diffs.gz

Description:
In a nutshell, these patches begin to take what was one value for ground
elevation and calculate ground elevation values seperately for the FDM and the
viewer (eye position).  Several outstanding view related bugs have been fixed.

With the introduction of the new viewer code a lot of that Flight Gear code
broke related to use of a global variable called "scenery.cur_elev".

Therefore the ground_elevation and other associated items (like the current
tile bucket) is maintained per FDM instance and per View.  Each of these has a
"point" or location that can be identified.  See changes to FGLocation class
and main.cxx.

Most of the problems related to the new viewer in terms of sky, ground and
runway lights, and tower views are fixed.

There are four minor problems remaining.  1) The sun/moon spins when you pan
the "lookat" tower view only (view #3).  2) Under stress (esp. magic carpet
full speed with max visibility), there is a memory leak in the tile caching
that was not introduced with these changes.  3) I have not tested these
changes or made corrections to the ADA or External FDM interfaces.  4) The
change view function doesn't call the time/light update (not a problem unless
a tower is very far away).

Details:
FDM/flight.cxx, flight.hxx - FGInterface ties to FGAircraftModel so that it's
 location data can be accessed for runway (ground elevation under aircraft)
 elevation.

FDM/larsim.cxx, larcsim.hxx - gets runway elevation from FGInterface now.
Commented out function that is causing a namespace conflict, hasn't been
called with recent code anyway.

FDM/JSBSim/JSBSim.cxx, YASim/YASim.cxx - gets runway elevation from
FGInterface now.

Scenery/newcache.cxx, newcache.hxx - changed caching scheme to time based
(oldest tiles discard).

Scenery/tileentry.cxx, tileentry.hxx - added place to record time, changed
rendering to reference viewer altitude in order to fix a problem with ground
and runway lights.

Scenery/tilemgr.cxx, tilemgr.hxx - Modified update() to accept values for
multiple locations.   Refresh function added in  order to periodically make
the tiles current for a non-moving view (like a tower).

Main/fg_init.cxx - register event for making tiles current in a non-moving
view (like a tower).

Main/location.hxx - added support for current ground elevation data.

Main/main.cxx - added second tilemgr call for fdm, fixed places where viewer
position data was required for correct sky rendering.

Main/options.cxx - fixed segfault reported by Curtis when using --view-offset
command line parameter.

Main/viewer.cxx, viewer.hxx - removed fudging of view position. Fixed numerous
bugs that were causing eye and target values to get mixed up.
2002-05-17 17:25:28 +00:00
andy
4efbc97a4b Revert the recent changes to Atmosphere.cpp. They were actually in
the wrong place.  The Atmosphere::getStd*() calls are used by the
solver, and thus really need to return values for a "standard"
atmosphere.  Otherwise, an aircraft started up in Moscow will behave
differently than one initialized in Cairo. :)

The place where environmental pressure and temperature get inspected
at runtime is in YASim.cxx.  The changes there, happily, end up being
even smaller than the ones to Atmosphere.  This ends up replacing code
only, and removing some comments.
2002-05-16 07:49:22 +00:00
david
52c1cb2f7d Take the static temperature, static pressure, and density values from
an external source if requested by the
/environment/params/control-fdm-atmosphere property.
2002-05-15 12:10:48 +00:00
david
cade7aad70 Comment out set_Static_pressure, set_Static_temperature, and
set_Density; since JSBSim doesn't override the get_* methods from
FGInterface as well, the wrong values are always set anyway.

Take the static temperature, static pressure, and density values from
an external source if requested by the
/environment/params/control-fdm-atmosphere property.  This isn't
working properly yet for JSBSim because of interactions with the
trimming routine.
2002-05-15 12:06:33 +00:00
curt
47825dcbae Moved "scenery" from being declaried in scenery.cxx to being declared
in globals.hxx.
2002-05-14 05:22:52 +00:00
david
1fe50d4cd2 Removed configuration option --with-old-mouse and FG_OLD_MOUSE macro.
Removed configuration option --with-new-environment and
FG_NEW_ENVIRONMENT macro.

Added configuration option --with-weathercm and FG_WEATHERCM macro.

FGEnvironment is now the default; use --with-weathercm to get the old
weather.
2002-05-12 00:12:19 +00:00
david
e1c2a95f2f Fix maximum speed bug. 2002-05-11 21:09:53 +00:00
david
5a849b66e8 Major overhaul:
- changed FGSubsystem::update(int) to
  FGSubsystem::update(delta_time_sec); the argument is now delta time
  in seconds rather than milliseconds

- added FGSubsystem::suspend(), FGSubsystem::suspend(bool),
  FGSubsystem::resume(), and FGSubsystem::is_suspended(), all with
  default implementations; is_suspended takes account of the master
  freeze as well as the subsystem's individual suspended state

- the FDMs now use the delta time argument the same as the rest of
  FlightGear; formerly, main.cxx made a special case and passed a
  multiloop argument

- FDMs now calculate multiloop internally instead of relying on
  main.cxx

There are probably some problems -- I've done basic testing with the
major FDMs and subsystems, but we'll probably need a few weeks to
sniff out bugs.
2002-05-11 16:28:50 +00:00
david
56473dc28d Mac OS X fixes and MSVC warning fixes from Jonathan Polley. 2002-05-10 23:35:06 +00:00
david
907e2942bb Patch from Melchior Franz:
Due to jumpy joystick read-outs the UFO jitters a lot in turns.
This patch implements simple damping for aileron/elevator/throttle.
Furthermore it lets the UFO fly backwards if brake[0] is active
(by default associated with the joystick's fire button). After all,
everyone knows that UFO's can fly backwards!
2002-05-09 21:56:31 +00:00
david
5c799d1ba2 Patch from Melchior Franz:
It's cumbersome to use the MagicCarpet as 3D cursor, because everytime
you shoot over the target you have first to turn by 180 degrees and to
fly back.

This patch lets the magic carpet fly backwards if brake[0] is active,
which is by default associated with the joystick's fire button.
2002-05-09 21:56:07 +00:00
curt
37b665075f Robert Deters:
> I have attached some new additions to the UIUC code.  Most of the
> changes allow for the addition of apparent mass.  This is very
> useful with light aircraft and gliders.
2002-05-09 05:02:36 +00:00
david
93e0274eb8 Last rev was based on an old version and blew away recent changes.
Reverted to the current JSBSim CVS version of each.
2002-05-07 23:11:16 +00:00
tony
be71e0f555 Added stall hysteresis modeling, nose should fall through nicely in a stall now. 2002-05-04 17:38:06 +00:00
tony
4306cebe9e Norman Vine's speed optimizations 2002-05-03 13:56:09 +00:00
andy
7a9e2aba71 Fix dumb typo. Very embarassing, but oddly not fatal... 2002-05-01 01:17:33 +00:00
tony
4a854fcc3e JSBSim updates, including MSVC fixes from Bernie Bright 2002-04-30 13:42:26 +00:00
david
18e36a3302 UFO FDM patches from Jonathan Polley:
I have finished working the bugs out of my "Enhanced" version of the Magic
Carpet FDM.  The UFO FDM works the same as the Magic Carpet with the
following exceptions:

The aircraft's pitch is determined by the Elevator setting (with a pitch
rate of 45 degrees per second).
Climb is forward velocity * sin(pitch)
Speed is forward velocity * soc(pitch)

Roll is tied to the aileron (again, with a roll rate of 45 degrees per
second)
Turn rate is sin(roll) * 45 degrees.

Yes, this does mean that turning is quite a bit more sluggish than
climbing.

If you are wondering why a UFO FDM, it is because it's best that I not
replace the existing magic carpet and this FDM does behave like a UFO (it
hovers, can spin and pitch while hovering, and does not obey the laws of
physics ;)
2002-04-25 16:23:16 +00:00
david
473ea84621 JSBSim fix:
Corrected typo "flaps-pos-deg" to "flap-pos-deg".  JSBSim now reports
the normalized flap position to FlightGear, and the model animation
works again.
2002-04-19 12:15:46 +00:00
curt
e5abcd1ef1 Replaced spaces with <tab> since this is a makefile. 2002-04-16 20:42:58 +00:00
david
adcb4fc30e Latest JSBSim changes. 2002-04-16 13:15:29 +00:00
david
fa5a707128 JSBSim change:
Set an arbitrary cutoff (5RPM) where friction causes the propeller to
stop spinning.
2002-04-12 17:24:17 +00:00