Sign in to follow this  
Guest

XML String Function

Recommended Posts

I need to add 460 to Eng1 Exhaust Gas Temperature,farenheit) in order to correct an improper value being reported by the token variable, but need to display ambient temperature farenheit when the engine is off. What is wrong with my string function?%((A:General eng1 rpm, rpm) 0 ==)%{ if }%((A:Ambient Temperature,farenheit))%{ els }%((A:Eng1 exhaust gas temperature, farenheit) 460 +)%!4d!%

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

See the Altitude Selector.xml gauge from the Baron set. Should contain a method based on the ? "word" to select foremost or lastmost expression in a string.Are you sure the .air-file section is set correctly btw?Let me know if we've included this bug in the 421B, if you've spotted anything "suspicious" :)

Share this post


Link to post
Share on other sites

I wouldn't call it a bug. On our Centurion we had a similar problem, but it turned out after very close inspection of the manual, that EGT and "Turbine Intake Temperature" (the abrreviation isn't shown in the forum) gauges show "farenheit from absolute zero" which is also called Rankine sometimes. It might be worth to try "rankine" as unit instead of "farenheit". I assume this valid for all Cessnas. Personally I'm not used to the "Farenheit"-terminology (after all I'm Central European), so I can't say if it is right or wrong to use Rankine or Farenheit for EGT and similar, if we were talking about Kelvin and Celsius (degrees centigrade), it would be different.Arne Bartels

Share this post


Link to post
Share on other sites

>I wouldn't call it a bug. On our Centurion we had a similar >problem, but it turned out after very close inspection of >the manual, that EGT and "Turbine Intake Temperature" (the >abrreviation isn't shown in the forum) gauges show >"farenheit from absolute zero" which is also called Rankine >sometimes.I've been involved with Herv

Share this post


Link to post
Share on other sites

>See the Altitude Selector.xml gauge from the Baron set. >Should contain a method based on the ? "word" to select >foremost or lastmost expression in a string.I do not see what your're trying to point to... :( >Are you sure the .air-file section is set correctly btw? The only values to be set in the .air file are in section 540, and invlove a value scalar, max EGT, and a time-scalar.Setting the first scalar value will 'bandaid' the value to something closer to correct, but would prevent the EDM 700 from working with all a/c, as it is likely that this scalar is set to 1.0 in most (if not all) .air files... :( The better solution is to make the needed adjustment in the gauge code.>Let me know if we've included this bug in the 421B, if >you've spotted anything "suspicious" :) I'm sure that the values in the C421B gauge are also incorrect, but since it is an analog gauge, no one will ever notice...The EDM 700's digital display is a 'dead giveaway.' In spite of that though, no one has commented on the rediculously low EGT temperatures, particularly when idling!It is flat impossible for any engine to have an idle EGT that's equal to the ambient temperature!!! :)

Share this post


Link to post
Share on other sites

Sorry I haven't actually checked it for XML gauges, I only recalled that the variables for C gauges read always Rankine, and the real Cessna gauges show also Rankine even if it is labelled differently.Arne Bartels

Share this post


Link to post
Share on other sites

Now I rechecked it in the Baron with XML gauges:(A:Eng1 exhaust gas temperature, farenheit)gives farenheit(A:Eng1 exhaust gas temperature, rankine)gives rankine(A:Eng1 exhaust gas temperature, celsius)gives celsius(A:Eng1 exhaust gas temperature, number)or(A:Eng1 exhaust gas temperature, kelvin)gives kelvinAll readouts gave resonable values to the entry 540 in the .air file, which is 1660 degR (maximum displayed EGT with full power on ground at 59 degF OAT was 1525degR). So all units behave as expected.Arne Bartels

Share this post


Link to post
Share on other sites

>Now I rechecked it in the Baron with XML gauges: >All readouts gave resonable values to the entry 540 in the >.air file, which is 1660 degR (maximum displayed EGT with >full power on ground at 59 degF OAT was 1525degR). So all >units behave as expected. Well, now don't I feel silly... I just tried it again with all possible conversions, and yes... it does work fine now! BTW, this string function works:%((A:Eng1 combustion,bool))%{if}%((A:Eng1 exhaust gas temperature,rankine))%!4d!%{else}%((A:Ambient temperature,farenheit))%!4d!%The big problem seems to be that even with the engine at ground idle, the farenheit temperature is unreal (57F for an idling engine?), it should be more like 450F to 500F...At least by doing it as above, the reported values 'look right':Engine off = ambient temperatureEngine idle = EGT,rankine about 517Engine full load = EGT,rankine about 1543-1600I need to find a way to 'count down' from engine idle temp to ambient temp though, because it just looks silly 'cooling off' that quickly! :(Thanks for the help!

Share this post


Link to post
Share on other sites

Right Bill..most piston aircraft gauges (when properly labelled ;-) as well as my previous AFSD application display an iddle EGT of 57

Share this post


Link to post
Share on other sites

