SimIn C Gauge - FDE Dynamic Tables

We have compiled from the source code a C Gauge to sync with a XML gauge code to change AIR parameters on the fly.

This is the list of C variables available by the gauge for read and write via XML code:

C:SimInCGauge:CFG_STATIC_THRUST
C:SimInCGauge:CFG_INLET_AREA
C:SimInCGauge:CFG_FUEL_FLOW_GAIN
C:SimInCGauge:CLQ_BASE
C:SimInCGauge:CL_DELTAE_BASE
C:SimInCGauge:CL_ADOT_BASE
C:SimInCGauge:CL_IH_BASE
C:SimInCGauge:CL_FLAPS_BASE
C:SimInCGauge:CL_SPOILERS_BASE
C:SimInCGauge:CD0_BASE
C:SimInCGauge:CD_FLAPS_BASE
C:SimInCGauge:CD_GEAR_BASE
C:SimInCGauge:CD_SPOILER_BASE
C:SimInCGauge:CM_DELTAE_BASE
C:SimInCGauge:CM_DELTA_TRIM_BASE
C:SimInCGauge:CMQ_BASE
C:SimInCGauge:CM0_BASE
C:SimInCGauge:CM_ADOT_BASE
C:SimInCGauge:CM_IH_BASE
C:SimInCGauge:CM_FLAPS_BASE
C:SimInCGauge:CM_GEAR_BASE
C:SimInCGauge:CM_SPOILERS_BASE
C:SimInCGauge:CMDE_PROPWASH_BASE
C:SimInCGauge:CMQ_PROPWASH_BASE
C:SimInCGauge:CMDE_DTRIM
C:SimInCGauge:CL_DELTAA_BASE
C:SimInCGauge:CLP_BASE
C:SimInCGauge:CLR_BASE
C:SimInCGauge:CL_DELTAR_BASE
C:SimInCGauge:CL_BETA_BASE
C:SimInCGauge:CL_SPOILER_BASE
C:SimInCGauge:CL_DELTA_AILERTRIM
C:SimInCGauge:CNP_BASE
C:SimInCGauge:CN_BETA_BASE
C:SimInCGauge:CN_DELTAR_BASE
C:SimInCGauge:CN_DELTAA_BASE
C:SimInCGauge:CNR_BASE
C:SimInCGauge:CNDR_PROPWASH_BASE
C:SimInCGauge:CNR_PROPWASH_BASE
C:SimInCGauge:CN_DELTA_RUDTRIM
C:SimInCGauge:CYP_BASE
C:SimInCGauge:CYR_BASE
C:SimInCGauge:CY_DELTAR_BASE
C:SimInCGauge:CY_BETA_BASE
C:SimInCGauge:M_FSTALLANGLEOFATTACK
C:SimInCGauge:M_FLINEARCLALPHA
C:SimInCGauge:M_FZEROLIFTALPHA
C:SimInCGauge:M_LONGITUDINALAEROCENTERLIFT
C:SimInCGauge:M_LONGITUDINALAEROCENTERSIDE
C:SimInCGauge:AIR_GROUND_EFFECT
C:SimInCGauge:AIR_CL_MACH
C:SimInCGauge:AIR_CL_DELTAE
C:SimInCGauge:AIR_CL_ADOT
C:SimInCGauge:AIR_CL_Q
C:SimInCGauge:AIR_CL_IH
C:SimInCGauge:AIR_10XPACK_CD0_MACH
C:SimInCGauge:AIR_CY_BETA
C:SimInCGauge:AIR_CY_DELTAR
C:SimInCGauge:AIR_CY_R
C:SimInCGauge:AIR_CY_P
C:SimInCGauge:AIR_CM_DELTAE
C:SimInCGauge:AIR_CM_ADOT
C:SimInCGauge:AIR_CM_Q
C:SimInCGauge:AIR_CM_IH
C:SimInCGauge:AIR_CMO
C:SimInCGauge:AIR_CL_BETA
C:SimInCGauge:AIR_CL_DELTAR
C:SimInCGauge:AIR_CL_DELTAA
C:SimInCGauge:AIR_CL_R
C:SimInCGauge:AIR_CL_P
C:SimInCGauge:AIR_CN_BETA
C:SimInCGauge:AIR_CN_DELTAR
C:SimInCGauge:AIR_CN_DELTAA
C:SimInCGauge:AIR_CN_R
C:SimInCGauge:AIR_CN_P
C:SimInCGauge:AIR_70S_CN_ALPHA_YAW
C:SimInCGauge:AIR_70S_Cl_ALPHA_ROLL
C:SimInCGauge:AIR_ALPHA_ON_CL_BETA
C:SimInCGauge:AIR_ALPHA_ON_CLP
C:SimInCGauge:AIR_ALPHA_ON_CN_BETA
C:SimInCGauge:AIR_ALPHA_ON_CNR
C:SimInCGauge:AIR_70S_ALPHA_ON_CNDR
C:SimInCGauge:AIR_70S_ALPHA_ON_CLDA
C:SimInCGauge:AIR_61S_ALPHA_ON_CMDE
C:SimInCGauge:AIR_61S_ALPHA_ON_CMIH
C:SimInCGauge:AIR_61S_ALPHA_ON_CMADOT
C:SimInCGauge:AIR_61S_ALPHA_ON_CMQ
C:SimInCGauge:AIR_61S_AILERON_LOAD_FACTOR_EFF
C:SimInCGauge:AIR_ELEVATOR_SCALING
C:SimInCGauge:AIR_AILERON_SCALING
C:SimInCGauge:AIR_RUDDER_SCALING
C:SimInCGauge:AIR_CL_ALPHA
C:SimInCGauge:AIR_CM_ALPHA
C:SimInCGauge:AIR_70_N2_TO_N1_TABLE
C:SimInCGauge:AIR_70_MACH_0_CORRECTED_COMMANDED_N2
C:SimInCGauge:AIR_70_MACH_HI_CORRECTED_COMMANDED_N2
C:SimInCGauge:AIR_70_CORRECTED_N2_FROM_FF
C:SimInCGauge:AIR_70_N1_AND_MACH_ON_THRUST
C:SimInCGauge:AIR_70_CORRECTED_AIRFLOW
C:SimInCGauge:AIR_70_AFTERBURNER_ON_THRUST_TABLE
C:SimInCGauge:AIR_70_N1_TO_SHAFT_TORQUE
C:SimInCGauge:AIR_80_DENSITY_ON_TP_TORQUE
C:SimInCGauge:AIR_61S_ELEVATOR_ELASTICITY
C:SimInCGauge:AIR_61S_AILERON_ELASTICITY
C:SimInCGauge:AIR_61S_RUDDER_ELASTICITY
C:SimInCGauge:AIR_70_ELEVATOR_TRIM_ELASTICITY
C:SimInCGauge:AIR_61S_ENG_MECHANICAL_EFFICIENCY
C:SimInCGauge:AIR_61S_ENGINE_FRICTION
C:SimInCGauge:AIR_61S_PROP_EFFICIENCY
C:SimInCGauge:AIR_61S_PROP_PWR_CF
C:SimInCGauge:FDE_ROW_INDEX
C:SimInCGauge:FDE_COL_INDEX
C:SimInCGauge:RELOAD

