FG1000: Difference between revisions

1,556 bytes added ,  1 January 2019
(Make example more obvious)
Line 119: Line 119:
This is the Engine Information System and displays on the left side of the MFD.
This is the Engine Information System and displays on the left side of the MFD.


There is a generic EIS provided
A simply EIS for the Cessna 182T is provided.  For other aircraft you will need to create your own. The simplest way to do this is
(see FG1000/Nasal/EIS, and FG1000/MFDPages/EIS.svg) that is intended to match
a Cessna 172If you need something different, you should create your own
EIS class and SVG file.


Note that you need to pass data to/from the engine using Emesary. See
# Copy Aircraft/Instruments-3d/FG1000/EIS into your aircraft Nasal directory.  Re-name EIS-c182t.nas to something sensible (e.g. EIS-[aircraft].nas).  Don't forget to rename the class itself!
Interfaces/GenericEISPublisher.nas for a reference implementation.
# Copy one of the EIS .svg files from Aircraft/Instruments-3d/FG1000/MFDPages into your aircraft Nasal.  Modify it as required, noting the names of objects and how they map to the EIS.nas file.
# Copy Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericEISPublisher.nas into your Nasal directory, and rename it (e.g. [aircraft]EISPublisher.nas.  Don't forget to rename the class itself! Modify it to publish the correct set of properties to Emesary.  Note that for multiple engine aircraft you need to modify the publish() method.
# Copy Aircraft/Instruments-3d/FG1000/Nasal/Interfaces/GenericInterfaceController.nas into your Nasal directory, and rename it (e.g. [aircraft]InterfaceController.nas).  Modify it to refer to your new [aircraft]EISPublisher.
# Finally, modify whatever Nasal you use to load the FG1000 to pass in the new EIS class and SVG file.  Note that you need to load the EIS Controller, style and Options classes as well.
 
This is what your Nasal file may look like at the end:
 
<nowiki>
# Load custom Interface controller, which will refer to the EISPublisher.
io.load_nasal('AircraftInterfaceController.nas');
var interfaceController = AircraftInterfaceController.getOrCreateInstance();
interfaceController.start();
 
# Load the custom EIS display
io.load_nasal(EIS.nas', "eis");
io.load_nasal(EISController.nas', "eis");
io.load_nasal(EISStyles.nas', "eis");
io.load_nasal(EISOptions.nas', "eis");
var EIS_Class = eis.EIS;
 
# Create the FG1000 using custom EIS
var fg1000system = fg1000.FG1000.getOrCreateInstance(EIS_Class, "Nasal/EIS.svg);
</nowiki>


=== Load and start the FG1000 system ===
=== Load and start the FG1000 system ===