In article <11**********************@h48g2000cwc.googlegroups .com>,
<vo*****@hotmail.comwrote:
>... if I had a coder, ... but all I have is data:
http://sonyaexpress.com/track_log.jpg
Based upon that data, it appears that the GPS encoding is linear.
The top bit in each byte pair is not used for some reason, so
form a number as ((first hex byte pair * 2^16 / 2) + second hex byte pair).
A change of 120 (decimal) in that number represents a change of .0001
degree.
The encoding appears to be 2's complement (a smaller hex longitude is
more negative decimal). My guess is that 7FFF7FFF would encode the
least negative number, (-1/(120*1000)) degree, and that either
4000000 or 4000001 would encode the most negative, 1/(120*1000) more than
-180 degree.
I have not worked out the conversion to absolute coordinates, just
the relative changes.
The key entries to look at are #1 and #18: #1 is the most north-east
and #18 is the most south-west. That gives you the longest baseline
for finding the relative change between hex and decimal.
There is some uncertainty in the 120 figure, by about +/- 0.1
which is close enough to say "It wouldn't make any sense for them
to encode in multiples of 119.82 thousands of a degree" and so
Occamize the figure to 120 exactly.
--
If you lie to the compiler, it will get its revenge. -- Henry Spencer