colors from /sim/gui/colors/ into map;
- set default color scheme
- handle fonts
- implement color class
- close all dialogs on reinit, set up style again, and then reopen all
(non-nasal generated) dialogs again
generated by freeglut's genfont utility. That application also generates
a copyright message that I did not copy into this file, because it is
wrong: the author of genfont claims copyright for data that *I* generated
using his program; this doesn't fly. Of course, the copyright will remain
in the (heavily edited) version of *his* code. I'll commit that, too.
no longer save inaccessible bindings copies, but only pointer to the
bindings in the property tree (which was desirable to get accurate
error messages for Nasal bindings).
I have introduced the posibility to start directly on the carrier.
With that patch you will have a --carrrier=id argument where id can either be
the pennant number configured in the nimitz scenario or the carriers name
also configured in the carriers scenario.
Additionaly you can use --parkpos=id to select different positions on the
carrier. They are also configured in the scenario file.
That includes the switch of the whole FGInterface class to make use of the
groundcache.
That means that an aircraft no longer uses the current elevation value from
the scenery class. It rather has its own local cache of the aircrafts
environment which is setup in the common_init method of FGInterface and
updated either manually by calling
FGInterface::get_groundlevel_m(lat, lon, alt_m);
or implicitly by calling the above method in the
FGInterface::_updateGeo*Position(lat, lon, alt);
methods.
A call get_groundlevel_m rebuilds the groundcache if the request is outside
the range of the cache.
Note that for the real usage of the groundcache including the correct
information about the movement of objects and the velocity information, you
still need to set up the groundcache in the usual way like YASim and JSBSim
currently does.
If you use the native interface, you will get only static objects correctly.
But for FDM's only using one single ground level for a whole step this is IMO
sufficient.
The AIManager gets a way to return the location of a object which is placed
wrt an AI Object. At the moment it only honours AICarriers for that.
That method is a static one, which loads the scenario file for that reason and
throws it away afterwards. This looked like the aprioriate way, because the
AIManager is initialized much later in flightgears bootstrap, and I did not
find an easy way to reorder that for my needs. Since this additional load is
very small and does only happen if such a relative location is required, I
think that this is ok.
Note that moving on the carrier will only work correctly for JSBSim and YASim,
but you should now be able to start and move on every not itself moving
object with any FDM.
- add <vrule>
- allow elements to default to foreground color (black)
- remove redundant if (foo) delete foo;
The rules do currently need a dummy child for the layouter to work correctly,
(<hrule><foo/></hrule>). The goal is to make a simple <hrule/> work.
on RPM via a model developed by Vivian Meazza. Add a "boost" output
to the property tree. Fix a bug where MP would be reported "before"
the wastegate clamping.
- use new removeChildren() to remove the named js nodes that we don't
need any more (they are now *really* removed, not just detached), and
- move it into postinit(). (getChildren() returns a SGPropertyNode_ptr,
so all nodes are refcounted and, thus, after the last sg/props change
no longer removable in that scope ;-) Maybe we'll need an alternative
getChildren() that returns SGPropertyNode* ...
- This doesn't do what the author though it would do:
if (modifiers&KEYMOD_RELEASED == 0) ... (see below)
- MSVC and type fixes
mf:
fixing this uncovered an old bug: the "key pressed" branch was
actually never executed -- always only "released". And that is why
the <repeatable> property didn't work. And *that* was the reason
why the Spitfire's starter didn't work with freeglut, and Vivian
had to write a nasty workaround for it.
Changes
=======
New volumetric shadows for FlightGear.
There is now two new checkboxes in the rendering dialog to enable/disable shadows
for the user aircraft and for static scenery objects (ie those defined in the .stg files).
AI and random objects are not handled for the moment.
known bugs
==========
- ghost objects
Annexed an IVSI (instantaneous ertical speed indicator), which bypasses a
limitation with Concorde :
- the cruise at Mach 2 must be with a slow climb rate of 50/60 ft/min
(2h from 50000 ft).
- with /velocities/vertical-speed-fpm, the real climb rate (altimeter) varies :
One must constantly (every 5-10 minutes) change the vertical speed hold of
the autopilot between 10 ft/min and 200 ft/min.
This is very annoying because not a constant offset : that could be a lack of
sensitivity of /velocities/vertical-speed-fpm (FDM ?).
This new IVSI :
- Is an emulation with works with environment pressure : a real IVSI works with
static pressure (with lag) + accelerometers.
It is not forbidden to later upgrade to the real model.
- Doesn't require a tuning of the autopilot made with
/velocities/vertical-speed-fpm (also tested with 737, 747) :
Concorde's autoland works without update.
block (this required to move most of init() into postinit())
- undo the "which" pseudo-namespace workaround, and do it proper:
- let all nasal code in a joystick config file be executed in its own
namespace. This allows to define functions in the init block that
can be used throughout the driver file, and to write state variables
in one binding, while reading them in other bindings, all without
having to make sure that the values aren't lost in between, or collide
with another joystick driver's code.
For this the input subsystem creates a namespace for each joystick:
"__js0" for joystick 0, etc. The two leading underscores are there to
avoid collisions with user defined modules (similar to internal compiler
variables). The namespace shouldn't be used explicitly, at least not in
releases, and not from outside code, except for testing purposes, for
which it can be useful. (If using the Cyborg joystick as js[0], you
can read the modifier level as "__js0.modifier" from any nasal context.)
- make it public
- enable handleCommand() to execute a binding (or other nasal code defined
in a property system subtree) in a particular namespace (-> "module" child)
These changes represent some attempts to bandaid and patch a hopelessly
flawed system to impliment basic battery charging/discharging as well as
provide the ability to model ammeter gauges and draw current from multiple
sources (like load balancing multiple alternators in a multi-engine aircraft.)
The system design forces all these things to be horrible hacks or depend
on extremely subtle system side effects and call ordering so they may or9
may not work to one degree or another.
As mentioned in the mailing list, my recommendation is to move away from
using this system and instead build a procedural electrical system using
nasal. Sometime in the future we hopefully can impliment a better conceived
data driven electrical system model.
to the joystick index (x in /input/joysticks/js[x]) both when initializing
nasal init blocks & whenever updating the joystick. That's the only way to
make these nasal contexts aware of the joytick for which they were called.
And that's useful if a js maintains common variables, such as modifiers or
state variables, that should be shared between the namespace-less bindings
and initialization code. And, yes, it's over-engineered ... :-)