1
0
Fork 0
Commit graph

2067 commits

Author SHA1 Message Date
andy
388d714fdc Fuel consumption. Simple implementation without support for tank selection
or engine-specific feeds.
2002-11-30 06:12:20 +00:00
curt
bcf9fa3695 Massaging the FGTileMgr->update() interface towards using FGLocation. 2002-11-30 03:05:34 +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
curt
95109cec57 Split out tile load/free queue processing into a separate routine. 2002-11-30 02:21:04 +00:00
curt
89874fd5f5 Make tile_mgr->prep_ssg_nodes() use an FGLocation object. 2002-11-28 01:08:25 +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
curt
3aa5e5fcdf Don't force ground lighting to have the same limited visibility as runway
lighting.
2002-11-26 16:01:39 +00:00
curt
98dca16794 Having the runway lights "pop" in at a specific range is not 100% realistic.
I have updated the lighting code to use fog to try to fade the runway lights
in smoothly, but still keep them from being visible until you are about 7-10
miles out, and then only have them be very faint at first.  I think what I
have is a bit nicer than before since it completely avoids the "popping" effect,
but I've very open to tweaking the actual ranges based on people's real
world experiences.
2002-11-26 02:29:03 +00:00
curt
019b31ea26 Make the runway lights come on just a bit sooner in terms of sun angle. 2002-11-25 21:42:07 +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
80e8647330 Removed depricated files. 2002-11-18 21:34:07 +00:00
curt
df2356050d Added a "Presets" menu. 2002-11-18 21:31:33 +00:00
david
9a3f0c5c19 Irix patch from Erik Hofman. 2002-11-17 12:56:01 +00:00
curt
8f3a988e0e If a non existant runway is specified with --runway=xxx fall back to
finding the runway that is the closest match to the specified (or default)
heading.
2002-11-17 04:17:27 +00:00
curt
13bb01a70e Added a --runway= option which can be used in conjunction with the --airport=
option to specify a starting airport + specific runway.  If you don't specify
a runway, you get the one that's closest to your specified (or default)
heading.
2002-11-17 04:04:21 +00:00
curt
2384d0ed51 Added some cheap eye candy to entertain myself for a few minutes. Splash
screen now fades out revealing the scene.
2002-11-17 01:21:13 +00:00
david
928309d3d1 Cygwin patch from Patrick Staehlin:
To compile the development CVS version of FlightGear(0.9.0) i had to
apply some small changes to SimGear and FlightGear.

The changes need probably some additional ifdefs for other platforms but
since my linux-hd crashed i can't verify that.
2002-11-17 00:42:50 +00:00
david
bd5560605d Patch from Jim Wilson to fix model offsets:
Here's a patch to fix the offsets bug.  The problem was the transform was just
getting added to a local instance rather than being returned by the function.
2002-11-17 00:30:40 +00:00
david
8eb735d149 I wrote:
> Jim Wilson wrote:
 > > How hard would it be to have a property that toggles hotspot
 > > visibility?  It'd be nice to be able to turn it on and have yellow
 > > rectangles show up on the hotspots...
 >
 > That's not a bad idea.

It's actually an astoundingly good idea, and implementable over lunch
to boot. :)

Try the attached patch, which predicates the boxes on the
/sim/panel-hotspots property.  I mapped a toggle event on this to a
spare joystick button, and had fun. :)

[dpm: bound to Ctrl-C]
2002-11-17 00:04:57 +00:00
david
a53ccae248 Make sure led_font isn't used unless it's initialized. 2002-11-16 22:13:49 +00:00
david
de0f20aa22 Reduce POFF_UNITS from 40 to 4, following Andy Ross's suggestion (to
avoid having the 2D instruments obscure 3D objects in front of them):

It's related to depth buffer precision.  On my Geforce cards (2MX and
3), it never happens with the 24 bit depth buffer you get by default
at 32bpp.  At 16bpp, it picks a slimmer depth buffer (probably 16 bit)
and the texture layers bleed through.

