• 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.

P3D v4 A few questions about 3D virtual cockpit

Messages
122
Country
russia
I see in simulation variables: ELECTRIC GPU ACTIVE and ELECTRIC GPU SWITCH, in eventID saw: KEY_ELECTRIC_GPU_SWITCH_TOGGLE and KEY_ELECTRIC_GPU_SWITCH_SET, also in sim control can make a key for ground power unit on/off. I was made a botton for gpu on/off in VC, and I think it's worked. Because when engine shutting down, generator off, parking brake set and battery on, switching on gpu and avionics not shutting down a long time. Is that's mean the battery is not discharged?
And I gave a few questions.
First: I was made a gpu botton with variable electric_gpu_switch and event is gpu_switch_toggle - I thought it is correct? This botton must on or off ground power to the aircraft. Also I was try make a switch (in VC) for connect/disconnect gpu from aircraft. I take variables gpu_active and event gpu_switch_set. But this botton not working correctly. When sim on ground, parking brake set, generators off, battery on - I can't on (connect) gpu by this botton. But if I switch on gpu button this botton also switching on. Is that's mean this two variables is the same? How to fix it?
Second question: If I need only mouse click or, for example, light announciator without animation do I need to add guid, animation length to modeldef.xml?
 
In answer to your second question, no. Neither <Visibility> or <MouseRect> require a <Animation... GUID, anim length, etc./> entry.
 
If it possible to make a few battery? I have a 5 in airplane, for each is turned on separately. If add a <copy> all battery will be turned on from any switch?
 
Guys, what I need to add to VC for engine start? I have a general engine starter. When turn it on, a turbine starting rotate, but stopped about 30% N2. Need fuel valve open? Or add combustion or ignition? What variable? Thanks.
 
Oddly enough, yes. All engines require that the mixtures be controlled.
 
How to add button click sound to the VC? If it possible without use c++ or Doug xml? I have a many L vars and visibility in 3d buttons. Any chance to add sound by xml in modeldef.xml for each click, for example?
P.s. I really don't understand how to make it via Doug gauge.
Thanks.
 
Thank you, Heretic!
Next will be a fee questions about fuel system, if it's not difficult for you to answer.
First - how many maximum fuel pumps in sdk? Like in config, only 4? In my airplane 9 tanks (1, 3, 5r and 5ra in right wing, 2, 4, 5l, 5la in the left and 6 is center) and 8 fuel pumps (in tanks 1-4 by 2). It possible to add by xml. Or need c++ programming?
Second - maybe anybody write gauge for fuel burn? I need a special sequence to burning fuel in tanks.
 
Last edited:
Fuel valve - 1 per engine
Fuel pump - 1 per tank
Fuel sequence (default) - External -> tip -> aux -> main -> center

Ok. Will make a 4 pumps.
I know about default burn fuel sequence. I try to change tanks for it gives me an expense approximate to the real. But results are not accurate. Now my center tank is external for burned first, then tip and aux and main. But I need special conditions.
First expended tank no 6 (it is center offcourse)
Then tanks 1, 2, 3 and 4 (main wings, whose closer to center) until left in it by 5000 liters (in each).
Then tanks 5 left and 5 right until left in it by 700 liters.
Then 5a left and 5a right (tanks in the end of wings)
Then final 5 left and 5 right (1400 liters)
And finish 20000 liters from tanks 1-4.
How to make it? Need a gauge with xml code? I'm a newbie in xml, unfortunately.
Screenshot_20180327-160239.png
 
Last edited:
Yes, you will need a gauge, but if you're new to XML and it's hard for you to understand English in the first place, you should try to find help in a flightsim forum in your native language. From the screenshot, I assume that you're russian, so you could try to ask in the forums on Avsim.su to see if anyone with XML experience can help you out when thjings are getting too hard to understand here.


I can only help you with part of the code. You will have to do the rest.
This is untested and only for the left side! For the fuel selectors on the right side, you can use a copy of the code with the tank names and numbers changed accodingly.

In the aircraft.cfg:
Tank 6 = Center1
Tank 1,2 = LeftMain
Tank 5 = Left Aux
Tank 5a Left = Left Tip

