FlightGear Newsletter January 2014: Difference between revisions

Jump to navigation Jump to search
m
Line 7: Line 7:
Note to all contributors: Please also copy your newsletter additions to the changelog for the upcoming release: [[Next Changelog]].
Note to all contributors: Please also copy your newsletter additions to the changelog for the upcoming release: [[Next Changelog]].


=== Soaring instrumentation SDK ===
Galvedro has started documenting the new soaring instrumentation Software Development Kit (SDK). The soaring instrumentation toolkit is a small library of Nasal objects that you can use for adding specialised soaring gauges to your glider. The library is comprised of several building blocks that you can connect together in different ways in order to get the desired functionality.
In order to use the library, you will need to write a Nasal script that will be loaded together with your aircraft. You do so by referencing this script in the <Nasal> section of your aircraft definition XML file. But don´t be scared, the scripts will be very simple. Lets see some examples.
<syntaxhighlight lang="nasal">
io.include("Aircraft/Generic/soaring-instrumentation-sdk.nas");
var probe = TotalEnergyProbe.new();
var vario_needle = Dampener.new(
input: probe,
dampening: 2.7,
on_update: update_prop("instrumentation/vario/te_reading"));
var vario_instrument = Instrument.new(
components: [probe, vario_needle],
enable: 1);
</syntaxhighlight>
This code implements a basic total energy compensated variometer, writing the needle reading to the property "instrumentation/vario/te_reading".
Continue reading at [[Soaring instrumentation sdk]]...
=== Random Buildings ===
=== Random Buildings ===


Navigation menu