with jsbsim since no engine is currently created. This will all have to be
revamped in the future, but jsbsim has the structure for doing engines so
that is good.
I have a scrollable panel working (it didn't take long in the end). A
panel can now be much wider or higher than the available area, and the
user can scroll around using [Shift]F5, [Shift]F6, [Shift]F7, and
[Shift]F8. The user can also scroll the panel down to get a bigger
external view. Mouse clicks seem still to be working correctly.
To set the panel's (virtual) height and width, use the panel file's /w
and /h properties in a panel XML file; to set the initial x- and y-
offsets (untested), use the panel file's /x-offset and /y-offset
properties; to set the initial height of the external view (untested
and optional), use the panel file's /view-height property. Note that
none of these show up in the regular FGFS property manager.
Unfortunately, these patches will not affect your initialization
problems with the property manager -- I'm having a hard time tracking
them down because I cannot reproduce them.
I have also made some patches to main.cxx and views.cxx to do two
things:
1. Expand or shrink the external view as the panel moves up and down.
2. Set the window ratio correctly, so that we don't get an oval sun
and flat clouds when the panel is visible (the problem before was
integer division, so I added casts).
Unfortunately, the window ratio is not set properly at start-up --
there are too many dependencies, and I haven't figured that part out
yet. As soon as you hide and redisplay the panel or move it
vertically (i.e. force fgReshape to be called), you'll see the correct
ratio.
- /engines/engine0/rpm changed to read-only
- /engines/engine0/egt added (read-only)
- /controls/mixture added
- /controls/propellor-pitch added (not used for C172)
BFI:
- getEGT() added
- getMixture() and setMixture() added
- getPropAdvance() and setPropAdvance() added (= pitch)
- cleaned up reinit function a bit
- force reinit only when values are actually changed; for example,
setting the flight model to the current flight model will not cause
a reinit
LaRCSim:
- hook up mixture and pitch to FGControls (they were hard-coded
before)
- /engines/engine0/rpm changed to read-only
- /engines/engine0/egt added (read-only)
- /controls/mixture added
- /controls/propellor-pitch added (not used for C172)
BFI:
- getEGT() added
- getMixture() and setMixture() added
- getPropAdvance() and setPropAdvance() added (= pitch)
- cleaned up reinit function a bit
- force reinit only when values are actually changed; for example,
setting the flight model to the current flight model will not cause
a reinit
LaRCSim:
- hook up mixture and pitch to FGControls (they were hard-coded
before)
Added an initial freeze on startup so that we can try to avoid bouncing the
plane on it's back during the very low frame rate / scenery loading startup
conditions.
src/Cockpit/radiostack.cxx
- extended VOR ranges to make them slightly more usable (pending some
real radio code)
src/Cockpit/sp_panel.cxx
- fixed heading bug on gyro compass (sort-of -- the AP still doesn't
work quite as expected)
- skid ball moves the right direction
- moved whiskey compass more to the co-pilot's side, as suggested by
Alex a while back
src/Joystick/joystick.cxx
- included Norm's Windows patches
- renamed brake properties (see bfi.cxx, below)
src/Main/bfi.cxx
src/Main/bfi.hxx
- renamed getBrake and setBrake to getBrakes and setBrakes
- added getCenterBrake and setCenterBrake
- added getAPHeading (without mag correction, needed for the panel)
- renamed property /controls/brake to /controls/brakes/all
- renamed property /controls/left-brake to /controls/brakes/left (as
requested by Alex)
- renamed property /controls/right-brake to /controls/brakes/right (as
requested by Alex)
- added property /controls/brakes/center
- added property /autopilot/settings/heading
- fixed bug in setAltitude so that altitude will be property restored
from a save file
- fixed getBrakes to return the highest of the three brake settings
src/Main/save.cxx
- call FGBFI::getBrakes instead of FGBFI::getBrake
Cleaned a bit of cruft out of gui.[ch]xx
Cleaned up win_ratio() and fov code to make more sense and be a bit more
consistant and robust and less buggy and less susceptible to screw ups.
Panel is activated now by default, HUD is off by default.
from the pre-ssg / render everything ourselves days. Replaced with a
material library manager that is much better suited for working in the
context of ssg. This simplified and cleaned up a ton of old junk.
1. I've modified src/Time/fg_time.cxx so that the --start-date-gmt
option works correctly, at least on my system.
2. I've modified src/Main/bfi.cxx to return the correct time from
FGBFI::getTimeGMT(), so that saving and reloading now keeps the time set
correctly again.
3. I've modified src/Main/main.cxx so that the engine still makes a
noise when it's idling (it sounded very strange when the engine simply
turned off at idle then magically turned on again with a little
throttle).
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
old routines from SRGP. Steve's plib/sg.h does a nice job of completely
replacing this (and since plib is already around) and is a nice clean design
so it just makes sense.
above terrain check so when the view position and the aircraft model collided
the current altitude kept getting pushed up to compensate, but of course the
aircraft model would get pushed up as well because it tracks the current
aircraft position and orientation. Thus you had a never ending cycle ...
Added Simulator/Clouds/
Durk fixed a problem in gui.cxx with cursor type.
Durk updated his time zone / time-offset command line parameters
Curt added a cheezy fade in/out as we transition through the cloud layer.
We really need to fog the sky dome, sun, moon, stars as well.
Curt added --enable/disable-clouds and --clouds-asl= to control clouds.
Joystick auto-coordination tweaks.
Additional debuging output when pausing and resuming the sim.
Window resizing tweaks by David Megginson (and Norman Vine).
options.cxx: reorder option initializations to match declaration order.
views.cxx: much cleanup of stuff that was depricated by the move to ssg.
I now use ssg to do all the projection/modelview matrix calculation
and setup. (mostly)
vies.hxx: also added the view pan offset to the view matrix calcs.