1
0
Fork 0
Commit graph

2707 commits

Author SHA1 Message Date
curt
fc7e234d3d Irix MipsPRO fixes. 2001-04-13 21:00:07 +00:00
curt
e03752883e Unconvoluted around line #130 2001-04-11 20:09:23 +00:00
curt
b0b6c34249 Initial stab at a threaded tile loader contributed by Bernie Bright.
He writes:

Here are the final changes to add threads to the tile loading.  All the
thread related code is in the new FGTileLoader class.

./configure.in
./acconfig.h
Added --with-threads option and corresponding ENABLE_THREADS
definition.  The default is no threads.

./src/Scenery/tilemgr
Removed load_queue and associated references.  This has been replaced by
a new class FGTileLoader in FGNewCache.
Made the global variable global_tile_cache a member.
schedule_needed(): removed global_tile_cache.exists() tests since
sched_tile() effectively repeats the test.
initialize_queue(): removed code that loads tiles since this is now
performed by FGTileLoader.
update(): ditto

./src/Scenery/newcache
Added new class FGTileLoader to manage tile queuing and loading.
tile_map typedefs are private.
exists() is a const member function.
fill_in(): deleted
load_tile(): added.

./src/Scenery/FGTileLoader
The new threaded tile loader.  Maintains a queue of tiles waiting to be
loaded and an array of one or more threads to load the tiles.  Currently
only a single thread is created.  The queue is guarded by a mutex to
synchronize access.  A condition variable signals the thread when the
queue is non-empty.

CLO: I made a few tweaks to address a couple issues, hopefully what we
have is solid, but now we kick it out to the general public to see. :-)
2001-04-11 02:47:15 +00:00
curt
a2049b110f More JSBSim updates. 2001-04-06 22:59:31 +00:00
curt
606b8d13d9 Added loaded flag to FGTileEntry so that the main thread knows when the
tile has been loaded.  Since this flag can be set by another thread I've
declared it "volatile bool".

Also cleaned up delete vs delete[] usage.  Gcc is happy with delete[],
which is the correct usage.
2001-04-06 18:30:07 +00:00
curt
4b6e8102a7 Synced with latest JSBSim cvs.
reinit fix from Norman.
2001-04-05 21:14:37 +00:00
curt
d422a7bb7f Added a special default default fgroot for cygwin. 2001-04-05 20:25:40 +00:00
curt
65f6e343ab From David Megginson:
The files in the attached tarball make the following changes to
FlightGear:

- rename the existing FGInterface::init() method to
FGInterface::_setup to get it out of the way

- move *all* FDM initialization code out of src/Main/fg_init.cxx and
into FGInterface::init(), and clean up fg_init.cxx a little
(especially by removing the zillions of attempts to place the plane on
the ground at various locations in the code)

- modify FGInterface::bind() so that no values are picked up
automatically at bind time (they are set previously by init() instead)

- modify the init() methods of the classes derived from FGInterface
(i.e. larcsim, jsbsim, balloon, magic, and ada) to invoke
FGInterface::init() explicitly before doing their own setup

I don't claim that the code in FGInterface::init() is optimal (or even
correct), but it seems to work for on-ground starts with both LaRCSim
and JSBSim on runways pointing various directions from near sea level
to about 700' ASL (the range I happened to test).  I expect that Jon
and Tony will want to look at the code and refactor and correct it now
that they can see what's going on in one place.

Here's a quick outline of what is invoked:

  cur_fdm_state = new <whatever>(dt);
  cur_fdm_state->init();
  cur_fdm_state->bind();

The constructor allocates memory and sets default values only (with
the help of the FGInterface::_setup() method).  The init() method pull
any required properties out of the property tree and sets up the
initial state of the FDM.  The bind() method takes ownership of
FDM-related properties so that the FDM can publish them to the rest of
the sim.