For example, you can set a FDE scalar directly via the following code:

1.20 (>C:SimInCGauge:CLQ_BASE)

or to access tables, you need to first set the C:SimInCGauge:FDE_ROW_INDEX and C:SimInCGauge:FDE_COL_INDEX, and then access the table element you want:

3 (>C:SimInCGauge:FDE_ROW_INDEX) 2 (>C:SimInCGauge:FDE_COL_INDEX) 2.43 (>C:SimInCGauge:AIR_70_N2_TO_N1_TABLE)

Here you will set element in row 3, column 2 from the AIR_70_N2_TO_N1_TABLE table to 2.43

Tables start at index 0, 0

There is a C Var called C:SimInCGauge:RELOAD, which needs to be set to 1 if you reload your Aircraft. This way you assure the FDE AIR parameters are remapped with the new reloaded aircraft:

1 (>C:SimInCGauge:RELOAD)

x64: To install, just include the dll.xml file in your %ProgramData%\Lockheed Martin\Prepar3D v4 folder and the DLL in the Prepar3D root.
x86: To install, just include the dll.xml file in your %AppData%\Lockheed Martin\Prepar3D v3 folder and the DLL in the Prepar3D root. No FSX-SE support until now

Let us know your feedback.

Thanks!
 

Attachments

Last edited:
Brilliant! Although I'm far from being at the level of restarting to work with gauges and XML / C programming right now.

But I'll save it here just to make sure I can use it in the future. This is really a step fwd from where I left it some 10 yrs ago :)
 
Just a note... L-M wants developers to stop putting files inside the core sim folders... might want to keep that in mind when developing.
 
Just a note... L-M wants developers to stop putting files inside the core sim folders... might want to keep that in mind when developing.
Hi Ed. What are you referring to? The folder where the DLL is placed?
Thanks


Sent from my iPhone using Tapatalk
 
Yep. If you have a need for any file to be in any of the sim folders, those that get created by the sim during installation... you need to find a way to eliminate that need. They're really pushing for developers to stop installing their addons inside the core sim's folders.

I'm still working on this issue myself.
 
Yep. If you have a need for any file to be in any of the sim folders, those that get created by the sim during installation... you need to find a way to eliminate that need. They're really pushing for developers to stop installing their addons inside the core sim's folders.

I'm still working on this issue myself.
Ok thanks, I will make this changes.
 
FYI, can also add to the dll.xml and install to any path outside of the sim, as described in our help doc (siminsdk.chm)
 
Top