david [Wed, 27 Nov 2002 01:38:26 +0000 (01:38 +0000)]
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.]
curt [Tue, 26 Nov 2002 02:29:03 +0000 (02:29 +0000)]
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.
curt [Sun, 17 Nov 2002 04:17:27 +0000 (04:17 +0000)]
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.
curt [Sun, 17 Nov 2002 04:04:21 +0000 (04:04 +0000)]
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.
david [Sun, 17 Nov 2002 00:30:40 +0000 (00:30 +0000)]
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.
david [Sun, 17 Nov 2002 00:04:57 +0000 (00:04 +0000)]
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. :)
david [Sat, 16 Nov 2002 22:08:22 +0000 (22:08 +0000)]
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.
curt [Fri, 15 Nov 2002 21:13:29 +0000 (21:13 +0000)]
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.
david [Fri, 8 Nov 2002 02:03:56 +0000 (02:03 +0000)]
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.
david [Wed, 6 Nov 2002 15:47:40 +0000 (15:47 +0000)]
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.
david [Tue, 5 Nov 2002 02:28:07 +0000 (02:28 +0000)]
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.
david [Mon, 4 Nov 2002 02:17:13 +0000 (02:17 +0000)]
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.
curt [Tue, 29 Oct 2002 19:44:03 +0000 (19:44 +0000)]
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?
curt [Thu, 24 Oct 2002 03:38:14 +0000 (03:38 +0000)]
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.)
curt [Wed, 23 Oct 2002 16:29:53 +0000 (16:29 +0000)]
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.
curt [Fri, 18 Oct 2002 03:36:56 +0000 (03:36 +0000)]
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 ... :-(
curt [Thu, 17 Oct 2002 15:54:31 +0000 (15:54 +0000)]
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.)
david [Sun, 13 Oct 2002 10:43:57 +0000 (10:43 +0000)]
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.
david [Thu, 10 Oct 2002 18:39:52 +0000 (18:39 +0000)]
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.
david [Thu, 10 Oct 2002 18:15:22 +0000 (18:15 +0000)]
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.
curt [Thu, 10 Oct 2002 15:02:50 +0000 (15:02 +0000)]
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.
curt [Mon, 7 Oct 2002 15:45:00 +0000 (15:45 +0000)]
Erik Hofman:
This adds supports for a language specific font, defined in locale.xml
I've also moved the fgInitLocale() routine from main.cxx to fg_init.cxx
to prevent an ungly extern definition in options.cxx.
curt [Sun, 6 Oct 2002 03:53:19 +0000 (03:53 +0000)]
Begin work on rendering runway lights using environment maps. The basics
are now working. A runway light is defined by a point and a direction. The
point and direction are combined with the local up vector to create a small
triangle orthogonal to the direction. The two ficticous corners of the
triangle are given an alpha value of zero, the orignal corner is given an
alpha of one. The triangle is drawn in glPolygonMode(GL_FRONT, GL_POINT)
mode which means only the corner points are drawn, and since two have alpha=0
only the original point is drawn. This is a long way to go to draw a point,
but it ensures that the point is only visible within 90 degrees of the light
direction, behind the light it is not visible. This is still a long way
to get to drawing a point, but we use an environement map, with the direction
vector as the normal to mimic a light that is brightest when viewed head
on and dimmest when viewed perpendicularly or disappears when viewed from
behind.
- warning, there is a bug in how the current runway light direction vector
is calculated which will adversely effect runway lighting. The airports
should be regenerated in order to fix this problem.