Hi,
I got a new question to you all
If I have 8 single bytes in HEX like 00 00 00 40 A6 54 58 41 how can I convert this to double floating point which mean I should have an answer which looks like this; 6378137.000000. I thought the max on both sides of the "." should be 65535 4 bytes but I can see that is not the case?
I did try the shown sample but the answer is wrong as I test the reply from another software that works;
Val("&H" & Mid$(sGTData, 45, 8)) & "." & Val("&H" & Mid$(sGTData, 53, 8))
where sGTData is a long HEX string and I then read from position 45 4 bytes and position 53 4 bytes (in HEX).
The answer should be 6378137.000000 but I get 64.-1504421823 where the first value is 00000040 and the second A6545841 in HEX. I can se that HEX 40 is 64 but how can the answer be 6378137.000000? Any ideas out there?
I got a new question to you all
If I have 8 single bytes in HEX like 00 00 00 40 A6 54 58 41 how can I convert this to double floating point which mean I should have an answer which looks like this; 6378137.000000. I thought the max on both sides of the "." should be 65535 4 bytes but I can see that is not the case?
I did try the shown sample but the answer is wrong as I test the reply from another software that works;
Val("&H" & Mid$(sGTData, 45, 8)) & "." & Val("&H" & Mid$(sGTData, 53, 8))
where sGTData is a long HEX string and I then read from position 45 4 bytes and position 53 4 bytes (in HEX).
The answer should be 6378137.000000 but I get 64.-1504421823 where the first value is 00000040 and the second A6545841 in HEX. I can se that HEX 40 is 64 but how can the answer be 6378137.000000? Any ideas out there?
Comment