This set of changes cleans up my previous ones quite a bit:
[tony@valkyrie FlightGear]$ tar -ztf tp_changes.tgz
src/Controls/controls.cxx
src/Controls/controls.hxx
src/FDM/JSBsim.cxx
src/Main/fg_init.cxx
src/Main/options.cxx
src/Main/options.hxx
src/Joystick/joystick.cxx
controls.[ch]xx: removed the trimmed_throttle stuff. This undoes the
changes I submitted last time.
JSBsim.cxx: updates for the removal of the trimmed_throttle stuff
fg_init.cxx: removed the autothrottle logic. The autothrottle is now
off
by default.
options.[ch]xx: Sets trim_mode to false by default. It is enabled only
when --notrim is not used and JSBsim is the FDM.
joystick.cxx: Added logic for syncing the throttle lever. This is
only enabled when trim_mode is enabled. The way I
did it is, I hope, a good way of going about it.
I tested:
fgfs --fdm=larcsim
fgfs --fdm=jsb --aircraft=c172 --vc=100 --altitude=500
fgfs --notrim --fdm=jsb --aircraft=c172 --vc=100 --altitude=500
All work as intended, at least for me.
Make sure your joystick is calibrated and give:
fgfs --fdm=jsb --aircraft=c172 --vc=100 --altitude=500
a try, I think you just might be impressed.
I am. ;-)
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
- the panel uses much, much less texture memory, and draws much
faster, at least on my hardware
- there is a wet (magnetic) compass at the top of the panel
- the gyro compass shows true heading again, but don't get used to it:
we're going to set it up to drift soon
- there are TO/FROM flags on NAV1 and NAV2 (but no GS flag yet)
- the ADF looks a little more realistic (if you can forgive the ugly
needle)
- when the HUD is not open, the framerate is moved to the right side
of the screen so that it won't be obscured by the mag compass
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start