>Right Bill..most piston aircraft gauges (when properly >labelled ;-) as well as my previous AFSD application display >an iddle EGT of 57

Share this post


Link to post
Share on other sites

Yes, the rapid cooling to ambient temperature at idle is really strange and obviously a bug. I never encountered on the exhaust system of my motorbike ambient temperature shortly after a ride, it has usually this nice slight colouring from chromium to yellow, which says clearly Hands off! . I assume MS "just forgot" that idling engines produce a certain amount of heat in the exhaust. Even if this isn't much it results certainly to a higher temperature then 517 R since this is the ambient temperature in rankine scale.I thought about some alternative attemps to solve this. Most reasonable seems to me to use the maximum of EGT and CHT. It isn't perfect, but assume the EGT sensor sits somewhere near the cylinder head in the gas path after the exhaust valve. If the engine is off no exhaust gas streams past the sensor, but it will be still heated by the surrounding parts, so it isn't completely wrong to assume that the measured temperature is almost CHT, and this temperature at least doesn't drop so fast to ambient. It is of course also possible to introduce artificial heat exchange effects, but (A:ENG1 EXHAUST GAS TEMPERATURE,rankine) (A:ENG1 CYLINDER HEAD TEMPERATURE,rankine) max looks easier to me.Arne Bartels

Share this post


Link to post
Share on other sites

>>See the Altitude Selector.xml gauge from the Baron set. >>Should contain a method based on the ? "word" to select >>foremost or lastmost expression in a string.>>I do not see what your're trying to point to... :( Oh, it's just another way of writing the if and else sections, I thought you had problems with the syntax, not the output.>>Are you sure the .air-file section is set correctly btw? >>The only values to be set in the .air file are in section >540, and invlove a value scalar, max EGT, and a time-scalar. Hmm, ok I won't lecture you in .air-files, for obvious reasons (don't tell anyone) :D I'm currently struggling setting up values that reacts "correctly" to the shock cooling detection (and failure) system. CHT seem to be extremely picky on RPM, and less so on open cowls at highspeeds in terms of rapid cooling factor. I've been into oil temps, egt, with weird combos trying to get this working as I want, but still not perfect. Heh, I even controlled the cowls with reversed throttle and prop controls to get the shock detected properly... Arrgh, driving me mad.>Setting the first scalar value will 'bandaid' the >value to something closer to correct, but would prevent the >EDM 700 from working with all a/c, as it is likely that this >scalar is set to 1.0 in most (if not all) .air files... :( >The better solution is to make the needed adjustment in the >gauge code. Just state in the readme what need to be changed, and you're "off the hook" in terms of possible law-suits :)>>Let me know if we've included this bug in the 421B, if >>you've spotted anything "suspicious" :) >>I'm sure that the values in the C421B gauge are also >incorrect, but since it is an analog gauge, no one will ever >notice... I will investigate some more and let you know. For me, the "actual" temperature is not the big deal (as long as within limits), it's when the needle starts to deviate from one another that things "get interresting". A CHT reading higher than the other engine indicates that you are picking up "penalty points" (due shock cooling, too sensitive at this point) which are added to the needle. Jerk around with the throttles and the temperature on the "bad" engine will increase to the point where oil pressure drops rapidly - indicating an engine that is soon to be failed. Better shut it down yourself at this point than having it die on final approach :D>The EDM 700's digital display is a 'dead giveaway.' In >spite of that though, no one has commented on the >rediculously low EGT temperatures, particularly when idling! I must admit I never noticed. I'm not comfortable "working" with farenheit, and any value will appear logic enough, even those that are ridiculous to you :) If a particular aircraft I downloaded stated that watching temperatures was utterly important (for failures or other "forced" simulation), I would naturally pay more attention to their reading.The sim imposes a slight threat to those that wants to do the real thing; it learns a simming pilot the "what you want to see, is what you are going to see" tendency. In most simulated aircraft, engine temperatures doesn't "mean" anything - nothing bad will ever happen anyway.>It is flat impossible for any engine to have an idle >EGT that's equal to the ambient temperature!!! :) Using the "max" technique Arne mentioned seem to be a good way of dealing with this problem, or add a scaled, offsetted, and reversed value of the current rpm to the readout.Here is the "cowlflap" autosetting I tried. I've included some extra notes to easier read what it does. Change to RPM, and calibrate the values to whatever suits the gauge:(A:general eng1 throttle lever position,part) 0.35 max 0.8 min 0.35 - 1 0.45 (*remaining gap*) / * 1 r (*reverse the stack*) - sqrt (*nonlinear*) 16384 * near (*calibrate for axis usage*) (>K:COWLFLAP1_SET)You're probably aware that using general_eng1... over eng1 (or whatever it was) caused me some increadibly strange gauge readings (oil temp I think) whenever engine was shut off and OAT crept below freezing temperatures. I changed the (apparently not significant, but) variable read from the system and the gauge suddenly worked. I have *no* idea what caused this behaviour.

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