Hello
I am trying to write latitude to offset 0x0560 but I am having problems.
I am doing:
fsuipc_wrapper.WriteData(0x0560, 8, ByteBuffer.allocate(8).putLong(Double.doubleToLongBits((3.0/90.0)*(10001750.0*65536.0*65536.0))).array()); //Latitude is 3º (I want to set my aircraft at 3º), hardcoded for the moment
The operation
(3.0/90.0)*(10001750.0*65536.0*65536.0)
returns 1.4319063050922668E15 wich is the correct value to send to FS. (I think)
But the data received by FS is -4.2718529980465152E16 (getting the latitude after the data sent with the following:)
double d = (double)getLong(0x0560); //The class is extending FSUIPC
Does anybody see my problem?
Thanks.
Why is this?