Jump to content
Sign in to follow this  
Guest _FSAviator

Manipulating aircraft FDE parameters from an XML gauge ???

Recommended Posts

Hi,Does anyone know if it is possible to (temporarily) change aircraft parameters, such as thrust or weight, directly from an XML gauge ?Reason: I'm working on a freeware catapult launcher, and obviously need to emulate a fast accelleration at takeoff.But I can't find any K:Events that could help me to accomplish this.I have made something based on the SLEW behaviour in FS (setting a high speed when you exit SLEW mode and the A/c is off the ground) but I don't find that realistic enough.I know that it is possible to do this using the FSUIPC programming interface (like the original ArrestorCables program is probably doing) but that type of programming is not (yet ?) part of my skillset :-)Thanks, Rob

Share this post


Link to post
Share on other sites
Guest _FSAviator

Greetings Rob,I suspect the reason that no one has answered is a feeling that the

Share this post


Link to post
Share on other sites

Thanks indeed for the insight. The timing is amazing, as I had been thinking about undertaking just such a project. Doug Dawson

Share this post


Link to post
Share on other sites

Hi "FSAviator",First of all, thanks very much for your clear and extensive comments.I understand and respect your opinion towards not using FDE parameters to simulate functions like this catapult takeoff and cabletrap landing.On the other hand, as long as FS doesn't really support these types of functions, I believe ANY solution will have it's drawbacks, being FDE-based, but also wind-based, or otherwise. So I'll still be considering my options :-)Regards, Rob

Share this post


Link to post
Share on other sites
Guest _FSAviator

I have not had time to respond further until today. I will try to explain what I think you need to do to advance from the status quo, since I believe that what you propose is to some extent already available for many aircraft, but not much used for reasons which may become apparent. Provided the aircraft in question has one or more supercompressed piston engines the panel author can already add 'Mopar' Mike Wagner's FS8/9 'WEP switch'. The FDE author then controls the additional energy and duration added by the emergency fluid injection as though the energy is being injected by a catapult. This will overheat and over-torque the engine, so this method is not compatible with FDE and gauge combinations that have realistic failure criteria embedded. It also requires false declaration of WEP power obtained via emergency fluid injection. This is not a major objection in MSFS, though it certainly would be in CFS online combat usage. You would need to create an invisible gauge that disables 'catapult WEP' in flight. AFAIK there is no similar 'WEP switch' solution for turbine engines (see bottom of post). The optimum turbine engine FDE cludge is therefore to assign four engines to a single engined aircraft and have an invisible gauge instantly switch on 2 to 4 only IF throttle > n% and switch them off IF NOT on ground OR throttle < 100%. The bogus engines are co-located with the real engine(s). However even quadrupling the applied energy will not simulate the applied energy from a catapult shot and the end user will still have to slew the wind. They will just get some additional acceleration after full power lever advance when ON GROUND. Any solution which uses on board power (piston or turbine) to simulate the catapult thrust may theoretically be 'aurally incompatible' with any existing sound.cfg. If turbine engines do not have reheat which needs to be coded realistically the FDE author can add catapult energy as huge afterburner thrust, but this will add very little acceleration at low velocity, and it may consume huge quantities of the real fuel. Inexperienced users may believe that the afterburner is real and this method would again be unacceptable to the CFS community so you would need an invisible gauge which detects reheat and cancels it IF NOT ON GROUND.Any existing fuel dump/refuel gauges can be used to manipulate fuel state and therefore aircraft mass before and after launch. This would facilitate manipulation of pre launch mass and post launch mass as well as providing further functional realism when in close formation with an AI tanker. Alas FS9 does not support AI towline holding patterns. You might add code to all the tank gauges to make them point to full for the first five minute after engine start whilst you manipulate the aircraft mass (and induced drag).In addition the FDE author can include an extra bogus set of flaps to provide huge lift augmentation. This would get the aircraft airborne at very low IAS but then the user has to accelerate to normal flight speed before retracting the bogus lift augmenting devices. You would need to develop an invisible gauge to reject retraction below Vx. You would also need to disable the bogus flaps via an invisible gauge when throttle < 100% so that they cannot be deployed inadvertently on approach or after landing. However none of these FDE and gauge cludges ensure a safe catapult shot regardless of wind over the deck, so they don't really solve the problem. Remember unless the wind is slewed by the end user they may be trying to launch with 'negative IAS' and temporary manipulation of mass, thrust, drag and even lift cannot solve that problem.Doug, thanks for responding. I look forward to an FSUIPC wind vector based solution as it should work for all aircraft, including all pre existing FDE. It would be nice if a smoothed post launch correction of wind velocity and shift of heading to the values in the overridden weather could be incorporated. May I ask you if you know of a gauge which uses FSUIPC as the interface to augment turbine trust, or turbine torque, for a time limited period in response to water methanol injection, and if not whether you think these are feasible projects which you might also undertake in the future? Catapult launching aside their relevance to functional realism is considerable.FSAviator

Share this post


Link to post
Share on other sites

Smoothing the wind direction should not present a problem. Simply a matter of calculating the difference and correcting it gradually over the desired period of time. As panel updates occur several times per second, there will be no sudden changes.I'm not aware of any gauges currently available to augment turbine thrust or torque. Had a look at the SDK for FSUIPC. There are memory offsets documented for Engine Torque, Turbine Engine Max Torque Fraction, as well as Propeller Thrust and Jet Thrust (Pete's notes indicate that turboprops have both.) For reciprocating engines, fuel/air mass ratio is available. Some experimentation will be required to determine which of these values can be overridden in a meaningful way and which must be manipulated indirectly.Actually creating a gauge to apply the override is pretty straightforward. The biggest issue will be deciding the value required. The use of an optional parameter on the panel.cfg line for the gauge would allow experimentation with a number of values to determine which was most appropriate. I could certainly look at projects like this...If you haven't already done so, you might want to have a look at the SDK to see what is available:http://www.schiratti.com/dowson.htmlDoug

Share this post


Link to post
Share on other sites
Guest _FSAviator

I have downloaded and read the latest SDK. If it lists the offset as 'OK' in FS9 does that mean that it can be written to as well as read? If so then all the necessary variables appear to be controllable through FSUIPC. Having seen what is available 'all' should not be many.<>Agreed, but I will address what I see as the optimum solution in this post. Fortunately I think you may be over estimating the complexity of what I am proposing.I have not flown aircraft with water/meth injection in real life. I understand the usage in piston engines, but I am less clear about turbines. Ideally a plain words description of the process should come from someone with real world experience of controlling the output of jet and turboprop engines in wet and dry states. I am only approaching this goal from the point of view of an FDE author. Wet/Dry TOGA case seems reasonably clear, but does anyone reading this understand the usage of water/meth to create WEP in turbojet fighters? Can anyone explain whether it has any value at high altitude when full throttle / dry does not overtemp the turbine anyway? This is more of a CFS issue anyway and a poor simulation of water meth in pure jets is available as weak afterburner without using FSUIPC.Potentially there is one module required for turbojets and turbofans combined, and another for turboprops. In all cases there is mass to decrement. Do you agree that no one knows how to access the payload offsets and that water/meth defined as payload therefore cannot be decremented?It appears that total mass can nevertheless be manipulated independently of fuel usage. Is that correct? That is not my preferred solution anyway.If the water/meth tank were defined as a fuel tank by the FDE author in the aircraft.cfg he could create the real CG and inertia offset variables, and they could vary in real time. The 64000 USD question is can you prevent the 'fuel tank' with water in it being selected (as fuel) by the user and by FS9? Can you use your 'fuel' dump gauge code be rewritten to access just the tank with water in it and 'dump' just the water/meth when the switch is ON?Payloads defined as fuel tanks, which cannot be used as fuel, but with full simulation of mass, CG and inertia effects, coded by the FDE author, which can be 'dumped', have many more uses than water/meth simulation if you can figure out how to prevent selection of that (those) tank(s). This would be a big bonus.<>I am assuming this will NOT be the job of the module, or the module writer. I only expect the module to read input values provided by the FDE author, either from a water_meth.cfg or better still from the panel.cfg as you suggest. I don't expect you to calculate the values. I am only hoping you can figure out how to read them and impose them on FS9. Whether it can be done from a panel.cfg presumably depends on how many values?Potentially we have (for each engine);% change of torque % change of thrustOR (much better)% change of max torque% change of max thrustAND Possibly% change of JPT (but not needed for turboprops)AND Possibly for the aircraft current massbut this last is superfluous if the water/meth is defined in the aircraft.cfg as a fuel tank and is decremented by a dump gauge nested within the water/meth switch which is the solution I would like to reach.If so a turboprop module would ideally have only one variable (per engine) i.e. Turbine Engine Max Torque FractionThis appears to be possible, but implies that the gauge is limiting torque (is active) while the water meth switch is OFF not augmenting whilst ON since the ability to increment above 100% looks impossible. FDE author simply declares wet torque limit in the FDE and your module passes the % decrement for dry from the panel.cfg.I propose to manipulate only max torque in turboprops since the slightly (w_m) augmented thrust from the turboprop exhaust adds little power at take off speeds. Don't worry the % decrement values are not hard to research compared to a lot of FDE data and I expect you to leave them to the FDE author.Is max thrust fraction available? I could not see it. If it is then pure jets should be just as easy - BUT you may need some defined temperature cases (ISA assumed) in the gauge, or module, for WEP use at high altitude in fighters (see above). Not required for TOGA case. Many jet panels will need decremented JPT with water/meth ON. This could be post output gauge display code not requiring FSUIPC so manipulation of the turbine temperatures INSIDE FS9 is not really an issue at all if max thrust and max torque can be controlled directly.Does this mean that the module normally only sends data when the switch moves? Does it have to modify max values every cycle, or do max values persist until changed? This is a complication since if the process is decrementing the max from wet max to dry max with the switch OFF your module must be active whenever the engines are running and may need to send a decrement max message as each engine fires up. Not an issue if it sends every cycle.Not sure where a water_meth.cfg would have to go. I suppose the user would have to copy such a cfg from the aircraft folder into the FS9 root folder (overwriting) on a per aircraft basis, so panel.cfg is obviously superior.For testing use a turbo prop and see if you can impose 10% lower max torque when dry. Set up a bogus fuel tank at CoG with say 50 USG defined as content and see if you can dump content from it, and no others, when the water/meth switch is ON using a nested dump gauge. See if you can prevent FS9 selecting the water tank as fuel. Else see if you can force it to use that tank last? Presence of existing cross feed gauges may cause a problem? Such gauges may need more tank specific code for compatibility with the module? One 'problem' is that this method would NOT allow huge over declaration (by the end user using Notepad) for the CV catapult case, which is where we started. I don't think FSUIPC can push thrust and or torque fractions beyond 100% of the value declared as max in the FDE. Do you agree?FSAviator

Share this post


Link to post
Share on other sites

The 'OK' in the FS9 column means that the value is present at the offset listed. Not all of these values can be written to. If FS is constantly updating them, based on other values, then the value written can be immediately lost. I say 'can be' because I have successfully implemented a catapult by writing to a groundspeed offset, which should, in theory be constantly updated... This was what I was really getting at with the reference to experimentation.Payloads can be changed by FSUIPC. See offsets 13FC and 1400 in the SDK. All we have to do is agree on a payload station number and the capacity of the tank. My fuel dump gauge affects all tanks simply to keep it generic. There is a separate block of code for each tank. It is a simple matter to use this same procedure to reduce the capacity of a payload station. To directly answer your question, yes, FSUIPC can effectively prevent the use of fuel in specific tanks. Yes, this would have the effect of allowing their use as a distribution of mass within the airframe. Payload stations could also be used to this effect. Defining the actual airframe weight at some value less than actual, with the difference being defined as 'cargo' may at first seem odd, but why not try it? The overall effect on mass will be the same, but you should be able to manipulate handling characteristics to your advantage.More than one parameter can be specified on the panel.cfg line. Paramters are in fact read in as a single block of text, which must be converted to numbers by internal gauge code. This could either be done be checking for commas or other separators (probably easier for the user to understand) or by using the binary coded decimal approach.You might want to post a message on Pete's forum to check with him directly about the potential availability of values which you don't see on the list. He is not averse to adding new memory offsets, if the data can be located.http://forums.simflight.com/viewforum.php?f=54Torque - While working on the fuel dump gauge, I discovered that it is certainly possible to increment values over previously defined limits - ie, I ended up with fuel tanks containing 102% of capacity. Furthermore, there is no reason that a gauge cannot be written that will actually be functional when the switch is 'off' All one needs do is change the condition in the 'if' statement fromif (switch == 1) toif (switch == 0)It's that easy. Functions can be set to occur only when the switch is triggered or to happen all the time. There is much flexibility here.I will investigate the turboprop torque fraction. BTW, I now have a working prototype of the catapult that got this whole discussion going. If you were to send me your e-mail address, either by private forum message, or by e-mail (my address is in my user profile) I could send it to you. I would appreciate your comments.Best regards,Doug Dawson

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

