Jump to content
Sign in to follow this  
Guest Ron Freimuth

Autoland Gauge in xml

Recommended Posts

Guest A320 Co-Pilot

I am trying to do an autoland gauge, but am not sure how to get one switch to do so many thing.This is how I want it to work : when first turned on, it turns on autopilot master, autopilot approach, set speed to 210, arms spoilers, set autobrake to 2 and sets flaps down one.After looking at how xml work I have come up with this: (L:Autoland, bool) 1 ==if{1 ( K:AP_MASTER) 1 (K:AP_APP_HOLD) 1 (A:Autopilot airspeed hold var, knots) 210 (K:SPOILERS_ARM) 1 (INCREASE_AUTOBRAKE_CONTROL) 1 (K:INCREASE_AUTOBRAKE_CONTROL) 1 (K:FLAPS_INCR) 1 } now my problem is do not know if this is correct should I have == instaed of ==if{. should > and < be in the code ?Trying to learn xml a bit better so any help would appreciated.

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>I am trying to do an autoland gauge, but am not sure how to>get one switch to do so many thing. First, there is "autoland_1 .." in the library. You might check it to see how it is structured. Certainly you would want to change some things for your requirements. In fact, I think the archive has three XML files, one uses the one most appropriate for his AC size; landing speed.>This is how I want it to work : when first turned on, it turns>on autopilot master, autopilot approach, set speed to 210,>arms spoilers, set autobrake to 2 and sets flaps down one.>>After looking at how xml work I have come up with this: >> (L:Autoland, bool) 1 ==if{1 ( K:AP_MASTER) 1>(K:AP_APP_HOLD) 1 (A:Autopilot airspeed hold var, knots) 210>(K:SPOILERS_ARM) 1 (INCREASE_AUTOBRAKE_CONTROL) 1>(K:INCREASE_AUTOBRAKE_CONTROL) 1 (K:FLAPS_INCR) 1 } >>now my problem is do not know if this is correct should I have>== instaed of ==if{. should > and < be in the code ? I can see a few problems. I'm sure others will also give ideas. (L:Autoland, bool) 1 == if{ 1 (>K:AP_MASTER) 1 (>K:AP_APP_HOLD) 1 (A:Autopilot airspeed hold var, knots) 210 (* NO! *) 1 (>K:SPOILERS_ARM) 1 (>K:INCREASE_AUTOBRAKE_CONTROL) 1 (>K:INCREASE_AUTOBRAKE_CONTROL) 1 (>K:FLAPS_INCR) } I think you need the tags around the . I added some required spaces and ">K:". I don't think one needs to put a '1' into any of the specific K: events above. However, to see the Autobrake to '2', I expect you would put a '2' into a variation of the K: event above. One that probably ends with "_SET". And, to set Flaps to detent 1, put a '1' in the analagous K:Flaps.. _SET. Which would ensure it is at 'detent 1', not simply incremented from its current detent. The one A:variable is Read Only. You will have to put your '210 kts' in another way. Something like "210 (>K:AP_SPD_VAR_SET)". But, also ensure the autopilot is On and Speed Control is active. Just a few things I saw, others will likely explain better. Ron

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

Thanks for the reply. I decide to build one at a time so the first one to do is (>K:AP_MASTER)So I tried. But turns the AP on and off without me clicking it.This is the Value(L:Autoland,bool) ==if{ 1 (>K:AP_MASTER) } Have look at some other XML and mine does not seem to look any different. If I understand this correct this means when Autoland Switch is On, AP Master is on, is this right ???. Have tried differnt spaces with the result being the AP Master comes on and off without me clicking or does not work at all.This is the XML including the switch.(L:Autoland,bool)(L:Autoland,bool) ==if{ 1 (>K:AP_MASTER) } (L:Autoland,bool) ! (>L:Autoland,bool)can anyone see the problem ??????

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>Thanks for the reply. >>I decide to build one at a time so the first one to do is>(>K:AP_MASTER)>>So I tried. But turns the AP on and off without me clicking it. By itself, that would appear to turn the AP_MASTER On on every DOS tick.>This is the Value>>(L:Autoland,bool) ==if{ 1 (>K:AP_MASTER) } >>Have look at some other XML and mine does not seem to look any>different. Do not make the 'condtion if{ ' as "==if{ .." There has to be at least one space after the bool "==" (etc) and the "if{ ". I often put the if{ on the next line, and indented. Beyond that, there are lots of XML examples in this Forum, a Search might find something close to what you want. Most related to things I've never done myself. ;) Details of syntax, spaces, etc. mess everyone up when learning this FS XML. Ron

Share this post


Link to post
Share on other sites

Hi,Try:(L:Autoland,bool) if{ (A:Autopilot master,bool) ! if{ (>K:AP_MASTER) } (A:SOMETHING,bool) ! if{ 1 (>K:SOMETHING,bool) } } els{ ..... }or(L:Autoland,bool) if{ (A:Autopilot master,bool) ! if{ (>K:AUTOPILOT_ON) } (A:SOMETHING,bool) ! if{ (>K:SOMETHING_ON) } } els{ ..... }Now no on--off--on--off movements etc.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

Have sorted the problem with autopilot coming on and off without clicking was due to using K:AP_MASTER, now use K:AUTOPILOT_ON.Have got the approach to hold and the Spoilers to arm.Now need to work out how to get the autothrottle to arm and Autobrake to set to 2. I think your code Jan might be what I am looking for for this so will give it a try. Thanks for the help, will post again if I encounter any more problems.

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

Have encounter more problems, Need to set auto throttle to on, but can only find one variable K:AUTO_THROTTLE_ARM, so now have same trouble I had with AP_MASTER switching on and off. Have tried your code Jan but can not get it to work.Is there another code for auto throttle arm ? I have tried AUTO_THROTTLE_ON and AUTO_THROTTLE_SET, but they do not work.The codes I am trying at the moment are :(L:Autoland,bool) if{ 1 (A:Auto throttle,bool) ! if{ 1 (>K:AUTO_THROTTLE_ARM) } (A:Auto throttle arm) ! if{ 0 (>K:AUTO_THROTTLE_ARM) } } els{ .....} (L:Autoland,bool) if{ 1 (A:Auto throttle arm,bool)(>K:AUTO_THROTTLE_ARM) } (L:Autoland,bool) if{ 1 (Auto throttle arm,bool) 0 == if{ 1 (>K:AUTO_THROTTLE_ARM) } } if i can get this to work then the autobrake should I guess follow the same code, as K:INCREASE_AUTOBRAKE_CONTROL move the autobrake switch to max not one increasement at a time.

Share this post


Link to post
Share on other sites

Hi,(L:Autoland,bool) if{ (A:Autopilot master,bool) ! if{ (>K:AP_MASTER) } (A:AUTOPILOT THROTTLE ARM,bool) ! if{ (>K:AUTO_THROTTLE_ARM) } (A:SOMETHING,bool) ! if{ 1 (>K:SOMETHING,bool) } ..... } els{ ..... }Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

Still no joy.This is the code I have at the moment :(L:Autoland,bool)(L:Autoland,bool) if{ 1 (A:Auto throttle arm,bool) 0 == if{ 1 (>K:AUTO_THROTTLE_ARM) } (L:Autoland,bool) if{ 1 (>K:AUTOPILOT_ON) (>K:AP_APR_HOLD_ON) (>K:SPOILERS_ARM_ON) } Autoland(L:Autoland,bool) ! (>L:Autoland,bool) Could I have a problem with my first value ?? I have looked at the Autoland gauge from the avsim file library and to set the auto throttle arm it uses the value I have. It also uses a lot of GVAR but I do not understand these, there has got to be a way to set the auto throttle armed without these.The Third value works perfectly, it turn on AP and APR and set spoilers to armed. ( They could be bothered to add on to the spoilers)Why AUTO_THROTTLE_ON OR AUTO_THROTTLE_ARM_ON could not be put into the programing of FS2004 I do not know.

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

Sorted it. Should be A:Autopilot throttle arm, NOT A:Auto throttle arm now works fine, first part nearly done just the speed setting to do.

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>Sorted it. Should be A:Autopilot throttle arm, NOT A:Auto>throttle arm now works fine, first part nearly done just the>speed setting to do. I copy XML variables from Parameters.doc and paste them into a big comment at the bottom of a couple of my gauges. One section for A: variables, another for K:, etc. Also, many of the units. Then, I can copy and paste to my code as needed. Ron

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

I think I will try that, saves copying errors. I have now nearly finished just need to sort the flare. I think I will try the Att hold variables and see how it goes, will also do search on here to see if I can find how you set the attitude to hold 6 degrees. been fun finding out how xml works so will have to look for another project when I finish this one.Thanks to all who replied.

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>I think I will try that, saves copying errors. >>I have now nearly finished just need to sort the flare. I>think I will try the Att hold variables and see how it goes,>will also do search on here to see if I can find how you set>the attitude to hold 6 degrees. I assigned 'synch FD bar' to "Ctl ". That moves the FD to the current AC pitch. I also assigned 'increase and decrease FD bar' to "Ctl -" and "Ctl +". That way, I can make the FD Bar move to current AC Attitude, then kill ALT hold (if on). I can then adjust the FD pitch from the KB and the AC pitch will follow. When the FD is not on "0.00" and the Autopilot is On, the AC pitch adjusts to the FD pitch setting. I often fly my AC by changing the FD pitch, letting the autopilot change the trim to hold that pitch. I have to hit "Ctl T" to disable the FD, it then moves to 0.0. While turning 'ALT' back on restores ALT/VS control. I display FD Pitch in my test gauge. I can see the value much more accurately than on the horizon indicator. I've also noted the Lear FD bars are not always at the height they should be. To hold pitch in your 'autoland' I expect you could control the autopilot and FD with XML Variables. I'm pretty sure there are 'increase FD pitch' and 'decrease FD pitch'. Incidently, they change by 0.2 degrees per increment. Your gauge might have to look at the A: FD pitch and keep incrementing or decrementating the K:SET for the FD to get the 6.0 degrees. Unless there is a K: event to set the FD bar to exactly the value you want. There is also a FD 'roll' variable. Note the autopilot follows the FD value in for both ALT/VS/GS (pitch) and HDG/NAV/ILS (roll), even if the FD Bars are not displayed. In your case, I think setting the FD pitch and letting the autopilot hold the AC to that pitch is an approach to try. Experimenting with this manually will give a better idea of what you want to control during an autoland. --- There are two 'AGL' values in XML: (A:Radio Height,ft) and(A:Plane Alt Above Ground,ft). They appear to be identical. Both give the distance to the AC's center, so may read 10 ft when on the ground. You will want to subract that distance to know how far the wheels are above the runway during the autoland. Ron

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

I have tried K:AP_PITCH_REF_INC_UP but do I have to type this in six time to get the 6 degrees ?? K:INCREASE_AUTOBRAKE_CONTROL was easy as could get it to go to 1 2 3 4 etc using the A Variable then the the number 0 for off etc.But K:AP_PITCH_REF_INC_UP does not have this (or I do not have a gauge with this A:Variable) so how can you tell it to go up 6 degress, I have tried (>K:AP_PITCH_REF_INC_UP) 6 does nothing. This is the only thing left to do, can engage Autoland 20 nm fron runway and it does everything autopilot on, apr on, Flaps, Autobrake, Gear and speed, then when on the ground reverse thrust, throttle to idle at 60 knots autobrake off, flaps up, spoiler up autopilot off. But for the life of me can not get it to flare.The only other I noticed is when I engage Autoland before 20nmiles it turn the Alt Hold off, do not no why as Alt Hold is not in the Autoland code. Anyone else had this problem ??

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