Assuming four engines and four fuel selectors, the fuel selector logic would be:
Code:
(A:FUEL TANK CENTER QUANTITY, liters) 20 &gt;
if{ (A:FUEL TANK SELECTOR:1,enum) 6 != if{ 6 (>K:FUEL_SELECTOR_SET) }
     (A:FUEL TANK SELECTOR:2,enum) 6 != if{ 6 (>K:FUEL_SELECTOR_2_SET) } }
els{  (A:FUEL TANK LEFT MAIN QUANTITY, liters) 10000 &gt;
        if{ (A:FUEL TANK SELECTOR:1,enum) 2 != if{ 2 (>K:FUEL_SELECTOR_SET) }
             (A:FUEL TANK SELECTOR:2,enum) 2 != if{ 2 (>K:FUEL_SELECTOR_2_SET) } }
        els{ (A:FUEL TANK LEFT AUX QUANTITY, liters) 700 &gt;
               if{ (A:FUEL TANK SELECTOR:1,enum) 4 != if{ 4 (>K:FUEL_SELECTOR_SET) }
                    (A:FUEL TANK SELECTOR:2,enum) 4 != if{ 4 (>K:FUEL_SELECTOR_2_SET) } }
               els{ (A:FUEL TANK LEFT TIP QUANTITY, liters) 5 &gt;
                      if{ (A:FUEL TANK SELECTOR:1,enum) 12 != if{ 12 (>K:FUEL_SELECTOR_SET) }
                           (A:FUEL TANK SELECTOR:2,enum) 12 != if{ 12 (>K:FUEL_SELECTOR_2_SET) } }
                      els{ (A:FUEL TANK LEFT AUX QUANTITY, liters) 15 &gt;
                             if{ (A:FUEL TANK SELECTOR:1,enum) 4 != if{ 4 (>K:FUEL_SELECTOR_SET) }
                                  (A:FUEL TANK SELECTOR:2,enum) 4 != if{ 4 (>K:FUEL_SELECTOR_2_SET) } }
                             els{ (A:FUEL TANK SELECTOR:1,enum) 2 != if{ 2 (>K:FUEL_SELECTOR_SET) }
                                    (A:FUEL TANK SELECTOR:2,enum) 2 != if{ 2 (>K:FUEL_SELECTOR_2_SET) } } } } } }

You start with a check for more than 20 liters in the center tank.
If yes, check if fuel selectors 1 and 2 are set to center and if they are not, set them
If no, check for more than 10000 liters in the left main tank
- If yes, check if fuel selectors 1 and 2 are set to left main and if they are not, set them
- If no, check for more than 700 liters in the left aux tank
-- If yes, check if fuel selectors 1 and 2 are set to left aux and if they are not, set them
-- If no, check for more than 5 liters in in the tip tank
--- If yes, check if fuel selectors 1 and 2 are set to left tip and if they are not, set them
---- If no, check for more than 15 liters in the left aux tank
----- If yes, check if fuel selectors 1 and 2 are set to left aux and if they are not, set them
----- If no, check if fuel selectors 1 and 2 are set to left main and if they are not, set them

The 20, 5 and 15 liters for the center, left tip and left aux tanks should correspond to the value for unusable fuel defined for the fuel tank in the aircraft.cfg.


Note that this is automatic and will not be influenced by the fuel pump status!
On the real aircraft, fuel pumps have control over the selected tank. Implementing this would make the code much more complex.

Hope this works and is understandable.
 
Last edited:
Heretic, thank you very much!!! I need a read it few times for understand logic:-) I'll try to use it. Tnaks again! This part of code will help me for understood xml. I like self-education, but I need a examples.

p.s. Yep, I'm from Russia. I have to look for information in english speeking forums, because in avsim.su are no people left who can help.(
 
Ah, that's too bad. The guys from SCS or ProTu were pretty good with code.

What aircraft are you working on? IL-96?
 
Ah, that's too bad. The guys from SCS or ProTu were pretty good with code.

What aircraft are you working on? IL-96?

You're right! But many people I knew, and who knew the XML code (etc), no longer attend the forum.

Yes, correct! It's a Ilyushin IL96.2018-3-24_23-33-46-825.jpg2018-3-24_23-36-50-456.jpg
 
Back
Top