
APN-046 Rev 2D
Appendix 2 Examples
EXAMPLE 1: Message 7 (INS/GPS position longitude from INSPVAS):
COMMAND: canconfig can2 enable 250k 110 80 insgps
The data rate is 250k, the base address is 0x110 and the mask is 0x0080.
OUTPUT: 1178001C19BFDBE7AEFF
1. The identifier is 117 (Base address of 0x0110 + message offset 0x07).
*117*8001C19BFDBE7AEFF
2. The number of data bytes to follow is 8
117*8*001C19BFDBE7AEFF
3. The time stamp is 001C.
1178*001C*19BFDBE7AEFF
It is in Little Endian format and must be flipped and converted to 0.1 ms as per the app note: 1C00 = 7168
x 10-1 ms = 716.8 ms. This time stamp rolls over every 1 second.
4. The longitude is 19BFDBE7AEFF .
1178001C*19BFDBE7AEFF*
The longitude is a 6 byte signed integer in Little Endian format. So that value is FFAEE7DBBF19 =
-348297380071. Then according to the app note we must multiply by 180/(239): -348297380071 * 180/
(239) = -114.038863854 degrees.
EXAMPLE 2: Message 0x0080 (INS/GPS position longitude) and 0x0100 (INS/GPS position latitude)
To get both the latitude and longitude messages coming out we must change the mask:
Longitude mask from above is 0x0080. Latitude mask from above is 0x0100. So the mask in the command
will be 0x0080 + 0x0100 = 0x0180.
COMMAND: canconfig can2 enable 250k 110 180 insgps
OUTPUT: 1178F404F8A9DBE7AEFF
1188F4044A2A87592400
1. Notice that now we get both the longitude message 117 (Base address of 0x0110 + message offset 0x07)
and latitude message 118 (Base address of 0x0110 + message offset of 0x08).
2. The time stamp for both messages is the same (since they both come from the same INSPVAS log).
1178*F404*F8A9DBE7AEFF
1188*F404*4A2A87592400
The time stamp is F404 = 126.8 ms.
3. The longitude is F8A9DBE7AEFF. The latitude is 4A2A875924000.
Page | 26 March 11, 2015