Variable output question

Recommended Posts

Hello!I have a variable (A:PLANE LATITUDE, degree latitude), text output is degrees (2 numbers), and dezimal(4 numbers) for examble 44.3056My quest now, how do I get degrees (2 numbers) minutes, (2 numbers) and seconds (2 numers) ? Something like 44.30,56Can anyone help me?Yngwie

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

Hi,I don't know about your skills in XML coding, but here is a couple of my very useful macros: %((@1,degrees) s5 abs s0 int sp1 l0 l1 - 60 * s2 d int - 60 * sp3 l5 0 >= if{ 'N ' } els{ 'S ' })%!s!%(l0 int)%!2d!.%(l2 int)%!02d!.%(l3 near)%!02d!%((@1,degrees) s5 abs s0 int sp1 l0 l1 - 60 * s2 d int - 60 * sp3 l5 0 >= if{ 'E' } els{ 'W' })%!s!%(l0 int)%!3d!.%(l2 int)%!02d!.%(l3 near)%!02d!and the strings:@FLatitude(A:Plane Latitude)Will print Xdg.mn.sc where X is N or S, dg are degrees , mn are minutes and sc are seconds. @FLongitude(A:Plane Longitude)Will print Xdgr.mn.sc where X is E or W, dgr are degrees , mn are minutes and sc are seconds. If you know how to work with macros it should be a simple task to adapt this code to your own needs.Hope this helpsTomPS: Also would be a good thing to follow Steve's link :-)

Share on other sites

Hello Guys!Thank you very much! It work's "perfect"!Yngwie

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

• Tom Allensworth,
Founder of AVSIM Online

• Hot Spots

• 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!