Jump to content

Sign in to follow this  
airmiller

Altitude Change Gauge

Recommended Posts

Hi all,I'm making a gauge that will trigger a bitmap when the altitude hits every 500ft,(0-500, 501-1000, etc) both up and down in altitude.I'm not to sure where to begin since I could make a gauge like such:(A:Indicated Altitude, feet) 501 < (A:Indicated Altitude, feet) 0 > &But, I would have to make at least 50 entries just for 25,000 ft. There has to be a simpler way.Any help will be greatly appreciated.Thanks,Benny

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Yeap, that is the way you'd do it in XML.

Share this post


Link to post
Share on other sites

Hi,Just a question, do you need a different bitmap for every 500 ft, or is the same bmp that appears and dissapears?How long does the bmp remain visible since triggered?The solution is simple in any case but these things are important to give it correct.Tom

Share this post


Link to post
Share on other sites

Hi Tom, It's a different bitmap for every 500 and stays on the entire time from activating until the new bitmap takes over. It's actually a number reduced by 1 as the aircraft climbs, and gains as it descends. The start number for 0-500ft is 200; so at 501 feet, it will appear as 199, etc... I thought about using a string as well but didn't know the code to change it, and maybe bitmaps are easier?Any Ideas on both?Thanks,Benny

Share this post


Link to post
Share on other sites

Hi Benny,Using a string would be very simple:%((A:Indicated Altitude, feet) 501 / int 200 r -)%!d!In case of bitmaps, you could use the same formula for a rolling number. There are many examples on rolling numbers in this forum, surely you'll find some suitable if you do an advanced searchTom

Share this post


Link to post
Share on other sites

Hi Tom,The code worked perfectly, I just added a ( - ) after the 501 to get the negative altitude to show up. I have 2 strings - one string for the positive and one for the negative triggered by the plus/minus 0 feet. One more question - something I forgot earlier, how do I "cap" off the numbers - what I mean to say is that after it gets to 150 and I want it to stop there, then what do I use to stop?Best Regards,Benny

Share this post


Link to post
Share on other sites

Sorry but I don't understand what do you want to do.Maybe doing a click the counter will stop at a certain number ie 195 and remain there no matter the aircraft keeps climbing?Tom

Share this post


Link to post
Share on other sites

Hi Tom,What I want to happen is that once the plane reaches lets say 25,000ft, then the counter stops counting away and stays on with the current count. I need this to happen without further clicking to stop this.So the limit will be 25,000ft. Is there any way to limit this by Alt or by a count number say 150?%((A:Indicated Altitude, feet) 501 / int 200 r -)%!d!Thanks,Benny

Share this post


Link to post
Share on other sites

Tom,YOU ARE THE MAN!!!!The change worked perfectly. I was able to solve another problem code because of you.Thanks again.:)Benny

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.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    48%
    $12,180.00 of $25,000.00 Donate Now
×
×
  • Create New...