The code is using a pretty big argument to glPolygonOffset, and I've
never investigated how small it can be.  If someone has a little time
the next time they see this issue, try changing the value of
POFF_UNITS at the top of Cockpit/panel.cxx.  Decrease it until the
textures *just* start to interfere with each other, and post the value
that works for you.
2002-11-16 22:08:22 +00:00
david
4d1e05804f Patch from Frederic Bouvier:
I have discovered recently that plib has ulIsAbsolutePathName
in ul.lib so you can try this patch.
2002-11-16 22:01:15 +00:00
curt
35f24baf32 Clean ups to the code that determines initial position based on command
line options or defaults.
2002-11-16 21:34:51 +00:00
curt
b3935aa01f Make the routines that scan the command line options and config files more
general so we can eliminate the option specific versions of these.
2002-11-16 20:41:00 +00:00
curt
52a322decc Some various massaging and clean ups of initialization code. 2002-11-16 20:17:11 +00:00
david
c5ebb65efd Turn off runway lights during the day, except in less than 5km
visibility (that should be lower, but it will do for now).
2002-11-16 11:56:15 +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
david
bb9b1ae3c7 Correct offset-deg in a rotate animation so that it is added after the
factor (otherwise, it's not in degrees).

Allow 2D panel inclusions to be named (and further animated).
2002-11-13 16:45:21 +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
david
49a8c070f3 Moved command information into user data. 2002-11-08 16:33:00 +00:00
david
8205c4e030 Separated out GUIWidget class to manage a top-level widget. 2002-11-08 15:24:14 +00:00
david
3e217ba909 Instead of reading $FG_ROOT/gui.xml, recursively read all files under
the $FG_ROOT/gui/ directory; that way, each dialog can have a separate
configuration file, and management should be simpler.
2002-11-08 02:03:56 +00:00
david
4d292daeaa Added button actions so that property fields can be applied or
updated.
2002-11-07 22:59:46 +00:00
david
2de88f278b Started new, XML-configurable GUI subsystem. 2002-11-07 16:27:47 +00:00
david
0de065b0ec Added fgLoadProps to load properties from a path relative to FG_ROOT. 2002-11-06 18:57:31 +00:00
david
a8f40e0771 Fixed bug in timed update cycling. 2002-11-06 16:04:04 +00:00
david
e9dc716221 Added a new TimedAnimation, using the type "timed" and the property
duration-sec.  This animation may have any number of child objects,
and each one will be displayed for the requested duration before
moving on to the next one.

Added Animation::init for initialization after children have been
added to an animation.

Added a default implementation of Animation::update, and removed all
of the empty ones in derived classes.

Removed tabs from model.cxx.
2002-11-06 15:47:40 +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
dd10ae6ba8 Patch from Andy Ross:
Indeed, there was no check for panel visibility in the input code.  I
guess we've never noticed because nothing was fighting for the same
real estate in the past.  This one-liner appears to fix the problem.

[also converted all tabs to spaces for Norm Vine]
2002-11-05 02:28:07 +00:00
curt
b57a78e637 Cleaned up some debugging output. 2002-11-04 16:58:54 +00:00
curt
925126fa6b Add support for drawing ODALS approach lighting. 2002-11-04 16:34:42 +00:00
david
f2a5f98532 Patch from Jim Wilson:
That's a little too small to resolve differences at 16bpp. Try the
patch below.  It decreases the lifting substantially.  You will see
a slight increase in z-buffer flickering but it isn't bad.  Note
that we removed the "distance" component the other day,  the purpose
of it was to lift the lights higher when viewed at shallow viewing
angles.  The distance component is critical for the street lights that
can be very long distances away.

But with the distances we're working with here it really doesn't
do all that much.  The factor used in this patch is about as shallow
a lift as can be used when looking straight down at the airport.  At
24bpp there's no effect from incorporating a distance component.

The choice is to reintroduce a distance component...one that works (and
only for 16bpp), or alter the factor used in the patch below to strike an
acceptable balance between different viewing angles when in 16bpp mode.
2002-11-04 02:17:13 +00:00
david
68d44ac103 Removed debug print statements.
Added ability to set a name for an animation and refer to it in
subsequent animations.
2002-11-03 15:48:08 +00:00
david
351a4d5c09 Streamline to create fewer branch nodes. This involves moving some
objects around when an animation specifies more than one object.
2002-11-03 15:42:11 +00:00
david
2bc7a538cf Eliminate dependency of flight.hxx on model.hxx, to avoid unnecessary
rebuilding.
2002-11-03 15:41:30 +00:00
david
f06a658bee Modified /sim/current-view/axes/long and /sim/current-view/axes/lat to
use the user-configurable view defaults.
2002-11-02 21:43:15 +00:00
curt
dbf997a2d3 Put taxiway lights in their own scene graph so we can adjust their brightness
(or fog punch through) independently from the ground or runway lighting.
2002-11-01 21:56:48 +00:00
curt
eb0c92f8ff Fix a couple oversights in the runway light lifting formula. 2002-10-30 22:56:22 +00:00
curt
94a36038d2 Remove distance component from runway lifting function. Only use the AGL
component.  This seems to work pretty well and simplifies things a fair bit.
2002-10-30 21:59:05 +00:00
curt
72017fc671 Andy Ross:
The biggest and coolest patch adds mouse sensitivity to the 3D
cockpits, so we can finally work the radios.  This ended up requiring
significant modifications outside of the 3D cockpit code.  Stuff folks
will want to look at:

+ The list of all "3D" cockpits is stored statically in the
   panelnode.cxx file.  This is clumsy, and won't migrate well to a
   multiple-aircraft feature.  Really, there should be a per-model list
   of 3D panels, but I couldn't find a clean place to put this.  The
   only handle you get back after parsing a model is a generic ssg
   node, to which I obviously can't add panel-specific methods.

+ The aircraft model is parsed *very* early in the initialization
   order.  Earlier, in fact, than the static list of allowable command
   bindings is built in fgInitCommands().  This is bad, as it means
   that mouse bindings on the instruments can't work yet.  I moved the
   call to fgInitCommands, but someone should look carefully to see
   that I picked the right place.  There's a lot of initialization
   code, and I got a little lost in there... :)

+ I added yet another "update" hook to the fgRenderFrame routine to
   hook the updates for the 3D panels.  This is only required for
   "mouse press delay", and it's a fairly clumsy mechanism based on
   frame rate instead of real time.  There appears to be delay handling
   already in place in the Input stuff, and there's a discussion going
   on about different mouse behavior right now.  Maybe this is a good
   time to unify these two (now three) approaches?
2002-10-29 19:44:03 +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
david
9a5080b6ad Fixed jump around the north indication. 2002-10-27 20:32:34 +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
david
fa87fe5c1d Modified for simpler command-manager interface. 2002-10-26 01:19:23 +00:00
david
d43dfa54df Major code simplification. 2002-10-25 22:19:51 +00:00
curt
4c2e97be18 Default to experimental point lighting disabled. 2002-10-24 14:05:40 +00:00
curt
ae46fe825f Erik Hofman: Irix build fixes. 2002-10-24 14:02:19 +00:00
curt
a9b9e9d155 Tweak red and blue runway light colors a bit more. 2002-10-24 14:02:06 +00:00
curt
786e58aa1a Removed some left over debugging output. 2002-10-24 12:12:14 +00:00
curt
bbf33cc7cb White space tweak ... 2002-10-24 12:11:55 +00:00
curt
d62b1a0a66 Fix a subtle bug in the partial ssg tree deleter which was leaving some
parts of the tree left over at the end which the failsafe was catching, but
this could impose a huge framerate hit if the missed portion of the tree
was large enough (and it very often was.)
2002-10-24 03:38:14 +00:00
curt
aff9655029 Tweak lighting colors a bit. Add a slight yellow tint to "white" lights.
Add a slight orange tint to "yellow" lights.  Brighten the blue lights a bit
to make them more visible.
2002-10-23 16:29:53 +00:00
curt
2214f540e2 Fixed the DG heading bug hold to work with the new DG instrumentation.
It was slightly goofed up before by about the amount of the magnetic
variation.
2002-10-23 16:27:30 +00:00
curt
66e8d3fe65 Updates to how we structure runway lighting in the scene graph so we can get
the range selector to work on a per runway (or per lighting group) basis.
2002-10-22 20:47:14 +00:00
curt
95f46806c2 Tone down the relative intensity of the taxiway lights. 2002-10-22 04:12:33 +00:00
curt
13813f9143 Added support for taxiway lights that are much more visible from the size
than from above.
2002-10-22 03:57:32 +00:00
curt
86d586e592 Make runway lighting LOD work correctly. 2002-10-21 19:45:21 +00:00
curt
15b6f15d36 Misc clean ups. 2002-10-21 16:26:48 +00:00
curt
4496bf341d Preallocate proper ssg list sizes when building list structures so plib
doesn't need to waste time extending it's list sizes.
2002-10-21 16:26:34 +00:00
curt
a4c06de42f Fix a bug with rabbit light creation. 2002-10-21 16:09:11 +00:00
curt
b0d12281c8 Minor tweak to avoid some compile errors people are seeing with the
glPointParameterExt.
2002-10-21 03:22:27 +00:00
david
d7662bceb8 Put cout and endl in std:: namespace. 2002-10-19 10:27:52 +00:00
curt
9c561ab860 Add a pre/post draw call back to strobe lights so we can make them bigger
so they will stand out from everything else.
2002-10-18 18:43:50 +00:00
curt
89ede45989 There are some problems with ssgTimedSelector's but shorter strings of
rabbit lights appear to almost work except the last light or two is never
included in the animation and longer strings of lights are drawn as all
light on ... :-(
2002-10-18 03:36:56 +00:00
curt
bbdca39e3b Some restructuring to optimize the light point portion of the scene graph.
There's no point in having a separate leaf for each light.
2002-10-17 23:17:16 +00:00
curt
7df3da668c Fix a bug in ground elevation measuring for the first frame after we cross
a tile boundary.  (Potentially imposes a slight performance penalty, but
getting the correct answer needs to be higher priority than getting the
wrong answer really quickly.)
2002-10-17 15:54:31 +00:00
curt
a01f92f0d1 Support green directional lights. 2002-10-17 15:52:32 +00:00
curt
55b7dc661e Playing with glPointParameterfEXT. 2002-10-17 04:34:32 +00:00
curt
050f44adc8 Cleaned some cruft. 2002-10-17 03:11:10 +00:00
curt
9d5281a5d1 Add support for generating REIL approach light animations. 2002-10-17 03:08:46 +00:00
curt
66bd17bfa3 Add support for additional runway light colors and intensities. 2002-10-16 22:39:08 +00:00
david
8aae366757 Fixed so that ASI will indicate correctly (or at least, more
correctly) in winds.
2002-10-16 22:09:26 +00:00
curt
3f7b0533a5 Add support for wind speed/direction and freezes. 2002-10-16 03:46:24 +00:00
curt
27c4385980 Throttle was being scaled with mixture config values.
Cleaned up some old cruft.
2002-10-16 03:46:05 +00:00
curt
4ef75aa6c8 Playing with point lighting effects. 2002-10-16 03:44:44 +00:00
curt
8166467292 Cleaned up some old cruft. 2002-10-16 03:44: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
curt
1ce4ef590f Norman Vine:
Updates to the autopilot to allow it to run off of 'non-cooked' altitude
and heading values (as a compile time option.)
2002-10-16 02:06:42 +00:00
curt
f38c88b762 Fix an init order bug and do some minor cleanups. 2002-10-16 02:02:39 +00:00
david
f962e24fee Use default visibility instead of modified sky visibility when 2D
clouds are disabled.
2002-10-13 10:46:37 +00:00
david
b66a6c75b3 Patch from Frederic Bouvier:
I noticed that textures for scenery static objects are not loaded
anymore for a few weeks.  Static objects have absolute path while
random objects and aircraft have relative path but fgLoad3DModel
unconditionally prepend fg_root to the model path. This patch test the
beginning of the model path to choose if fg_root has to be prepended
to the model path.
2002-10-13 10:43:57 +00:00
david
76cda01641 Fixed init-order bug that caused c172-set.xml defaults always to be
used unless explicitly overwritten.  Now, the options are parsed
twice, and only the *-set.xml file for the *last* aircraft specified
is loaded.
2002-10-10 18:39:52 +00:00
david
e8db622ce1 Patch from Alex Perry:
Ok, I found the problem.  You're computing the dynamic pressure in
"psf" and adding it to the static pressure in "inHg" to form the
total pressure.  The attached patch is the simple fix to the source.

With that fix, failing the pitot while in cruise at 3k' will cause
the airspeed to indicate beyond redline during climb ... well before 4k'.
Thus, a pitot problem can be detected on any IFR altitude change.

Similarly, failing the static (with working pitot) while cruising 4k'
causes the airspeed to indicate beyond redline during a descent
well before reaching 3k' (during which, of course, the ALT looks fine).
Thus, a static failure can be detected before the aircraft breaks out
of the pilot tolerance range and is blatantly conspicuous soon after.
2002-10-10 18:15:22 +00:00
curt
470d233f0d Eric Hofman:
Now the options can be localized as well. This adds a slight problem for
the --language options, but not that much (worst case, the strings are
loaded twice consuming some more memory). I tried to be as accurate as
posiible when copying the options texts, but there might be some
mostakes left.
2002-10-10 15:02:50 +00:00
curt
83314d3f45 Fix a potential crash with William Riley's scenery build. 2002-10-09 14:29:42 +00:00
curt
257c065d81 misc tweaks. 2002-10-09 14:15:08 +00:00