andy [Sat, 15 Jun 2002 05:40:02 +0000 (05:40 +0000)]
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.
curt [Wed, 12 Jun 2002 16:38:46 +0000 (16:38 +0000)]
Erik Hofman:
This is the small code fix which is needed for the new options.xml file.
It is needed because otherwise the "--prop:name=value" is showed
incorrectly.
There is another problem though, when compiling with --without-logging
the help message isn't displayed at all! We *must* change that somehow.
Curt: good point, the SG_LOG()'s have been switched to cout's ...
andy [Wed, 12 Jun 2002 08:23:05 +0000 (08:23 +0000)]
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.
curt [Wed, 12 Jun 2002 06:16:23 +0000 (06:16 +0000)]
Updates to the 610x interface:
- More progress with proper radio freq tuning and proper interpreting of the
hardware values.
- Filter ignition and flap switch values since the hardware implimentation has
a dead zone where the value can go to zero in the middle of a change in
switch position.
curt [Tue, 11 Jun 2002 17:06:46 +0000 (17:06 +0000)]
Erik Hofman:
I've updated the FIXME in the code, and fixed a typo (descr instead of
description), but the SG_LOG() functions doesn't produce any output for
me. Could you confirm it's still working for you?
Curt Olson:
I did a bit of further tweaking and it all looks good now. The tricky thing
is that SG_LOG() always appends an endl at the end of every message.
curt [Mon, 10 Jun 2002 23:30:23 +0000 (23:30 +0000)]
Erik Hofman:
This is an enhanced version of the options patch.
It's more robust now, and gives some helpful information if something
goes wrong. Also the naming in the options.xml file has changed to the
syntax David suggested.
Since no one objected to the patch I think it is safe to included it.
david [Mon, 10 Jun 2002 13:20:26 +0000 (13:20 +0000)]
Separate the model geodetic position and orientation into a separate
class, FGModelPlacement, while FG3DModel retains control of animation.
This way, we can have a single, top-level placement, but multiple
layers of nested models underneath. To include a nested model, use
something like this in the XML wrapper:
david [Sun, 9 Jun 2002 21:28:17 +0000 (21:28 +0000)]
Modified --wind=DIR@SPEED option to allow both DIR and SPEED to
contain colon-separated ranges. For examples, winds from 180 degrees
10 knots gusting 15 knots would be
--wind=180@10:15
Winds variable from 180-220 degrees 5 knots would be
--wind=180:220@5
FGEnvironment does not yet support variable-direction winds, so
nothing will yet happen in the second case.
curt [Fri, 7 Jun 2002 21:03:27 +0000 (21:03 +0000)]
James Turner:
Modifications to support querying navaid database by station ID (not just
frequency.) Some corresponding changes to testnavs.cxx to test new
functionality.
david [Fri, 7 Jun 2002 20:16:54 +0000 (20:16 +0000)]
Patch from Jim Wilson:
This is a small patch that makes the autopilot work much better with big heavy
airliners as well as the small Cessnas. Of course this doesn't address the
way autopilots should be modeled.
But by making a couple changes the "George" is now capable of landing either a
C172 or a 747 very close to the center line of the runway with a moderate
cross breeze (15-20kt).
The changes:
- Added turn configurability so that things like Max Aileron and Roll can be
configured per aircraft.
- Enhanced localizer routine (NAV mode) to begin lining up the aircraft as soon
as the cone is entered. The former model is adopted for the last 5km of the
approach in order to ensure greater precision (makes a very slight difference).
[float cast added by David Megginson to keep G++ 3.0 happy]
david [Fri, 7 Jun 2002 19:52:00 +0000 (19:52 +0000)]
Patch from Jim Wilson:
This is a small patch that makes the autopilot work much better with big heavy
airliners as well as the small Cessnas. Of course this doesn't address the
way autopilots should be modeled.
But by making a couple changes the "George" is now capable of landing either a
C172 or a 747 very close to the center line of the runway with a moderate
cross breeze (15-20kt).
The changes:
- Added turn configurability so that things like Max Aileron and Roll can be
configured per aircraft.
- Enhanced localizer routine (NAV mode) to begin lining up the aircraft as soon
as the cone is entered. The former model is adopted for the last 5km of the
approach in order to ensure greater precision (makes a very slight difference).
[float cast added by David Megginson to keep G++ 3.0 happy]
david [Thu, 6 Jun 2002 00:21:23 +0000 (00:21 +0000)]
Air density is now calculated automatically from air pressure,
temperature, and dewpoint. The /environment/density-sea-level-slugft3
property has been removed, and the /environment/density-slugft3
property is read-only.
curt [Wed, 5 Jun 2002 05:22:42 +0000 (05:22 +0000)]
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.
andy [Tue, 4 Jun 2002 07:23:34 +0000 (07:23 +0000)]
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.
andy [Sat, 1 Jun 2002 19:59:38 +0000 (19:59 +0000)]
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.
andy [Thu, 30 May 2002 18:54:08 +0000 (18:54 +0000)]
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.
andy [Wed, 29 May 2002 08:41:13 +0000 (08:41 +0000)]
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.
andy [Thu, 23 May 2002 19:47:19 +0000 (19:47 +0000)]
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.
andy [Thu, 23 May 2002 19:30:56 +0000 (19:30 +0000)]
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.
andy [Tue, 21 May 2002 07:40:46 +0000 (07:40 +0000)]
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.
curt [Mon, 20 May 2002 16:28:21 +0000 (16:28 +0000)]
Erik Hofman:
This patch adds "elapsed time" support to the sound code.
It is now possible to define <internal>dt_play</internal> or
<internal>dt_stop</internal> instead of a propery in the <volume> and
<pitch> sections of the configuration file.
curt [Mon, 20 May 2002 16:13:37 +0000 (16:13 +0000)]
Jim Wilson:
This is a small fix for what turned out to be a major bug. Ground elevation
was calculated incorrectly when distant from one of the view locations. This
resulted in several problems including bizarre gear trimming, mid air
"crashes" (as in thinking we hit the ground) and so on when close to or on the
ground.
Unfortunately it does require a second ssg traversal when in tower view
(only), but the increased load isn't all that noticable. For the time being
this really is the best solution. In a future update I will be eliminating
the unecessary per frame traversals for the static views (without having to
maintain multiple ssgRoots).
When we go to multiple FDM instances we will perhaps need to put the ssg
traversal and ground elevation queries for the FDMs into an event timer that
updates the FDMs ground elevation in a round robin fashion (maybe every 1/n
seconds where n is the number of FDM instances running).
curt [Mon, 20 May 2002 15:53:14 +0000 (15:53 +0000)]
Bernie Bright:
Ensure lines sent to clients are CRLF terminated.
Ensure the dump command null terminates its output string.
Removed view command and comments.
david [Fri, 17 May 2002 19:04:20 +0000 (19:04 +0000)]
No longer initialize static cloud layers (handled dynamically in
environment_mgr.cxx). The /environment/clouds/status property is now
checked each frame, so clouds can be turned on or off in the middle of
a session.
david [Fri, 17 May 2002 19:02:24 +0000 (19:02 +0000)]
Added support for initializing and maintaining up to five cloud
layers. The properties controlling each layer are inside
/environment/clouds/layer[n], and the available properties are type
("clear", "overcast", "mostly-cloudy", "mostly-sunny", or "cirrus"),
span-m (should be about 40000), elevation-ft, thickness-ft, and
transition-ft.
curt [Fri, 17 May 2002 17:25:28 +0000 (17:25 +0000)]
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.
david [Fri, 17 May 2002 01:23:00 +0000 (01:23 +0000)]
Temporarily modified to support changes in SGSky and SGCloudLayer;
this will soon be removed into a separate module that allows dynamic
changes to cloud layers.
andy [Thu, 16 May 2002 07:49:22 +0000 (07:49 +0000)]
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.
curt [Wed, 15 May 2002 21:44:34 +0000 (21:44 +0000)]
Bernie Bright:
Here is the new super improved telnet property interface. CVS changelog
is at the end of this message. Once this new telnet code is in and
compiles every where we can remove Network/props.[ch]xx. I've added a
--telnet=<port> command line option to invoke the new server. Later on
we could remove the --props option, or least change it to invoke the new
server. I'll let you decide.
I've added some new commands to the telnet interface:
view next Select the next view.
view prev Select the previous view.
view set <n> Select view 'n'
view get Return index of current view
I'm not sure if these same effects could be achieved through property
operations. The commands provide a convenient shortcut in any case.
I'm also planning on adding a panel command to manipulate panels and
objects contained therein (eg simulated mouse clicks). There is going
to be some commonality with the command objects so we may need to
rationalize this in the near future.
Finally, I've also included my python stuff. This is still very much a
work in progress, basically I've been using it to test the new telnet
server. I have tested it with python 2.2. Feel free to add it to the
repository if you want. I would suggest a scripts/python directory
CVS Changelog
Network/telnet.cxx: New property telnet protocol interface. It supports
the same user interface provided by the --props server. Additionally it
handles multiple simultaneous connections. Added "view" command to
manipulate viewmgr.
david [Wed, 15 May 2002 12:10:48 +0000 (12:10 +0000)]
Take the static temperature, static pressure, and density values from
an external source if requested by the
/environment/params/control-fdm-atmosphere property.
david [Wed, 15 May 2002 12:06:33 +0000 (12:06 +0000)]
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.
david [Wed, 15 May 2002 12:04:25 +0000 (12:04 +0000)]
Actively manage the static temperature, static pressure, and density
values in the FDM if requested by the
/environment/params/control-fdm-atmosphere property.
Setting either the sea-level or altitude value automatically sets the
other value appropriate, except for temperature at altitude above the
Troposphere (where there's no reliable way to back-calculate it). The
atmosphere model appears in the atmosphere_data array in
environment.cxx, and can easily be extended into the upper
stratosphere and beyond.
These are not yet tied into the FDMs or steam module.
david [Sat, 11 May 2002 16:28:50 +0000 (16:28 +0000)]
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.