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

March 01, 2021, 07:46:37 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
26 Guests, 2 Users
Members
Stats
  • Total Posts: 56778
  • Total Topics: 7558
  • Online Today: 38
  • Online Ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 2
Guests: 26
Total: 28

COUNTDOWN TO WF2021


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 is complete and been put in storage (for sale). Now onto my full-size 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 is complete and been put in storage (for sale). Now onto my full-size 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 is complete and been put in storage (for sale). Now onto my full-size 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