> I'm busy creating a variometer for FlightGear.
> My instrument needs to be able to :
> 1. Display total energy (using some maths I haven't figured
> out yet) 2. Play sounds (audio cue) 3. Accept user input to
> its 2 knobs and 3 toggle switches.
> From what I've seen in FG I would have to generate the total
> energy property from a nasal script, play the sounds from the
> aircraft XML file and accept the user input through the panel
> hot spot (actions) config file.
> I have one short word to describe this affair : "Mess!" :)
> Most of the instrument has to be coded into the aircraft
> config files (although none of it is aircraft model specific)
> and for every aircraft that I want to install the instrument
> in I would have to duplicate the sound, hot spots and nasal code.
> Is there not a better way of doing it?
This is exactly the reason for one of the features being added for
JSBSim in the next release: the ability to calculate arbitrary values
based on parameters know within the FDM - especially things like you
have described here: total energy. Flight management systems and
displays are getting increasingly sophisticated. The next release of
JSBSim includes the ability to specify functions using XML markup very
similar to MathML. The result of the function would be available as a
property to the instrument subsystem. Believe me, this approach that
FlightGear uses - however complicated it may seem - is so much better
than other approaches I have seen in flight simulation code. Like
comparing night and day.
Flightgear-devel mailing list