Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi! I'm just wondering if it is possible to make an LUA to display both thrust and N1 percentage, so I can calculate N1s for default/freeware aircraft at different altitudes and temperatures, as well as tweak air files. I'm working on a project to overhaul the default aircraft, providing more concise performance data in the kneeboard, starting with the 737. Hopefully I can use this data to make a gauge to automatically calculate and set N1 for takeoff and climb. 

Posted

Hi,

of course. Check the examples for display and read Offsets in FSUIPC Documents sub folder. The values in the Offsets for those you are interested in are max 16383, so 100/16383*value will give you percentage.

Thomas

Posted

OK so I've found the the following values;

2000 size=8 Turbine engine 1 N1 value (%) as a double (float64). (2010 size=8 Turbine engine 1 corrected N1 value??? What's the difference??? )

204C size=8 Turbine engine 1 jet thrust in pounds, as a double (float64).

2060 size=8 Turbine engine 1 fuel flow (pph) 

How do I enter these parameters into a window with a fast update of maybe 250ms?

Posted

Hi,

Quote

TURB ENG N1:index

TURB ENG N2:index

TURB ENG CORRECTED N1:index

TURB ENG CORRECTED N2:index

The vale as 'corrected' comes from P3D's SDK, before also from FSX's SDK, and is not father described. FSUIPC delivers those values to be complete. By checking those corrected values you will find that they are corrected against temp and pressure.

Quote

How do I enter these parameters into a window with a fast update of maybe 250ms?

Check the Lua examples in ..\FSUIPC Documents\ folder, the example MyDisplay.lua you can easily modify to your needs. It calls the display function every 1000ms (1sec).

Thomas

Posted

Right ok so I'm editing a copy of MyDisplay and this is what I've got so far. I've read that Float64s should be used with ipc.readDBL. I'm not sure if I still need the math.floors though.

Quote

 

-- Create the display window for 8 values, position x=800, y=400
h = display.create("Jason Fayre Display", 8, 800, 400)

-- Update the display at 100 msec intervals (see event at end)
function mytimer(time)

    -- display 1 = N1 Percent
    N1 Percent = math.floor(ipc.readDBL(0x2000)
    display.show(h, 1, "N1" .. N1 .. " Percent")
   
    -- display 2 = N1 Percent Adjusted
    N1 Percent Adjusted = math.floor(ipc.readDBL(0x2010)
    display.show(h, 2, "N1 Percent Adjusted" .. N1 .. " Percent")
   
    -- display 3 = Thrust per engine
    Thrust = math.floor(ipc.readDBL(0x204C)
    display.show(h, 3, "Thrust" .. Thrust .. " lbs")
   
end

-- Adjust timing to taste: 100 = 0.1 second
event.timer(100, "mytimer")

 


 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.