Jump to content
Sign in to follow this  
Guest AndrewW

Can't get my head around this....!?

Recommended Posts

Guest AndrewW

I have the following code. As it stands, the light (uses the L:var) will turn off when the aircraft is in the climb, and within 250ft of the AP Alt level. I have two codes; one for in climb, the other for in descent. How can I get them to work together? I believe I need an 'or' statement (||) somewhere. I have tried many variables of code with no luck :-(Climb Code:(L:ALT_ACQ, bool) 1 == (A:Indicated altitude, feet) (A:Autopilot altitude lock var, feet) 250 - > & if{ 0 (>L:ALT_ACQ, bool) }Descent Code:(L:ALT_ACQ, bool) 1 == (A:Indicated altitude, feet) (A:Autopilot altitude lock var, feet) 250 + < & if{ 0 (>L:ALT_ACQ, bool) }(Edit)Is there a 'Pitch Hold' function in FS, or is it possible to implement one? I have looked through the K:events list, and found nothing that I think I could use...Thanks for any suggestions!Andrewhttp://ftp.avsim.com/dcforum/User_files/3dcea7ac62881935.jpg

Share this post


Link to post
Share on other sites
Guest

Sorry, don't have the time to look deep into your code at the moment, but it looks like it could be used as some sort of altitude alerter.Here is a visible tag I use to alert me 1000 and 300 feet above or below selected altitude.:(A:Autopilot altitude lock var, feet) (A:Indicated altitude, feet) - abs d 300 >= r 1000 <= &&I'm not sure if there exist a pitch hold. Althought cumbersome to make, I'm sure it should be possible to implement it by calculating a climb/descent rate vs speed vs weight, overriding the alt_hold and vert_speed displays etc etc. Most possibly not even worth the trouble.

Share this post


Link to post
Share on other sites
Guest AndrewW

Hi Karl, Thanks for your help - the alt alert code is very helpful, I believe I can use the same structure to implement the system I wish to design. Also thanks for the suggestions on pitch hold - will keep those for a rainy day ;-) Although maybe, with the weather we've been getting in the UK for the last few weeks, a sunny one! :-rollRegards,Andrewhttp://ftp.avsim.com/dcforum/User_files/3dcea7ac62881935.jpg

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