July 21, 200619 yr Hi Everyone:I've been trying to make a gauge tha disconects de Auto Throttle when the aircraft is on groung, but as sooner as it leaves the ground It reactivates the A/TH again (and keeps it active when Flying)I have tried to make a Gauge, but it does not work. if{ (A:SIM ON GROUND,bool) 1 == if{ 0 (>A:AUTOPILOT_AUTO_THROTTLE_ARM,bool) } } els{ 1 (>A:AUTOPILOT_AUTO_THROTTLE_ARM,bool) } If any oe can help my to figure this out, I'll be very happy.Thanks for your answers
July 21, 200619 yr Try this:(A:SIM ON GROUND,bool) 1 ==if{0 (>K:AUTO_THROTTLE_ARM,bool)}els{1 (>K:AUTO_THROTTLE_ARM,bool)}1. An if{ must be preceded by a condition NOT followed by a condition due to XML's RPN (Reverse Polisch Notation)!2. You can only read A:Vars. You set things by using K:Varsbtw: This gauge will arm AT when airborne and disable it when on ground. Is that what you want? Roelof
July 21, 200619 yr or:(A:SIM ON GROUND,bool) if{ (A:AUTOPILOT_AUTO_THROTTLE_ARM,bool) ! if{ (>K:AUTO_THROTTLE_ARM,bool) } } Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
July 21, 200619 yr Roelof,Remember I told you about the "continuous event" problem in FS9.This is exactly what your code is doing :-)See below.Rob
July 21, 200619 yr Jan,This sets AT On when it's on the ground (if you would even have used the right A: variable syntax) :-)So to be complete (I hope :-) ):(A:SIM ON GROUND,bool)if{ (A:Autopilot throttle arm,bool) if{ (>K:AUTO_THROTTLE_ARM) }}els{ (A:Autopilot throttle arm,bool) ! if{ (>K:AUTO_THROTTLE_ARM) }}Cheers, Rob
July 21, 200619 yr Hi,Foutje,This is from SDK TokenVar:AUTOPILOT_AUTO_THROTTLE_ARM N Auto throttle arm.I was of course wrong with the !Also, should the autothrottle be armed when you are airborne(?)So:(A:SIM ON GROUND,bool) if{ (A:AUTOPILOT_AUTO_THROTTLE_ARM,bool) if{ (>K:AUTO_THROTTLE_ARM) } } Should be enough?Dizzy!In my working room it is 37 degrees Celsius..........Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
July 21, 200619 yr Captain Mannering from "Dad's Army" would say "Just wondering who would spot that first!"To put it in laymans language>So to be complete (I hope :-) ):>>(A:SIM ON GROUND,bool) -- If aircraft is on the ground!>if{ > (A:Autopilot throttle arm,bool) -- and if AP is armed!> if{ (>K:AUTO_THROTTLE_ARM) } -- toggle it to get disabled!>}>els{ -- IF the aircraft is airborne> (A:Autopilot throttle arm,bool)! -- and if AP is disabled > if{ (>K:AUTO_THROTTLE_ARM) } -- toggle it to get armed!>}>Now how does that look? Roelof
July 21, 200619 yr Roelof:I have tried your code, I works on the fact It does discconect the A/TH when aircfraft lands on the ground, but it does not reconect it when airborne.Also I added to your code (in bounce case :( ), that when Rad_alt is equal or more than 100ft, It connects A/TH, but as said it does not connect.Thanks for your replysCode: (A:SIM ON GROUND,bool) if{ (A:Autopilot throttle arm,bool) if{ (>K:AUTO_THROTTLE_ARM,bool) } els{ (A:Autopilot throttle arm,bool) 0 == if{ (A:RADIO_HEIGHT,foot) 100 >= if{ (>K:AUTO_THROTTLE_ARM) } } }
July 21, 200619 yr Author Hi,I think you're a bit confused about the way an autothrottle works.First, it has to be "armed" before accepting one of its multiple functioning modes. FS supports two by default, TOGA and SPEED.In summary, to "connect" an autothrottle, first you need to "arm" it (K:AUTO_THROTTLE_ARM) and then you need to select one mode to operate, TOGA (K:AUTO_THROTTLE_TO_GA) or SPEED (K:AP_PANEL_SPEED_HOLD, there are others as well) To "disconnect" the autothrottle in FS just "disarm" it by calling (K:AUTO_THROTTLE_ARM) when it is already armed. Tom
July 21, 200619 yr Hi Tom:The Idea of the gauge is that auto-arm/disarm the A/TH, in this logic:When take-off and pass 100 ft, auto-arm A/TH (later on I will select Speed o Mach -no auto TO/GA available).When Landing, if the plane touchdown (SIM on Ground) it dis-arms the A/TH (and whit that the Speed mode selected disconets).An option that I have been thinking is to replace the SIM_ON_GROUND event, whit something like Rad_Alt is less than 50ft auto-disarm the A/TH.
July 21, 200619 yr >Roelof:>I have tried your code, Credit where credit belongs... It's Rob's code. I did the explaining.Looking at your first code makes me believe that you have some mountains to climb. That's why I was afraid that you needed some help on XML.The gurus will come up with the proper code I hope (-:However, with so many gurus willing to help, it may become a little bit confusing.There are many ways leading to Rome!From what you say I understand that you want to make touch and goes.Arming AT does not mean that you can set an IAS and expect it to work. You also have to select that IAS setting in your AP!btw What is your name?Roelof
July 21, 200619 yr Author Ok I understand your needs nowHence you might try:(A:Autopilot throttle arm,bool) (A:Sim On Ground,bool) and(A:Autopilot throttle arm,bool) ! (A:Radio Height,feet) 100 >= and orif{ (>K:AUTO_THROTTLE_ARM) }This piece of code will FORCE an a/t disarm whenever your a/c is on the ground, and also FORCE it armed whenever radio height is greater than 100 feetHope this helpsTom
July 21, 200619 yr Hi:I did not take in advise that the code whas actualy the same (but as you said explained).My problem is that when landing in crosswinds I usualy forget (due to the workload) to disconect the A/TH before land, and that makes trouble becose I start to slow down,but A/TH (usualy Speed mode active) makes that engines run at full power to compensate that.Then I wanted to make a gauge that when the aircraft touch the ground auto-disconects the A/TH, and so, every speed active mode.At the present moment(thanks to your explanation and the examples codes given) I have change the logic of the gauge, in order just to disable at a certain Rad_Alt (A:RADIO_HEIGHT,foot) the Speed Mode (keeps A/TH armed just in Go-Arround Sceneryo)This is my code now: (A:RADIO_HEIGHT,foot) 51 < (A:AUTOPILOT_AIRSPEED_HOLD,bool) and if{ (>K:AP_PANEL_SPEED_HOLD) } Sadly It does not work (and don't know why)Thanks for your AnswersHelio Alberto Regalado Moreira
July 21, 200619 yr Hi,To add to the confusion, i used an A:Var from the 2002 SDK....It is still hot!Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
July 22, 200619 yr Moderator (A:RADIO HEIGHT,foot) 51 <(A:AUTOPILOT AIRSPEED HOLD,bool) and if{ (>K:AP_PANEL_SPEED_HOLD) } >Sadly It does not work (and don't know why)>Thanks for your AnswersTry the above with the underscores removed from the A: variables! MOST A:vars do not have _ underscore characters in them... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment