Greetings!
I have been doing some work on glider specific instrumentation lately, and I thought it would be nice to drop a quick note here in the forums to let you know, and perhaps to get some feedback also. This is my first development for FlightGear, so I hope I am not reinventing the wheel!
My idea is to build up a small library of reusable elements that can be interconnected for assembling real world gliding instruments. Currently, all these elements are implemented in Nasal space, although I don't discard the idea of moving them down to C++ eventually.
The library is still taking shape and some components are still under active development, but for now, it includes the following:
- TotalEnergyProbe: Provides instant total energy variation.
- Dampener: Simulates needle dampening with a given time constant.
- Averager: Moving average of the last X samples.
- PolarSolver: Provides optimal speed to fly given a glider polar (quadratic parametrization for now).
- NettoVario: Properly simulated airmass variometer, taking a total energy readout and substracting a tabulated glider sink rate for current airspeed.
- RelativeVario: Adds gliders minimum sink rate on top of the Netto reading.
- SpeedCommandVario: Provides the difference between current airspeed and "optimal" speed to fly according to classical McCready theory.
- FinalGlideComputer: Computes altitude required to cover a final glide distance for a given McCready setting. Takes provided wind into account.
Elements that perform time related computations take simulation speed into account and are framerate independent, so vario needles do not drop suddenly if you set simulation speed to 4x, for example, or don't oscillate when framerate gets jittery.
A couple of examples of what I would like to achieve:
- The ILEC SC7 electronic variometer currently available in the sim can be implemented by putting together a total energy probe, one dampener, and a 25 sec averager.
- A "speed to fly" vario like a Borgelt B500 would be implemented by connecting a TotalEnergyProbe, a Dampener, an Averager, a PolarSolver and a SpeedCommandVario.
- A more advanced flight computer like a Cambridge MNAV/LNAV for example would make use of all elements in the library for the computations, plus a high level Nasal script for the user interaction part.