Jump to content
Sign in to follow this  
spokes2112

XML - Setting Decision Height in 10 foot increments

Recommended Posts

Guest

To Arne Bartels and all,I am working on a 737-400 EADI and have some problems with setting the Decision Height in 10 foot increments. Here's the working code of this element where increments are set to 1 meter: "(A:Circuit general panel on, bool)DH %((A:DECISION HEIGHT, feet))%!3d! feet) 1 (>K:DECREASE_DECISION_HEIGHT) 1 (>K:INCREASE_DECISION_HEIGHT) "By using the " 3" (Mouse Area) argument increments are set to 3 meters, but that's not as accurate as required, as 1 foot equals 0.3048 meter. I have tried to round off the value by using the "near 10" argument, but the result is either the fixed values "0", "1" or a blank EADI Display!Best regardsJan Harry Sorensen

Share this post


Link to post
Share on other sites
Guest bartels

Sorry, it's always multiples of meters as increment, you can't use exact feet for it. All you an do is to "fake" a bit on the display and adapted step sizes, so that it displays always steps of 10 feet, even if they aren't exactly 10 feet.Arne Bartels

Share this post


Link to post
Share on other sites
Guest

Thank you Arne. I will try to do as you suggest. Don't know exactly how right know, but maybe to put in a mask area with the fixed "value" "0" (text) to cover up for the third digit. Another solution could be to program the whole EADI with the FS2002 SDK and VC++ 6 and using the meter/feet conversion factor?Best regardsJan Harry Sorensen

Share this post


Link to post
Share on other sites
Guest bartels

The problems aren't solvable in C gauges, the increment is always in meters.Arne Bartels

Share this post


Link to post
Share on other sites
Guest

>The problems aren't solvable in C gauges, the increment is >always in meters. >Arne BartelsOkay, thanks anyway. I will keep on with XML editing instead of the VC++ coding.Best regardsJan Harry Sorensen

Share this post


Link to post
Share on other sites
Guest bartels

I'll think of adaptable increments in XML, but it will take a bit time.Arne Bartels

Share this post


Link to post
Share on other sites
Guest

>I'll think of adaptable increments in XML, but it will take >a bit time. >Arne BartelsThat's very kind, Arne. I have in a way fixed this issue by adding an extra element with text and by adjusting the DH "X" and "Y" text values. Another problem: The Mach indication should only be visible when speed exceeds .40 MACH. The MACH element:(A:Circuit general panel on, bool)%((A:Airspeed mach, machs) 0 max 9.99 min)%!.3f!Below pictures of the EADI, first at high speed approaching the high speed buffer zone, and secondly on approach.badderjet:Yes, I am planning to build in an aural warning for "Minimums", but that will require quite some "tinkering" :-). A new sound gauge would have to be built in C.Best regardsJan Harry Sorensen

Share this post


Link to post
Share on other sites
Guest bartels

Something like:<Visible> (A:Circuit general panel on, bool) (A:Airspeed mach, machs) 0.4 > && </Visible>?Arne Bartels

Share this post


Link to post
Share on other sites
Guest

>Something like: > (A:Circuit general panel on, bool) >(A:Airspeed mach, machs) 0.4 > && > >? >Arne BartelsHi Arne,I will certainly test this code and report back here. Thanks a lot for your effort :-). Best regardsJan Harry Sorensen

Share this post


Link to post
Share on other sites
Guest

Hi Arne,What can I say? You are the king :-), no doubt about that! The Mach indicator comes on at .40 MACH on the way up and goes off when speed is below .40 MACH again! Just amazing and thank you very much indeed! Here's the code:(A:Circuit general panel on, bool) (A:Airspeed mach, machs) 0.4 > && %((A:Airspeed mach, machs) 0 max 9.99 min)%!.3f!Best regardsJan Harry Sorensen

Share this post


Link to post
Share on other sites
Guest

Hi badderjet,I am not the expert for sure! Arne Bartels however has made a document were he summarizes all used operators, functions and modifiers, and I guess that you can find this document in the AVSIM File Library. Unfortunately the postings on this forum with the code examples are changed (HTML), it's therefore difficult to use them here.One thing I have found out regarding XML is to open the .xml document in Internet Explorer, which in turn will check and report if the XML syntax have errors with a reference to the error origin. If using for example a text editor with line and column functionality it's fairly easy to find the spot. But that does not necessarily mean that the error is right there, it's usually somewhere else :-). IE does not really check for errors in a FS2002 .xml document, just for XML in general.Best regardsJan Harry Sorensenwww.jspanels.com

Share this post


Link to post
Share on other sites
Guest bartels

There are some tricks avoiding the reformatiing here in the forum, but it takes a certain amount of work (I edited my last code example four times until I got all operators right). All <'s have to be typed <, all >'s have to be typed > all &'s replaced by &.

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