Canvas MFD framework: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (http://forum.flightgear.org/viewtopic.php?p=193020#p193020)
(http://forum.flightgear.org/viewtopic.php?p=195694#p195694)
Line 20: Line 20:


== Background ==
== Background ==
Meanwhile, I would prefer coming up with a real MFD framework that manages different displays/screens and image sources.
That should then also help with PFD/ND/CDU and EICAS/EFIS stuff.
Philosopher's MapStructure framework has been specifically designed to support the notion of controllers for these things, so need to add any heavy hacks to the code - we should better work together and ensure that MapStructure ends up in fgdata soon enough ...
Gijs already started working on a MFD creation framework for the 744, and as previously mentioned, certain features are going to be identical - regardless of aircraft, i.e. bizjet, boeing, airbus etc - most MFDs will have knobs to adjust brightness or change video sources - so I'd rather keep the general design in mind here, and not implement such things specifically for a certain aircraft. Ultimately, it really just boils down to mapping a few properties to the corresponding canvas properties.
Gijs already started working on a MFD creation framework for the 744, and as previously mentioned, certain features are going to be identical - regardless of aircraft, i.e. bizjet, boeing, airbus etc - most MFDs will have knobs to adjust brightness or change video sources - so I'd rather keep the general design in mind here, and not implement such things specifically for a certain aircraft. Ultimately, it really just boils down to mapping a few properties to the corresponding canvas properties.



Revision as of 05:43, 2 February 2014

Canvas MFD Framework
777-display-selector.png
Started in 02/2014
Description MFD Framework
Maintainer(s) F-JYL, 5H1N0B1, Hooray
Contributor(s) F-JYL (since 02/2014),
Status Under active development as of 02/2014
Subforum http://forum.flightgear.org/viewforum.php?f=71


This article is a stub. You can help the wiki by expanding it.


Background

Meanwhile, I would prefer coming up with a real MFD framework that manages different displays/screens and image sources.

That should then also help with PFD/ND/CDU and EICAS/EFIS stuff.

Philosopher's MapStructure framework has been specifically designed to support the notion of controllers for these things, so need to add any heavy hacks to the code - we should better work together and ensure that MapStructure ends up in fgdata soon enough ... Gijs already started working on a MFD creation framework for the 744, and as previously mentioned, certain features are going to be identical - regardless of aircraft, i.e. bizjet, boeing, airbus etc - most MFDs will have knobs to adjust brightness or change video sources - so I'd rather keep the general design in mind here, and not implement such things specifically for a certain aircraft. Ultimately, it really just boils down to mapping a few properties to the corresponding canvas properties.


Cquote1.png I also need a better way to switch pages on the lower EICAS. Right now I delete/re-create the Canvas with this code. It doesn't work well though; at times no page is loaded at all. Of course I cannot delete a Canvas when I have it displayed in a dialog, so this method is probably doomed... [1]
— Gijs
Cquote2.png


Cquote1.png I'm also doing some work on my C-130J cockpit and therefore have got nearly the same problems^^ There are currently five screens with a lot of pages which can be freely placed on any of the screens. I'm not yet sure on how to setup this system in detail. If displays/windows/etc. show exactly the same thing they should also use the same canvas. One approach would be to use a canvas for each page and add one ore more placements to it depending on where it should be displayed.

Another approach would be to use a canvas for each screen and either reload each page on switching or after loading once hide the according group. A completely different approach (which probably also will require some core changes) is to allow moving groups between different canvasses and also just to a storage location to move pages around as needed.

[2]
— TheTom
Cquote2.png


Cquote1.png It would probably be a good idea to look at existing airliners in FG, such as the 744, 777 and then come up with a simple Nasal-space framework to manage image sources and screens, so that a screen selector would ideally only manage placements, while supporting different MFDs for each pilot - analogous to how A661 has the concept of an image generator (IG) and a cockpit display system (CDS).

For most modern jets it would make sense to introduce some intermediate layer that wraps the main canvas system, so that different displays (PFD, ND, EICAS, M/CDU etc) can be conveniently managed.

Basically, we only need to add a handful of Nasal wrapper classes that provide the building blocks for any kind of EFIS, i.e. generic components such as:

cockpit developers would then ideally use existing components or add new ones as required, for different types of EFIS (777, 747, A320, A380).

PFD/ND and EICAS/ECAM or MCDUs would be built on top of these.[3]
— Hooray
Cquote2.png
  1. Gijs (Sun Oct 13, 2013 9:04 am). The making of the Queen.
  2. TheTom (Mon Oct 14, 2013 5:02 am). The making of the Queen.
  3. Hooray (Mon Oct 14, 2013 5:02 am). The making of the Queen.

Design

  • Screen
  • Image Source
  • Switch/Selector
  • Placement Manager
# wrapper for a cockpit placement
var Screen = {
};

# wrapper for any Nasal class managing a canvas
var ImageSource = {
};

var SourceSelector = {
};