Jump to content
Sign in to follow this  
Guest Peyroteo

XML Gauge to simulate a failure

Recommended Posts

Guest Peyroteo

Hi KarlThis is very nice, I

Share this post


Link to post
Share on other sites

Karl & Peyoeteo, This quote is pure fact.. ( thanx Karl ) :-)"This is a very complex "gauge" (nographics, only computes "stuff"), and obviously itmight contain bad, nonlogical, beginners-code, and plain uglybugs :)"Never heard it any better :-)It's been along time on since being able to fool around with the FS stuff.. Since Karl gave some code.... AND I will be going thru it with a fine tooth comb LOL!!! Kuzzz that's how to learn new ideas.. I braught out some code too.. Zero warranty.This is totally still in development.. It works as such,, at all time N1 is being monitored to cross a value that can engage a timer. Once the time runs out while still in the range the engine will fail. If the engine fails under the value a reset can occour "after" a cool down period descibed by a fator of "overhaeat time" . During all times a number is being introduced as the "fail", "factor" or "time to fail" . This number is generated by time and the point when the engine went over the limit. The whole key to this gauge is have the refresh rate of the gauge itself set to 1 second.. It saves precious computing power and relieves the need for user vars I.E G:vars to be used in or to facilitate the actual timer. So in this sniipet there a 4 ways to fail an engine. 1--- Instant,, go over this N1 value and its done... 2--- The higher range of N1 values,,, If you reach this it it'll take the least amount of time to fail but require the most amount of time to reset, if it doesn't reset completely but you fall below the trigger N1 it will start giving time back "and/or" if you did get time back or none at all the timer remains at the time either set now,,, or with some time given back.. (that is not worded right :-( ) if you go above the N1 trigger again..Modes 3 and 4 work in the same way but the values get better in the pilots case I.E. The time to fail gets larger while the cooldown reset gets shorter. There are some code in here that don't belong and part of developent so beware.. The gauges use all 9 G:Vars so one will be needed for each engine, that is where 1 of the L:vars comes in to comm with the other ones if needed..The other one is set to 1 for debug and monitoring ( set at 1 ) ... One possible problem...with 4 of these all set to a referesh of 1 second may introduce a stutter... ;-( Fs2000 all over again...Once the idea of the engine 1 gets made the other 3 (if necesssary) can be nearly done by just making copies..I enclosed a zip with 2 bitmaps and the code so if want to peer at it, use it, make it work etc... go for it. Donot have the time as such but it is still is the head LOL!!! IT NEEDS WORK !!! BTW ENG1 is monitored but it will fail ENG2.... just for testing. EDIT -- all the values used are by referencing the stock 737-400 and using DF and other sources from the net to set the failure times/N1 values etc... You'd be surprised how real the .air fie is actually set in the stock 737.. You can get 107% yes... But are you allowed to.... NO !! Means you cannot peg the throttles at T/O LOL!!OK,, nuff rambling...have a good one. Regards,RomanGREEN BAY PACKERS][/i :-ukliam :-beerchug


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest Peyroteo

RomanI will analize your code, thank you for that.Next week I

Share this post


Link to post
Share on other sites

He Roman, Karl and Peyroteo,These codes and snippets for me are very "threathening"!If one of you has a good functioning xml, please show it in the forum.As an idea:I use engine, electrical- and hydraulic failures, which are "cured" by the RAT, nothing original, but you can use the RAT to reset the failures.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest Peyroteo

Hi RomanI try your code with some changes (recip engines) and it works well!Something I do not understand:------------********----------(****************************** CASE GENERATOR ***************)(P:Absolute time, minute) (P:Absolute time, minute) int % 10 * int s1 (A:Plane heading degrees magnetic, degree) (A:Plane heading degrees magnetic, degree) int % 10 * int 1 max (A:Plane heading degrees true, degree) (A:Plane heading degrees true, degree) int % 10 * int 1 max s13--------------*******-----------------In the second , lines is'nt a mistake? I think the s12 variable is missing after

Share this post


Link to post
Share on other sites
Guest Peyroteo

Hi JanAs soon as I have something working as I want, I put here the xmlRegards,PeyroteoPS: What

Share this post


Link to post
Share on other sites

Peyroteo (i like Portugal very much; what does your name means?),The RAT is the Ram Air Turbine.When everything is gone, this turbine gives you, by windmilling, just enough power (elec/hyd) to get you safe on the ground.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest Peyroteo

Hi JanThanks for your tip.I

Share this post


Link to post
Share on other sites

Peyroteo,Thanks for the answer and invitation.Since 1974 (Salazar!) i came for holidays to Portugal, mostly by car.Last time was 2001, when we stayed in Silves.Did an ULV-trip from Lagos.More info in profile.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest Peyroteo

Hi everybodyI made some small changes to your code (Roman) just for testing and it works.I could made random failures to recip engines under certain conditions (instant failure at max engine CHT and elapsed time runing above certain manifold pressures). But, Roman, with 4 engines, a stutter occurs. It not afect the frames in FS, but we can see it in the other gauges in the panel.I don

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