"AFAIK there is no similar 'WEP switch' solution for turbine engines" I set it in an FS2K2 AC but no KB switch would work to set it. I think I even checked the long list of key combinations. Virtually all turbine powerplants have that capacity for 'WEP' and even more power. Full throttle typically sets way too much thrust for even a few seconds. Just advance the throttle so N1 or Torque is at an appropriate 'WEP' rating and you have it. Same for turbocharged engines. One can set the maximum MP higher than the 5 minute TO rating. All 'WEP' in CFS does it let it go even higher for a limited time. Set the 'Damage' slider at less than maximum and more time is available before over G crashes an AC. I assume the same applies to over thrust, or over torque. One could also set the turboprop maximum torque (in aircraft.cft) higher than normal, that would require 100% torque on the panel gauge to be set lower than normal but one could run at say 110% without getting damage in FS. Ron

Share this post


Link to post
Share on other sites

As a follow up to my previous post...I have determined that one can indeed write to both Engine Torque Percentage and to Turbine Engine Max Torque Fraction. Both of these values are in fact continually updated by FS, but will accept an IPC written value. This value will be overridden by the calculated value on the next update, so it is a matter of calculating the desired value and continually writing it via FSUIPC. I'm sure this can be done.Doug

Share this post


Link to post
Share on other sites
Guest _FSAviator

Thank you for the further explanation. The fact that I am not a programmer limits my comprehension of what is possible via either gauge code or via FSUIPC. I am still struggling to understand exactly what FSUIPC can and cannot do, but the situation is much clearer now. It seems that all the variables an FDE author might wish to manipulate have known offsets. The issue appears to be whether particular imposed values persist. I confess to missing the fact that FSUIPC now has the ability to manipulate payloads in real time. I now concur that the water/meth should be a station_load.n of defined mass included by the FDE author. The module documentation will need to specify the value of n. It needs to be a fairly high value and not conflict with any new load station protocols which have evolved, or may evolve as designers learn to make greater use of this feature. I suspect there are a fairly large number of MSFS end users who would like to have panels with say up to ten 'live bomb switches' which are each linked with say station_load.41 to station_load.50. If they exist I have missed those too.<>That is one of the areas which I struggle with as a non programmer. Since the FSUIPC SDK says;<>I assumed that the internal value could not be incremented beyond the FDE declared value. Maybe its just a case of never trusting SDKs, whoever wrote them.Setting the highest available max torque value in the flight dynamics and decrementing it if water/meth injection has not been selected seems logical anyway if the catapult, rail and hydroplane take off issues can be resolved by other means.Your update noted with pleasure.<>I will contact you tomorrow. If you have not already done so, maybe you could also ask Rob to comment since I rather hijacked his thread, and his opinion on the catapult launching module, and any desirable modifications, may be more relevant than mine?FSAviator

Share this post


Link to post
Share on other sites
Guest _FSAviator

