FGUK1000.nas 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # moving map using FG1000
  2. var disablefg1000 = getprop("sim/disable-fg1000") or 0;
  3. if (!disablefg1000) {
  4. var nasal_dir = getprop("/sim/fg-root") ~ "/Aircraft/Instruments-3d/FG1000/Nasal/";
  5. io.load_nasal(nasal_dir ~ 'FG1000.nas', "fg1000");
  6. # Create the FG1000
  7. var fg1000system = fg1000.FG1000.getOrCreateInstance();
  8. # use in Garmin GNS430 (Screen1,Screen4) and the Helionix DMAP (Screen4)
  9. # Create a MFD as device 1 for the Garmin GNS430-1
  10. fg1000system.addMFD(1);
  11. # Map the devices to placement objects Screen{i}, in this case 'Screen1'
  12. fg1000system.display(1);
  13. # Show the device
  14. fg1000system.show(1);
  15. # if you intend to use a second GNS430 for COMM2/NAV2 uncomment the following code
  16. #
  17. #
  18. # Create a MFD as device 2 for the Garmin GNS430-2
  19. fg1000system.addMFD(2);
  20. # Map the devices to placement objects Screen{i}, in this case 'Screen1'
  21. fg1000system.display(2);
  22. # Show the device
  23. fg1000system.show(2);
  24. var aircraft = getprop("sim/aircraft");
  25. if (aircraft=="h145m") {
  26. # Create a MFD as device 4 for the Helionix MAPD on H145M
  27. fg1000system.addMFD(4);
  28. fg1000system.display(4);
  29. fg1000system.show(4);
  30. }
  31. var nasal_dir = getprop("/sim/fg-root") ~ "/Aircraft/Instruments-3d/FG1000/Nasal/";
  32. io.load_nasal(nasal_dir ~ 'Interfaces/GenericInterfaceController.nas', "fg1000");
  33. var interfaceController = fg1000.GenericInterfaceController.getOrCreateInstance();
  34. interfaceController.start();
  35. };