FG1000: Difference between revisions

158 bytes removed ,  26 June 2020
Line 186: Line 186:
=== Create an EIS Display ===
=== Create an EIS Display ===


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.


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  
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  
Line 194: Line 194:
# Edit the SVG and EIS-[aircraft].nas as appropriate.  In particular note that the Fuel submenu is used to set the contents of the fuel tanks manually, with a fuel totalizer approach.
# Edit the SVG and EIS-[aircraft].nas as appropriate.  In particular note that the Fuel submenu is used to set the contents of the fuel tanks manually, with a fuel totalizer approach.
# 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/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.
# As noted above, you will need to load a modified version of GenericInterfaceController.nas
# 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.
# 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.


Line 200: Line 200:


<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
# 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(aircraft_dir ~ '/Nasal/EIS/EIS-J3Cub.nas', "fg1000");
io.load_nasal('EIS.nas', "eis");
io.load_nasal(aircraft_dir ~ '/Nasal/EIS/EISController.nas', "fg1000");
io.load_nasal('EISController.nas', "eis");
io.load_nasal(aircraft_dir ~ '/Nasal/EIS/EISStyles.nas', "fg1000");
io.load_nasal('EISStyles.nas', "eis");
io.load_nasal(aircraft_dir ~ '/Nasal/EIS/EISOptions.nas', "fg1000");
io.load_nasal('EISOptions.nas', "eis");
var EIS_Class = eis.EIS;


# Create the FG1000 using custom EIS
# This is the class in EIS-J3Cub.nas, loaded above.
var fg1000system = fg1000.FG1000.getOrCreateInstance(EIS_Class:EIS_Class, EIS_SVG:"Nasal/EIS.svg");
var EIS_Class = fg1000.EISJ3Cub;
 
# Create the FG1000 using custom EIS Class, and the appropriate .svg file.
var fg1000system = fg1000.FG1000.getOrCreateInstance(EIS_Class:EIS_Class, EIS_SVG: "Nasal/EIS/EIS-J3Cub.svg");
</syntaxhighlight>
</syntaxhighlight>