Ron said, << Just advance the throttle so N1 or Torque is at an appropriate 'WEP' rating and you have it. Same for turbocharged engines.>>Obviously I agree completely for turbocharged engines, (see thread about enabling multiple power limits in FS8/9), but I have avoided any discussion of turboprops in that other thread because what I have said there, and Ron has repeated here, does not generically apply to turboprops, it only applies to a few. The main problem is that there is no such thing as 'a turboprop engine'. There are some turboprop engines in which the pilot can control torque with the throttle and rpm with an rpm lever, Ron's proposal will work for those, but many types of turboprop have no rpm lever and offer no independent control of N1. In some neither turbine (N1), nor airscrew rpm, ever change in flight. In others both N1 and airscrew rpm are linked directly to the throttle position. The N1 limit of both types is often the same wet or dry. The different limits are often defined by (turbine) temperature rather than rpm or torque. With regard to water/meth there are then two significant cases.In the first case the designer of the engine sets up water/meth so that TOGA power can be obtained at high outside temperatures (the engine is TOGA rated to ISA + n) but it only has one TOGA rating, or the wet and dry ratings hardly differ. When uploading aircraft of this type the turboprop engine does indeed only require the appropriate entries in the handling notes. They will reference temperature limits for wet and dry TOGA rather than torque or N1. The second case is more usual. An engine designed so that water/meth allows (significantly) more power to be developed during TOGA under ISA conditions. To simulate a realistic take off in turboprop aircraft where the throttle controls airscrew rpm directly the end user must advance the joystick throttle to match the TOGA N1 limit, whether the take off is wet or dry. This is the key difference. Telling end users to apply the wrong airscrew rpm for one type of take off (either wet or dry) poses knock on problems that the proposed module will allow us to avoid. Generically the variable torque at constant N1 and constant throttle position arises from differential turbine temp trimming. As far as I know the modules and gauges currently available do not allow us to temp trim our turboprop engines. We cannot vary the torque available at constant rpm in turboprop engines where the throttle is controlling N1 and airscrew rpm, nor in engines where N1 is invariant.The first step to developing realistic temp trimming for turboprops is the potential FSUIPC module being discussed here. It is not a totally realistic solution, but it is a first step. Hopefully torque will vary at constant throttle position, constant N1, and constant airscrew rpm, as though the engine had been temp trimmed appropriately. Turboprop engines that use water/meth for both the above cases also exist and 'turboprop engines' are so variable in design that I expect there are some which obey other rules altogether. FSAviator

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

"Generically the variable torque at constant N1 and constant throttle position arises from differential turbine temp trimming. As far as I know the modules and gauges currently available do not allow us to temp trim our turboprop engines. We cannot vary the torque available at constant rpm in turboprop engines where the throttle is controlling N1 and airscrew rpm, nor in engines where N1 is invariant." At set prop RPM, shaft torque varies with throttle setting in MSFS. While I've gotten torque to increase slightly as RPM is dropped at constant throttle."The first step to developing realistic temp trimming for turboprops is the potential FSUIPC module being discussed here. It is not a totally realistic solution, but it is a first step. Hopefully torque will vary at constant throttle position, constant N1, and constant airscrew rpm, as though the engine had been temp trimmed appropriately. " ITT appears to be reasonable in the MSFS turboprops. At higher TO temperatures one can reach the ITT limit before the torque limit. However, I have to wonder if ITT is that accurate overall. In that case, I'd have to make a gauge to calculate ITT. I did an XML gauge that calculates JT8D EPR and EGT closely (+/- 0.01 in the cruise range for EPR) to the values in a large JT8D table and I expect something similar could be done for any turbine powerplant. Assuming one has good data. One might emulate water injection by simply enabling a factor to make ITT display lower during injection. Then, one could push the throttles up higher. CN2 can be set to any limit in aircraft.cfg for 'TOGA' and SPD hold. A more sophisticated control would look at ambient pressure and temperature and limit the throttle setting so thrust, EPR, EGT, or Torque, ITT, etc were not exceeded. Ron

Share this post


Link to post
Share on other sites
Guest Ian_K

Hi,can you use afterburner? Or are you using a prop engine? (Sorry it is not obvious from a quick scan of the thread). There is an afterburner thrust factor in .cfg I think or somewhere.Ian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...