FlightGear Newsletter September 2014: Difference between revisions

Jump to navigation Jump to search
Line 61: Line 61:
=== Background ===
=== Background ===
For our aircraft developers who don't regularly read the mailing list (even though any aircraft developers should already be subscribed), please read this topic: https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/DUB127-W168600DE27B42094E5263EC3C10%40phx.gbl/#msg3280971
For our aircraft developers who don't regularly read the mailing list (even though any aircraft developers should already be subscribed), please read this topic: https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/DUB127-W168600DE27B42094E5263EC3C10%40phx.gbl/#msg3280971
== Using Ada in FlightGear ==
[[File:FlightGear built using gnatmake.png|thumb|FlightGear built with optional support for Ada]]
Recently, we've had an interesting discussion on the forum where some of FlightGear's threading issues were discussed, and a few contributors mentioned that Ada would have better tasking support than C++ because C++ support for tasking/multi-threading is generally considered fairly "low-level". Other programming languages, like Ada, provide native support for multi-threading using built-in primitives like '''tasks''' and '''protected types'''.
Meanwhile, a few contributors have teamed up to explore using Ada in FlightGear to make some experiments.
We're hoping to document the steps required to extend our [[Developing using CMake|CMake build system]] to support optional modules implemented in Ada as discussed by onox, Flying toaster and Hooray on the forum, including support for mapping existing C++ classes to Ada (e.g. from OSG and/or OpenRTI).
The main goal being here to leverage Ada's native tasking support for prototyping optional features that do not have to be running in the FlightGear main loop.
We've already found some existing CMake modules that we can reuse: The [http://plplot.sourceforge.net/ PLPlot project] is implemented using C, C++ and Ada and provides a set of CMake modules that are scheduled to be merged into CMake soon.
Hooray has copied those files into a branch of $FG_SRC and ended up with a working build environment that successfully links in Ada modules. For starters, we'll be playing with optionally allowing [[Howto:Add new fgcommands to FlightGear|fgcommands]] to be implemented in Ada, as well as new [[Howto:Create new subsystems|SGsubsystems]].
Next, we'll be exploring how to add thin bindings using '''-fdump-ada-spec''' for existing SimGear/OpenRTI (HLA) headers and document the whole process on the wiki.
Using -fdump-ada-specc to create bindings for SG/HLA classes to create standalone HLA federates in Ada would make FG pretty compelling for anybody doing this kind of thing professionally, because Ada simply happens to be widely used in the aviation industry, and it seems there are even bindings of complex stuff like OSG available.
To learn more, please see [[Using Ada in FlightGear]]


== Performance Issues ==
== Performance Issues ==

Navigation menu