Sign in to follow this  
Guest yngwie

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 this post


Link to post
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 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