User Tools

Site Tools


Sidebar

yaacars:yaacars-loadmanager.lua

Introduction

There's now a basic LoadManager LUA Script for FlyWithLua, that will be able to set fuel and payload when the flight is started.

Installation and setup

  • Install FlyWithLua
  • Download the script from here
  • Extract the script to the FlyWithLua “scripts” folder
  • open yaacars_loadManager.lua for editing (using a programmer's text editor, like Notepad++)
  • Find “gYaacarsPath”, copy the line and enter the path to yaacars on your system.\\The first definition are working for me and can be safely deleted or commented out (by adding a leading –).
  • You can add your own plane definitions by adding additional lines, like planeMatch['Piper PA-31-350 Navajo Chieftain'] = “PA31”

How it works

When the numbers for fuel are entered, the lua file is updated …

For Version 1.0: Now, reload the lua script file, yaacars_loadManager.lua is relaoded and executed once …

For Version 1.1: Apply the fuel and payload values, by executing the lua script from the menu:

You can also check the output of the script in X-Plane's log.txt

log.txt
YAACARS-LM: tracking: 0
YAACARS-LM: plane:    Cessna Citation II
YAACARS-LM: fuel:     1865
YAACARS-LM: payload:  1399
YAACARS-LM: tracking not running, looking up for the plane icao ...
YAACARS-LM: plane match found ... loading now ...
YAACARS-LM: Your plane is now loaded with 1865 kilograms of fuel and 1399 kilograms of cargo! Have a safe flight!
YAACARS-LM: all done! Have an ice day!

After the script ran by reloading, YAACARS should show the correct values for fuel and payload.

If not, your plane is proabably not compatible, e.g. uses it's own Load and Balance Manager, etc …

Feedback is always welcome!

yaacars/yaacars-loadmanager.lua.txt · Last modified: 2020/01/11 21:15 (external edit)