Note that bind() and init() are virtual, so any implementation in a
subclass will hide the implementation in FGInterface; that's why
subclass implementations of init() and bind() have to invoke
FGInterface::init() and FGInterface::bind() explicitly, probably at
the start, so that they get the basic initialization.
2001-04-05 20:20:44 +00:00
curt
397a83d69f Data logging patches from Jon Berndt
Fix for model loading under plib-1.2.x in main.cxx
2001-04-05 15:39:37 +00:00
curt
96fbc75b7c Bug fix from Norman Vine. 2001-04-02 21:28:35 +00:00
curt
4f7ac699e3 Patches to flight.cxx to make things work better with JSBSim. 2001-04-02 20:14:04 +00:00
curt
16b21865b8 Initial units confusion fixes. 2001-04-02 03:39:43 +00:00
curt
20fb555364 Updates to fix c172 throttle. 2001-04-02 03:18:44 +00:00
curt
94034c3081 Latest jsbsim updates. 2001-04-02 03:12:38 +00:00
curt
2aca8ca2cf Irix MipsPro patches and fixes. 2001-04-02 02:59:31 +00:00
curt
0fdc1caebb Updated for 8 ... 2001-04-02 02:39:51 +00:00
curt
7c81992a2d Updated from JSBSim cvs. 2001-04-02 02:27:45 +00:00
curt
626969d0cc Initial revision. 2001-03-30 03:08:44 +00:00
curt
74fbaa8f5e Latest round of JSBSim updates. 2001-03-30 01:04:50 +00:00
curt
679eb0b984 Tweaking sound safety margin. 2001-03-29 14:11:43 +00:00
curt
bfb2a65128 Initial revision. 2001-03-29 13:14:42 +00:00
curt
c5bd20c21d Removed some debug output. 2001-03-29 06:14:42 +00:00
curt
776e7293bc Changed wording ... 2001-03-29 06:09:25 +00:00
curt
4fc7f6d097 Put blinking marker beacon (bool) into the property registry for use by the
panel.
2001-03-29 06:05:01 +00:00
curt
f8e234bb27 Dynamically adjust audio safety margin (how much audio we stuff in the
pipe in advance) based on frame rates.
2001-03-29 05:18:29 +00:00
curt
31047f65ac - model loading should work again with the latest CVS PLIB (and, I
hope, with earlier versions as well)
- support for the new LONG value type
- gear support for UIUC (updated for the newly renamed SG_* stuff;
otherwise identical to what I sent you before)
- fixed reported MSVC problem in src/FDM/flight.cxx
2001-03-29 03:49:02 +00:00
curt
0ab39eea99 From: David Megginson <david@megginson.com>
I have created a set of patches to provide configurable landing gear
for the UIUC models.  The patches (including four new files) are
available at

  http://megginson.com/private/fgfs/uiuc-20010309.tar.gz

A modified UIUC configuration file for the Twin Otter (DHC-6) is
available at

  http://megginson.com/private/fgfs/aircraft.dat

It should be possible to configure appropriate gear for all of the
UIUC models now.  As a bonus, the models also support braking, both
absolute and differential, as well as nose-wheel steering (all of
which are currently missing from the UIUC models) -- when you land,
you don't have to keep rolling off the end of the runway anymore, and
you don't have to bank to steer in a taxi.

My sample configuration file contains absolutely bizarre, wild
guesses, and many places that I didn't even bother to guess properly.
The only actual data I had was the wing-span of the DHC-6 (65ft),
which I used for positioning the wing tips.  The wing-tips for this
model actually work now -- I hit the aileron hard while accelerating
for take-off, and the wingtip noticeably strikes the ground and
bounces up (quite dramatic in external view using the DHC-6 model from
Wolfram's site).


Details
-------

The UIUC models now support up to 16 gear points each where a gear
point is anything in the aircraft that can come in contact with the
ground, including the tail and wing-tips.  I have added the following
new fields to the UIUC configuration files, where <index> is an
integer between 0 and 15, and <value> is a real number:

  gear <index> Dx_gear <value>     # x offset from CG [ft]
  gear <index> Dy_gear <value>     # y offset from CG [ft]
  gear <index> Dz_gear <value>     # z offset from CG [ft]
  gear <index> cgear <value>       # spring damping [lbs/ft/sec]
  gear <index> kgear <value>       # springiness [lbs/ft]
  gear <index> muGear <value>      # rolling coefficient
  gear <index> strutLength <value> # gear travel [ft] (not yet used)

Most of these names were already pencilled into the UIUC documentation
(as TODO items), but I had to make up Dx_gear, Dy_gear, and Dz_gear --
if those are inappropriate, I'd appreciate suggestions for better
names.

It will be necessary to modify the other UIUC configuration files to
include some kind of gear support as well, or the planes will sink
nose-first into the ground down to their CG's (it's actually quite
funny to watch with an external view).


Background
----------

