Jump to content
Sign in to follow this  
FrankFasi

Gauge variable help please

Recommended Posts

Here's the variable I'm working on. It returns the current heading just fine, but what I'd like is for it to always return the reciprocal heading. For example, if I'm flying a heading of 90, I would like this gauge to show me "270", the reciprocal. Here's my current string from the gauge element in question:%((A:PLANE HEADING DEGREES GYRO,degrees))%!03d!Any ideas are welcome. Thanks.

Share this post


Link to post
Share on other sites

Add 180, then the string becomes:%((A:PLANE HEADING DEGREES GYRO,degrees) abs 180 +)%!03d!The ABS is to make sure that an absolute value is given.


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites
Add 180, then the string becomes:%((A:PLANE HEADING DEGREES GYRO,degrees) abs 180 +)%!03d!The ABS is to make sure that an absolute value is given.
Remember to normalize it too.. HDG 350 + 180 = 530 normalize will make it 170%((A:PLANE HEADING DEGREES GYRO,degrees) abs 180 + dnor)%!03d!Roman

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

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