Changes

556 bytes added ,  15:07, 30 October 2018
Line 108: Line 108:  
Longitude and latitude are integer values built from degrees, minutes, seconds and milliseconds by formula
 
Longitude and latitude are integer values built from degrees, minutes, seconds and milliseconds by formula
   −
pic=[[Image:197.png]]
+
[[Image:197.png]]
 +
 
 +
d - Degrees
 +
 
 +
m - Minutes
 +
 
 +
s - Seconds
 +
 
 +
ms - Milliseconds
 +
 
 +
p - Precision (10000000)
 +
 
 +
If longitude is in west or latitude in south, multiply result by –1. 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
 +
Convered to DEC: 547146368
 +
For more information see two‘s compliment arithmetics.