As I frequently remind everyone here, I have no math background worth
spitting at, so I will not even pretend to have done the hard stuff.
The UIUC code uses a copy of a very old version of the LaRCsim
c172_gear.c -- I wanted to update it with Tony Peden's excellent newer
version, which includes differential braking among other goodies (the
UIUC models don't support brakes, period).

I copied the newer code into uiuc_aero.c, and it compiled and ran, but
all of the planes ended up sitting on their tails with their noses in
the air.  Since Tony made his gear code nicely parameterized, I
experimented with different values, and found that it wasn't too hard
to balance the Twin Otter by moving the gear back a bit.  At first, I
used properties to set different values, but then I decided to
integrate the whole thing properly into the UIUC configuration
framework.  Thanks to Tony Peden, who did the real modelling work -- I
can take credit only for two or three hours of integration.  It turns
out that Tony's code is generalized enough to deal with a wide range
of different gear structures -- I suspect that it will even work for
the 747, when I get around to trying some values.
2001-03-29 03:16:25 +00:00
curt
84816c13af Fix for MSVC. 2001-03-29 01:44:54 +00:00
curt
191bb3956a Updates from Bernie Bright to massage tile loading around to make it
slightly more conducive to future threading.
2001-03-29 01:42:31 +00:00
curt
e7d79e7ba2 Light model tweaks. 2001-03-28 18:11:05 +00:00
curt
c4b2e54551 Fix moon drawing at night. 2001-03-28 17:52:40 +00:00
curt
d6039a111f Removed an unneeded exit() 2001-03-28 14:38:55 +00:00
curt
2e8f9f7399 Added marker beacon sound effects. 2001-03-28 07:12:11 +00:00
curt
7aa5e0a4eb Lighting fixes.
Warning fixes.
Typo in configure.in
2001-03-28 00:39:29 +00:00
curt
96a9152b02 Irix MIPS patches. 2001-03-26 18:22:31 +00:00
curt
f1b1077d93 More fg -> sg namespace changes in simgear. 2001-03-25 14:20:12 +00:00
curt
9fac7682e3 inlines.h -> sg_inlines.h 2001-03-24 14:56:37 +00:00
curt
f380595144 fg_zlib.h -> sg_zlib.h 2001-03-24 14:12:00 +00:00
curt
182fd42b40 SG-ified logstream. 2001-03-24 06:03:11 +00:00
curt
5ea9c04c64 SG_ namespace. 2001-03-24 04:56:46 +00:00
curt
17c96ae69e SG_ namespace 2001-03-24 04:48:44 +00:00
curt
92443d36a4 FG_ to SG_ namespace changes. 2001-03-24 03:10:40 +00:00
curt
17f3d48e03 FG_ to SG_ namespace changes. 2001-03-24 02:36:45 +00:00
curt
1bf3001749 FG_ to SG_ namespace changes. 2001-03-24 00:18:01 +00:00
curt
5958389026 FG_ to SG_ namespace changes. 2001-03-23 22:59:18 +00:00
curt
8497f9b1ac FG_ to SG_ name changes. 2001-03-23 22:42:49 +00:00
curt
945163b540 FG_HAVE_STD_INCLUDES -> SG_HAVE_STD_INCLUDES 2001-03-23 22:15:19 +00:00
curt
4162c808bd David Luff: I've put Phil's temperature correction back in since I'm not
implicitly correcting for that yet.  The plane now makes it to 11000ft on
autopilot *slowly*.  I think I'll have to look at the prop parameters
next - altering the diameter and blade angle just slightly can have
quite an effect.  If you want to play then try changing the values
prop_diameter and blade_angle in FGNewEngine::init.  Keep blade
angle between 20 and 25 (since those are the only values for which
I've entered data and I interpolate between them) and ignore
FGProp1_Blade_Angle since that's an old variable that isn't used.  I
really ought to read all the engine and prop parameters from file to
avoid recompilation when tweaking !
2001-03-22 23:42:16 +00:00
curt
80ff1af457 David Luff: Here is an update to the engine model. It now takes
the actual air pressure and temperature from the LaRCSim model
instead of assuming that it is at sea level as before.  This has
reduced the ceiling from over 60000 ft to about 9000 ft.  This is a bit
low (should be around 13 - 14000 ft I think) but I still have some
stuff to do with the engine power correlation and its ignoring the
temperature at the moment so I'm not panicking yet :-)

I've also changed the mixture-power correlation to one from a
published paper since the curve from the IO360 manual seemed to
be a load of rubbish, and didn't have any numbers on the mixture
axis anyway.

I've also knocked the full rich mixture down a touch in line with
Riley Rainey's recommendation, and cleaned up the code a bit.
2001-03-22 16:27:16 +00:00
curt
8aed19714a Initial revision. 2001-03-22 04:19:12 +00:00