FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

4167 questions

4739 answers

3460 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
328 views
in Vehicle tracking by anonymous
I cannot correctly calculate this coordinate. the coordinate -6.97028 approx. 

1 Answer

0 votes
by anonymous

Hello,

To determine if the coordinate is negative, convert it to binary format and check the very first bit. If it is 0, coordinate is positive, if it is 1, coordinate is negative.

Example:
Received value: 20 9C CA 80 converted to BIN: 00100000 10011100 11001010 10000000 first bit is 0, which means coordinate is positive converted to DEC: 547146368. For more information see two‘s complement arithmetic.

3F 3F 78 63 gives 00111111 00111111 01111000 01111000 which is 1061124195 in decimal.

by anonymous

how calculate -6,98847? if send 3F 3F 78 63

000000000000003308010000017E3F3F0D41003F3F7E3F172E3F3F003F00000F000000060416013F0115043F0100023F00027D023F613F3F3F000100006C7A

by anonymous 1 flag
Please provide whole data packet
by anonymous
my function is wrong, thank