SimulAir Posted April 3, 2011 Report Posted April 3, 2011 Hi, I'm trying to use the Lattidude and the Longitude Fsuipc offset (0560 & 0568). Both offset are a 64 bit. So in my C++ project, i have created a __int64 variable call FsLattidude and FsLongitude. I need to convert these value to obtain the Lattidude and Longitude information in N45* 50.70' W73* 46.36' type. How can i do it? I tryed to use the expression specified (#*90/(10001750*65536*65536)for Lattidude and (#*360/(65536*65536*65536*65536)) for Longitude) but i'll get an error when i'm doing the compilation of the software. The error type is the integral constante is too small. Thank you for the information.
Pete Dowson Posted April 3, 2011 Report Posted April 3, 2011 I tryed to use the expression specified (#*90/(10001750*65536*65536)for Lattidude and (#*360/(65536*65536*65536*65536)) for Longitude) but i'll get an error when i'm doing the compilation of the software. The error type is the integral constante is too small. You replace the # with your __int64 value. And use floating point, because obviously 90/(10001750*65536*65536) will be a lot less than 1 and not expressable as an integer. To make the compiler use floating point simply use numbers in floating point format, like 90.0 , 65536.0 etc. And the variable receiving the result should be floating point ("double") too unless you only want the number of degrees and no fractions. Pete
SimulAir Posted April 4, 2011 Author Report Posted April 4, 2011 Thank you, everything is working fine.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now