Board index FlightGear Development Canvas

Adding Graphical Plotting to FlightGear

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Adding Graphical Plotting to FlightGear

Postby mahi_0615 » Fri Mar 08, 2013 5:42 am

Hi All
I am developing flightgear based post flight data analysis system. In this system i want to include a section which can plot the various flight parameters in real-time as well as in offline mode . Is there any MSVC ++ 2010 based open source software is available which we can modify according to our requirement.

Posts: 8
Joined: Wed Dec 26, 2012 7:46 am

Re: Adding Graphical Plotting to FlightGear

Postby Hooray » Fri Mar 08, 2013 8:54 am

mahi_0615 wrote in Fri Mar 08, 2013 5:42 am:Hi AllIn this system i want to include a section which can plot the various flight parameters in real-time as well as in offline mode .

This is already possible in FG >= 2.8 using the new canvas subsystem, without requiring any C++ code changes and without rebuilding FG from source. I'm moving this thread to the canvas subforum.

For details, please see below:

Subject: Help needed - market research for FG

Hooray wrote in Mon Dec 10, 2012 2:53 pm:
* A flight analysis featuring a map displaying the flightpath and a vertical analysis graph and VCR-like playback.

That should be very simple to implement using a combination of the canvas system and by accessing the built-in flight recorder subsystem.
Graphs can already be created using the canvas, we would just need a way to access the replay buffers from Nasal space.

Update: The required hooks for this just got committed by James: ... dfc1e1cb43
But it's using yet another subsystem called "FGFlightHistory" and apparently doesn't make use of the existing flight recorder subsystem at all ... :?
ThorstenB's flight recorder/property recorder system would have seemed like a more natural choice actually ...

Subject: Using a canvas map in the GUI
Hooray wrote in Wed Sep 19, 2012 12:56 pm:
zakalawe wrote in Wed Sep 19, 2012 12:34 pm:There's also a long-requested feature to use the replay-code to extract the historical aircraft position, which would be another kind of data to show.

That's definitely a good idea, accessing the replay/flight recorder buffers via a dedicated Nasal/property tree interface would be pretty cool, not just for showing historical path data, but also for computing a flight profile, or even for doing a full flight evaluation - which could also be done via Nasal/Canvas then, we just need Nasal hooks (i.e. ghosts) to access the replay/flight recorder subsystem and get data from it.

I've been talking to ThorstenB about exposing the system to Nasal a while ago, and when Tom and I played around with graph plotting, we also figured that it would be kinda cool to access such info from Nasal.

The combination of these features (replay/flight recorder access + Nasal + Canvas), would also make it possible to create a full flight instructor console. The original graph-plotting experiments were pretty encouraging:
And 2D plotting is another long-standing feature request, originally brought up by Curt: ... 03651.html

curt wrote:But, I was just thinking today that it might be cool to have a built
in grapher for simple / quick graphing needs.

With the property system it would be trivial to pick an arbitrary
property from the property tree and graph it over time -- superimposed
on top of everything else.

With the Canvas, it has now become trivial to create such graphs, but we still need to have Nasal-space access to the corresponding subsystems and data, i.e. the replay/flight recorder system.

Update: Zakalawe has just committed to implement the required hooks for this as part of issue 763: ... dfc1e1cb43

mahi_0615 wrote in Fri Mar 08, 2013 5:42 am:Is there any open source software is available which we can modify according to our requirement

See this thread: viewtopic.php?f=49&t=17540&hilit=gnuplot

More at: search.php?st=0&sk=t&sd=d&sr=posts&keywords=gnuplot

Update 05/2013:
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Posts: 11968
Joined: Tue Mar 25, 2008 8:40 am

Return to Canvas

Who is online

Users browsing this forum: No registered users and 2 guests