Hooray wrote in Sat Jan 10, 2015 2:51 pm:could you be a little more specific ?
For instance, are you referring to modern instruments (MFDs) using GUI widgets (think Airbus A380/Boeing 787) or are you thinking in terms of of more conventional ("steam") gauges ?
Or is this about having gauges as GUI widgets ?
Hooray wrote in Sat Jan 10, 2015 2:51 pm:To answer in general, gauges will typically be SVG files (created via Inkscape) and animated via Nasal timers/listeners.
Depending on what you have in mind, we have a few howtos/tutorials on the wiki, including quite a few code snippets/examples in $FG_ROOT
Hooray wrote:Any Nasal/Canvas code that is highly specific to a single aircraft/instrument or use-case or that only supports a single instance of a display/instrument, will sooner or later turn out to be a huge maintenance challenge unfortunately, no matter how sophisticated the code involved might be. Unfortunately, our ND/MapStructure code isn't necessarily as structured as some of the more recent examples, especially the Avidyne Entegra R9 code is freaking awesome in comparison, but not yet sufficiently generic to be useful outside the scope of the extra500/Avidyne R9 - equally, Torsten's RBAR EFIS is basically the most elegant, and most correct, approach towards implementing a Canvas/Nasal based animation framework, but isn't yet sufficiently unified and generalized to be usable elsewhere.
The other thing is that the ND/MapStructure code gets away without using any conventional design patterns - which makes it fairly accessible to less-experienced contributors, especially those new to coding in general - in fact, all those layers and SVG elements are animated using a declarative hash syntax, so there's very little explicit coding involved - at the cost of making things pretty verbose, and not as elegant obviously ...
Hooray wrote:Regarding the animation logic that you have created for the RBAR EFIS, it would be great to see that moved to a standalone Nasal module so that it can be reused by other aircraft/instruments, without being aircraft specific - your code is much more generic than any existing Nasal/Canvas code we currently have for doing this, and it could help generalize and unify other Canvas-based MFDs.
Hooray wrote:I don't quite recall if that's even using Canvas or if it's sufficiently generic, I do remember that the 744 (by Gijs) does feature a Canvas-based PFD but last I checked, it was not yet sufficiently restructured to be easily integrated on other aircraft. You may want to get in touch with Hyde to learn more about the PFD used there. Overall, it would make sense to generalize Gijs' code - but Torsten's recent RBAR/PFD code is much more generic, but not yet aircraft-agnostic either ...
{
id:'planArcs',
impl: {
init: func(nd,symbol) {},
predicate: func(nd) { nd.in_mode('toggle_display_mode', ['PLAN']) },
is_true: func(nd) { nd.symbols.planArcs.show() },
is_false: func(nd) { nd.symbols.planArcs.hide() },
},
},
Users browsing this forum: No registered users and 2 guests