1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XMLTOOLS for FSX and P3D updates

Discussion in 'Gauges' started by taguilo, 1 Mar 2016.

  1. Heretic

    Heretic Resource contributor

    Joined:
    1 Feb 2007
    Messages:
    5,422
    Country:
    germany
    Well, yes. I, however, interpreted Keke's question as something more general.
     
  2. Kekelekou

    Kekelekou

    Joined:
    1 Nov 2015
    Messages:
    74
    Country:
    france
    Yep, Heretic, I was looking for a way to control the engine RPM, so your suggestions could have been interesting too.
    Fuel flow has the main advantage of being hidden under FSX's hood, so no noticeable woobling. And it also makes rough running /fuel starvation controlable with one single variable.
     
  3. Heretic

    Heretic Resource contributor

    Joined:
    1 Feb 2007
    Messages:
    5,422
    Country:
    germany
    Note, that the fuel flow variable does not accept any value. Zero works for obvious reasons, but higher than that and it's trial&error time. 50 will have an effect, but upping this to 60 won't produce any different result.
     
    Last edited: 13 Oct 2017
  4. Kekelekou

    Kekelekou

    Joined:
    1 Nov 2015
    Messages:
    74
    Country:
    france
    Well, that's a bit of a bummer... I wanted to slave fuel flow to a RPM target (increase FF if below target, reduce it if above), but I am afraid I won't get the desired effect if FF can not set in a accurate enough way.
    I'll test and report anyway.
     
    Last edited: 14 Oct 2017
  5. Roy Holmes

    Roy Holmes Resource contributor

    Joined:
    20 Feb 2011
    Messages:
    1,332
    Country:
    us-virginia
    You need to be more specific about whether you are talking about turbine or recip engines. The engine simulation is not the same.

    For turbines, the eng fuel flow is not settable, for recip it is: RECIP ENG FUEL FLOW:index.

    For turbines engine RPM is indirectly settable. You would set CN2 TURB ENG CORRECTED N2:index and the RPM is governed by the aircraft.cfg as rated_N2_rpm. For recips it is not settable. RPM is varied by adjusting engine friction in the air file, adjusting with the friction scalars in the aircraft.cfg or using the engine controls.

    Aircraft_Sim_Tech_Zyskowski.pdf has a section describing how the two types of engine are simulated.
    Roy
     
  6. Kekelekou

    Kekelekou

    Joined:
    1 Nov 2015
    Messages:
    74
    Country:
    france
    I'm working on the BN-2 Islander, so the engine is the good ol' Lycoming O540. I am quite glad that fuel flow is settable for recip engines (insert huge sigh of relief here). Thanks Roy for your input!
     
  7. Heretic

    Heretic Resource contributor

    Joined:
    1 Feb 2007
    Messages:
    5,422
    Country:
    germany
    From the respective line in the SDK doc:

    TURB ENG CORRECTED FF:index Corrected fuel flow Pounds per hour Y -


    Tried, tested and confirmed. (It's just not accurate.)
     
  8. Roy Holmes

    Roy Holmes Resource contributor

    Joined:
    20 Feb 2011
    Messages:
    1,332
    Country:
    us-virginia
    The corrected FF is only accurate under ISA conditions at sea level. As you increase altitude it increases for example so it may do what you want but as you said it is not accurate.
    You can get from corrected fuel flow values to real fuel flow values by multiplying by delta2 which is atmospheric pressure ratio times (1+0.2*(M^2))^3.5 where M=Mach. Delta2 is also called total Air pressure ratio.
    Roy
     
  9. Heretic

    Heretic Resource contributor

    Joined:
    1 Feb 2007
    Messages:
    5,422
    Country:
    germany
    All I'm using corrected FF for is getting rid of that awful turboprop startup surge (and simulate a hung start when set to zero or a small value).
    It's the only way to do this when you don't have any possibility for masking startup surges or else in the engine gauge code itself.
    "Regular" fuel flow (after start) naturally has to be obtained the normal way (table 1506 * TSFC).
     
  10. Roy Holmes

    Roy Holmes Resource contributor

    Joined:
    20 Feb 2011
    Messages:
    1,332
    Country:
    us-virginia
    It is an interesting idea and glad it works. The turboprop engine in the sim does not have a TSFC mainly because its Thrust is insignificant and it uses power specific fuel consumption because brake power is the usual measure of power produced.
    The idea is somewhat similar to what 1505 supposedly does for a pure turbine.
    The turbine tables for a turboprop like 1503 and 1504 use CN1 for throttle position because CN2 is usually 100% at all times when running. However the fuel does go to the CN2 engine section, of course, so presumably the surge comes from CN1 instability since torque is a CN1 function. The turboprop air file has no 1502, because there is no direct link between CN1 and CN2, as well as having no 1505.
    I guess the question is then are you seeing a N2 surge or a N1 surge during start.
    Roy
     
  11. Heretic

    Heretic Resource contributor

    Joined:
    1 Feb 2007
    Messages:
    5,422
    Country:
    germany
    It's a N1 surge, but what's a mystery, is why it runs away in the first place and how it's affecting some aircraft but not others.
     
  12. Kekelekou

    Kekelekou

    Joined:
    1 Nov 2015
    Messages:
    74
    Country:
    france
    Well, I have just given a try at the fuel flow management through a C:SIMVARS, to no avail. :(

    The code reads as follows :

    Code:
    <Gauge Name="doorlockhorn" Version="1.2">
    <Update Frequency="18"/>
      <Element>
          <Select>
             <Value>
         
           0 (>C:SIMVARS:RECIP ENG FUEL FLOW:1, Pounds per hour)
           75 (>C:SIMVARS:Trailing Edge Flaps Left Percent, precent)
           (C:SIMVARS:RECIP ENG FUEL FLOW:1, Pounds per hour) (>L:Conso, number)
    
          </Value>
        </Select>
     </Element>
    </Gauge>
    
    XMLTools runs fine, since the left flap is set to 75% as expected.
    LINDA confirms that the value of L:Conso is 0.
    But the engine is still running as smoothly as if this code didn't exist at all.
    I also tried 50 and 200 as C:SIMVARS FF values, no luck.
    I am quite puzzled...
     
  13. ddawson

    ddawson Resource contributor

    Joined:
    27 Sep 2006
    Messages:
    653
    Country:
    canada
    I think you will have a lot more luck forcing the throttle position than you will overriding calculated engine variables.

    Doug
     
  14. Kekelekou

    Kekelekou

    Joined:
    1 Nov 2015
    Messages:
    74
    Country:
    france
    I’ll control the throttle position when all other options will have failed : auto-moving levers would look a bit odd, and i’d prefer to keep the throttle position as the desired power input, and restrict the RPM further down the line.
    Controlling manifold pressure is probably going to be my last attempt.
     
  15. Kekelekou

    Kekelekou

    Joined:
    1 Nov 2015
    Messages:
    74
    Country:
    france
    Here is my last test report:
    - fuel flow : any value set with the C:SIMVARS: has no effect on the engine
    - manifold pressure : RPM control is possible, but the crazy needle symptom shows up and the plane vibrates a lot
    - prop pitch : works ok, but the lever movement is a bit of an immersion killer
    - throttle position : same as prop pitch

    So in the end, the best results are yielded with the variables that don’t need XMLTools to be set (keyevents available).
    The lack of Hold function and non-settable variable (and lack of proficiency from the gauge writer, ie me) make XMLTools pretty much useless for my specific RPM control gauge.
    That’s a pity because it really sounded great.
     
  16. Heretic

    Heretic Resource contributor

    Joined:
    1 Feb 2007
    Messages:
    5,422
    Country:
    germany
    Thanks for investigating. Makes things easier for me, too.
     

Share This Page