• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

SimIn C Gauge - FDE Dynamic Tables

fs1

Messages
301
Country
brazil
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

  • SimInCGauge_x32.zip
    84.8 KB · Views: 272
  • SimInCGauge_x64.zip
    266.3 KB · Views: 287
Last edited:
Messages
69
Country
portugal
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 :)
 
Messages
2,077
Country
us-ohio
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.
 

fs1

Messages
301
Country
brazil
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
 
Messages
2,077
Country
us-ohio
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.
 

fs1

Messages
301
Country
brazil
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.
 
Messages
284
Country
us-newyork
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)
 

fs1

Messages
301
Country
brazil
This is for P3D only. We were thinking of porting back to FSX, but we have all these new platforms coming as well.
 
Messages
31
Country
spain
OK thx let me try and provide feedback with the V4.5 that is my actual sim... another simply cuestion... is clear explained how to set a new value on he previous thread
but how to read a value with xml?... Is this correct for saving a value on a Local variable?
XML:
C:SimInCGauge:CL_FLAPS_BASE (>L:Flap CL, number)
for saving a value on a Local variable.
 
Top