Sign in to follow this  
Guest eberts

autoland xml

Recommended Posts

Hi there,currently I'm trying to make a (simple) autoland gauge in xml.Unfortunately I am not an expert in xml programming but I found some stuff that might do the job.So far I understood most of the code and edited a bit. I tested the gauge with a 737-800, the plane seems to come down to minimum altitude and flares smoothly but some commands (the important part)don't do anything (e.g.it doesn't turn off the autothrottle and not throttle_cut).What I don't really understand are the numbers in front of the k_commands (0 or 1) - tried them both. It doesn't work...Thanx for any helpHere's a part of the code:(the real parameters have to be tested later)//--TURN ON AUTOLAND VARIABLE WHEN AUTOPILOT AND APR HOLD ON ---------------------- (A:AUTOPILOT MASTER, bool) (A:APPROACH HOLD, bool) && if{ 1 (>L:AP AUTOLAND, number) }//--TURN OFF AUTOLAND VARIABLE WHEN AUTOPILOT OR APR HOLD OFF ---------------------- (A:AUTOPILOT MASTER, bool) ! d (A:APPROACH HOLD, bool) ! r || if{ 0 (>L:AP AUTOLAND, number) }//--AUTO LAND ----------------------(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 150 == if{ (A:AUTOPILOT ALTITUDE LOCK VAR, feet) 100 > if{ 0 (>K:AP_ALT_VAR_SET_ENGLISH) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 130 == if{ (>K:AP_APR_HOLD) } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 115 == if{ (>K:AP_ALT_HOLD) } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 100 == if{ (A:AUTOPILOT VERTICAL HOLD VAR, feet per minute) -500 < if{ -500 (>K:AP_VS_VAR_SET_ENGLISH) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 70 == if{ (A:AUTOPILOT AIRSPEED HOLD, bool) if{ (>K:AP_PANEL_SPEED_OFF) 0 (>K:THROTTLE_CUT) (A:AUTOPILOT AIRSPEED HOLD, bool) 1 == if{ 0 (>K:AUTO_THROTTLE_ARM) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 50 == if{ 0 (>K:SPOILERS_ARM_ON) (>K:AP_PANEL_HEADING_HOLD) } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 35 == if{ (A:AUTOPILOT VERTICAL HOLD VAR, feet per minute) -300 < if{ -300 (>K:AP_VS_VAR_SET_ENGLISH) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 12 == if{ (A:AUTOPILOT VERTICAL HOLD VAR, feet per minute) -100 < if{ -100 (>K:AP_VS_VAR_SET_ENGLISH) } } }

Share this post


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

Well, I haven't studied all of the code, but I notice a few thing.1. A lot of K: events donot take parameters, since they are just on/off or toggle functions.Example: 0 (>K:THROTTLE_CUT) is pointless; the event itself sets the throttle to idle, and doesn't need a parameter.(although it doesn't do any harm)2. A condition like A:RADIO HEIGHT, feet) 80 ==will almost certainly never become TRUE, since it is very unlikely that the aircraft has an exact RH of 80.0000000000.... ft whenever the gauge reads an altitude. Use < instead of ==Rob

Share this post


Link to post
Share on other sites

Ok, thanks for your quick response!1. I tried it also without parameters already (e.g. (>K:THROTTLE_CUT) - no toggling either.2. Before, I had the code with "less than" (<) everywhere, then I changed it to "==", just to check... (at a particular RH, there should be a condition become TRUE if the plane is descending, regardless if the condition becomes FALSE again afterwards - my logic...). Anyway, I changed it again to previous state. Still not really working.Now, at RH between 150ft and 130ft the autopilot altitude is set to "0000" and after that (130 to 115ft) the AP_APR_HOLD is switched off correctly. But then nothing else happens anymore.I already tried AP_ALT_HOLD instead of AP_ALT_HOLD_ON. AP_VS_VAR_SET_ENGLISH is not set either as I checked with a test gauge.Thanks a lot!So here's my altered code again://--TURN ON AUTOLAND VARIABLE WHEN AUTOPILOT AND APR HOLD ON ---------------------- (A:AUTOPILOT MASTER, bool) (A:AUTOPILOT APPROACH HOLD, bool) && if{ 1 (>L:AP AUTOLAND, number) }//--TURN OFF AUTOLAND VARIABLE WHEN AUTOPILOT OR APR HOLD OFF ---------------------- (A:AUTOPILOT MASTER, bool) ! d (A:AUTOPILOT APPROACH HOLD, bool) ! r || if{ 0 (>L:AP AUTOLAND, number) }//--AUTO LAND ----------------------(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 150 < if{ (A:RADIO HEIGHT, feet) 130 > if{ (A:AUTOPILOT ALTITUDE LOCK VAR, feet) 100 > if{ 0 (>K:AP_ALT_VAR_SET_ENGLISH) } } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 130 < if{ (A:RADIO HEIGHT, feet) 115 > if{ (>K:AP_APR_HOLD) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 120 < if{ (A:RADIO HEIGHT, feet) 100 > if{ (>K:AP_ALT_HOLD_ON) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 100 < if{ (A:RADIO HEIGHT, feet) 70 > if{ (A:VERTICAL SPEED, feet per minute) -500 < if{ -500 (>K:AP_VS_VAR_SET_ENGLISH) } } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 70 < if{ (A:RADIO HEIGHT, feet) 50 > if{ 0 (>K:AP_PANEL_SPEED_SET) (>K:THROTTLE_CUT) (>K:AUTO_THROTTLE_ARM) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 50 < if{ (A:RADIO HEIGHT, feet) 35 > if{ (>K:SPOILERS_ARM_ON) (>K:AP_PANEL_HEADING_HOLD) } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 35 < if{ (A:RADIO HEIGHT, feet) 12 > if{ (A:VERTICAL SPEED, feet per minute) -300 < if{ -300 (>K:AP_VS_VAR_SET_ENGLISH) } } } }(L:AP AUTOLAND, number) 1 == if{ (A:RADIO HEIGHT, feet) 12 < if{ (A:RADIO HEIGHT, feet) 0 > if{ (A:VERTICAL SPEED, feet per minute) -100 < if{ -100 (>K:AP_VS_VAR_SET_ENGLISH) } } } }

Share this post


Link to post
Share on other sites

Hi,I think the radio height has a lot to do, may be too much, didn't test it.Another approach could work perhaps a little bit better:1. when "Autoland On" let the plane establish on the localizer at 3000 ft, reducing the speed to 150 Knots, flaps 15 degrees, spoilers armed, autobrakes 2 or 3, just before intercepting the glideslope (all automatical depending of distance to the airport, NAV1 - or NAV2 DME)2. descend along the glideslope with full flaps and gear down at 150 Knots (all automatical depending of the moment when glideslope is intercepted)3.when the radio height is less than 70 ft then:a. disarm autothrottle b. cut throttlec. approach hold offd. alt hold on(all automatical depending of radio height)4. when radio height is less the 20 ft en pitch attitude between 1 and 6 degrees (positive!) then:a. set attitude hold onb. alt hold off(all automatical depending of radio height)5. when on the ground then:a. reverse powerb. attitude hold off(all automatical depending of ground)6. finally flaps up, spoilers down, autobrake off, landinglights off, throttle idle, autopilot off etc.and finally "Autoland" off(all automatical depending of groundspeed)Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Thanks a lot!I followed your instructions and rewrote the code step by step.Now it works perfectly!Obviously the RADIO HEIGHT really had too much to do. So now I have only two RADIO HEIGHT elements and a SIM ON GROUND. I also forgot to set L:Autoland to off in the end.I really feel like trying to experiment a lot more with xml gauges now.Thanks again, Jan.S

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