Save/restore seems to be working now, thanks to a couple of
unspeakable kludges:
1. Every time the altitude changes, pause the flight simulator for
five frames and then change it a second time.
2. Every time the latitude or longitude changes, wait five frames,
then invoke fgUpdateSkyAndLightingParams() a second time.
structure. The new approach is simpler, more flexible, and more dynamics.
We can now dynamically size the tile cache up and down. Also, the range
of tiles to load is now dependent on visibility and is calculated to always
bring in enough tiles.
bring EGT down to a more reasonable range. EGT is now returned in
deg Fahrenheit (yuk!!) by the accessor function since that is what
the guage is calibrated in, and the absolute max value that can be
output (max power mixture at max power) is about 750 deg F. Dave, I
suggest that you set the guage to run from 450 - 750 deg F between
the four big marker ticks. What do the offset and scale actually
refer to in the .xml config file BTW?
Fuel flow, better handling of manifold pressure wrt engine speed, and
proper consideration of altitude effects next, hopefully.
- removed Toggle Clouds menu item
src/Main/options.cxx:
- (minor) added some code to sync up options with properties
src/Main/bfi.[ch]xx:
- removed (get|set)Clouds(ASL)?
- removed setSpeedNorth, setSpeedEast, and setSpeedDown -- these are
all read-only now
- added setAirspeed (for calibrated kt)
- extensive rewrite to support Tony's FDM changes
- rearranged everything in bfi.hxx to mess up Curt's ediff examination
- added properties for setting initial panel position
src/Main/save.cxx:
- reinit the tile cache after restore
temperature. The cylinder head is assumed to be at uniform
temperature. Obviously this is incorrect, but it simplifies things a
lot, and we're just looking for the behaviour of CHT to be correct.
Energy transfer to the cylinder head is assumed to be one third of the
energy released by combustion at all conditions. This is a reasonable
estimate, although obviously in real life it varies with different
conditions and possibly with CHT itself. I've split energy transfer
from the cylinder head into 2 terms - free convection - ie convection
to stationary air, and forced convection, ie convection into flowing
air. The basic free convection equation is: dqdt = -hAdT Since we
don't know A and are going to set h quite arbitarily anyway I've
knocked A out and just wrapped it up in h - the only real significance
is that the units of h will be different but that dosn't really matter
to us anyway. In addition, we have the problem that the prop model
I'm currently using dosn't model the backwash from the prop which will
add to the velocity of the cooling air when the prop is turning, so
I've added an extra term to try and cope with this.
In real life, forced convection equations are genarally empirically
derived, and are quite complicated and generally contain such things
as the Reynolds and Nusselt numbers to various powers. The best
course of action would probably to find an empirical correlation from
the literature for a similar situation and try and get it to fit well.
However, for now I am using my own made up very simple correlation
for the energy transfer from the cylinder head:
dqdt = -(h1.dT) -(h2.m_dot.dT) -(h3.rpm.dT)
where dT is the temperature different between the cylinder head and
the surrounding air, m_dot is the mass flow rate of cooling air
through an arbitary volume, rpm is the engine speed in rpm (this is
the backwash term), and h1, h2, h3 are co-efficients which we can play
with to attempt to get the CHT behaviour to match real life.
In order to change the values of CHT that the engine settles down at
at various conditions, have a play with h1, h2 and h3. In order to
change the rate of heating/cooling without affecting equilibrium
values alter the cylinder head mass, which is really quite arbitary.
Bear in mind that altering h1, h2 and h3 will also alter the rate of
heating or cooling as well as equilibrium values, but altering the
cylinder head mass will only alter the rate. It would I suppose be
better to read the values from file to avoid the necessity for
re-compilation every time I change them.
derive specific viewer classes from it. Here's what I currently have in mind:
FGViewer
|
|-> FGViewerPRH (current system with orientation specified in
| LaRCsim Euler angle convention)
|
|-> FGViewerLookAt Feed in a position, view direction, and up vector
|
|-> FGViewerHPR (similar to PRH, but using ssg hpr euler angle
| convention)
|-> others?