Welcome to Cockpitbuilders.com. Please login or sign up.

March 28, 2024, 01:18:03 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
112 Guests, 0 Users
Members
Stats
  • Total Posts: 59,639
  • Total Topics: 7,853
  • Online today: 142
  • Online ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 112
Total: 112

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

LUA access to FSUIPC offsets versus P3D AVars

Started by navymustang, May 27, 2020, 05:04:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

navymustang

OK, I'm new to LUA. What is the difference between accessing the FSUIPC offset 0B54 (APU RPM) versus reading the AVar "APU PCT RPM" ?
Am I always guaranteed to get the same result? Are they both always maintained by P3D?
That is:
 something = ipc.readDBL(0x0B54)
or
 something = varget("A:APU PCT RPM")
My 737-800 full-scale cockpit has been sold. Now onto my full-size military helicopter project. An AOPA member and LifeTime member of National Association of Flight Instructors. Please note that I am a self-employed professional cockpit builder that provides consulting to defense contractors and civilian schools and airlines.

Trevor Hale

Quote from: navymustang on May 27, 2020, 05:04:44 PMOK, I'm new to LUA. What is the difference between accessing the FSUIPC offset 0B54 (APU RPM) versus reading the AVar "APU PCT RPM" ?
Am I always guaranteed to get the same result? Are they both always maintained by P3D?
That is:
 something = ipc.readDBL(0x0B54)
or
 something = varget("A:APU PCT RPM")
FSUIPC variables are Generic and work on aircraft that use the built in generic flight sim sim connect facility. 

lvars or Lua variables are specific to aircraft for internal systems. Ie PMDG don't use generic sim connect stuff but have their own coded LVARS that interact with their own coded systems. 

hope that clears the differences up. 

Trev
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

navymustang

mmm, not quite. I wan't using LVARs in this example, just the same two references to what seems to be an FSUIPC variable and a P3D variable ("A:"). Are they referring to the same exact data? Can I use either one or is one more preferred?

Thanks
My 737-800 full-scale cockpit has been sold. Now onto my full-size military helicopter project. An AOPA member and LifeTime member of National Association of Flight Instructors. Please note that I am a self-employed professional cockpit builder that provides consulting to defense contractors and civilian schools and airlines.

Trevor Hale

Maybe if you could give me an example. 

For instance: The P3D (simconnect) variable for flaps and landing gear will be the same FSUIPC offset for flaps and gear. 

The FSUIPC Offset or P3D Simconnect variable for Cockpit lighting will be the same however an aircraft may not listen to that to turn on its cockpit light and may need to be turned on through its own specific LVAR. 

Does that make more sense?

Trev
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

navymustang

Yes, it was what I though, you simply can't depend on it. So just test test test until you prove what variables are being used. 
My 737-800 full-scale cockpit has been sold. Now onto my full-size military helicopter project. An AOPA member and LifeTime member of National Association of Flight Instructors. Please note that I am a self-employed professional cockpit builder that provides consulting to defense contractors and civilian schools and airlines.

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate