Changes

1,214 bytes removed ,  21:49, 4 October 2019
Line 26: Line 26:  
Below table represents AVL data packet structure.
 
Below table represents AVL data packet structure.
    +
'''Example'''
   −
{| class="wikitable"
+
Received data:
|-
  −
! style="background: white; color: #0052A1"| 4 zeros 
  −
! style="background: white; color: #0052A1"| Data field length
  −
! style="background: white; color: #0052A1"| Codec ID
  −
! style="background: white; color: #0052A1"| Number of Data 1
  −
! style="background: white; color: #0052A1"| AVL Data
  −
! style="background: white; color: #0052A1"| Number of Data 2
  −
! style="background: white; color: #0052A1"| CRC-16
  −
|-
  −
| 4 bytes || 4 bytes || 1 byte || 1 byte || 30-147 bytes || 1 byte || 4 bytes
  −
|}
     −
Number of data – number of encoded data (number of records).
  −
Codec ID is constant 08.
  −
  −
Data field length is the length of bytes [codec id, number of data 2].
  −
Number of data 1 should always be equal to number of data 2 byte.
  −
CRC-16 is 4 bytes, but first two are zeroes and last two are CRC-16 calculated for [codec id, number of data 2]
  −
Minimum AVL packet size is 45 bytes (all IO elements disabled).
  −
Maximum AVL packet size for one record is 783 bytes.
        −
*''AVL data''
+
<span style="background-color: #848484">00000000</span><span style="background-color: #A9BCF5">0000008c</span><span style="background-color: #04B45F">08</span><span style="background-color: #FF0000">01</span><span style="background-color: #9F81F7">0000013feb55ff74</span><span style="background-color: #D8D8D8">00</span><span style="background-color: #FFFF00">0f0ea850</span><span style="background-color: #FAAC58">209a6900</span><span style="background-color: #2EFE2E">0094</span><span style="background-color: #088A29">0000</span>120000<span style="background-color: #0040FF">00</span>
   −
{| class="wikitable"
+
<span style="background-color: #A9A9F5">1e</span><span style="background-color: #DF3A01">09</span>010002000300040016014703f0001504c800<span style="background-color: #DF3A01">0c</span>0900730a00460b00501300464306
|-
  −
! style="background: white; color: #0052A1"| Timestamp
  −
! style="background: white; color: #0052A1"| Priority
  −
! style="background: white; color: #0052A1"| GPS Element
  −
! style="background: white; color: #0052A1"| IO element
  −
|-
  −
| 8 bytes || 1 byte || 15 bytes || 6-123
  −
|}
      +
d7440000b5000bb60007422e9
 +
f180000cd0386ce0001<span style="background-color: #DF3A01">07</span>c700000000f10000601a4600
   −
Timestamp – difference, in milliseconds, between the current time and midnight, January 1, 1970 UTC
+
0001344800000bb84900000bb84a00000bb84c00000000<span style="background-color: #DF3A01">02</span>4e0000000000000000cf00
 
  −
*''Priority''
      +
00000000000000<span style="background-color: #FF0000">01</span><span style="background-color: #F5DA81">00003fca</span>
    +
In total 152 Bytes 
 
{| class="wikitable"
 
{| class="wikitable"
 +
| style="background: white; color: #0052A1"|
 +
4 zeros(4 bytes)
 +
| style="background: white; color: #0052A1"|
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #848484">00000000</span> 4 zeroes, 4 bytes
 +
|-
 +
| style="background: white; color: #0052A1"|
 +
Data field length(4 bytes)
 +
| style="background: white; color: #0052A1"|
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #A9BCF5">0000008c</span> data length, 4 bytes
 +
|-
 +
| style="background: white; color: #0052A1"|
 +
Codec ID(1 byte)
 +
| style="background: white; color: #0052A1"|
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #04B45F">08</span> – Codec ID
 
|-
 
|-
 
+
| style="background: white; color: #0052A1"|
 +
Number of Data 1(1 byte)
 +
| style="background: white; color: #0052A1"|
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #FF0000">01</span>    Number of Data (1 record) 1’st record data
 +
|-
 +
| rowspan="9" style="background: white; color: #0052A1"|AVL Data(30-147 bytes)
 +
| style="background: white; color: #0052A1"|Timestamp(8 bytes)
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #9F81F7">010000013feb55ff74</span> – Timestamp in milliseconds (1374042849140)
 +
GMT: Wed, 17 Jul 2013 06:34:09 GMT
 +
|-
 +
| style="background: white; color: #0052A1"|Priority(1 byte)
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #D8D8D8">00</span> – Priority
 +
|-
 +
| style="background: white; color: #0052A1" rowspan="6" | GPS Element(15 bytes)
 +
| style="background: white; color: #0052A1"|
 +
Longitude
 +
(4 bytes)
 +
| <span style="background-color: #FFFF00">0f0ea850</span>    – Longitude 252618832 = 25,2618832º N
 
|-
 
|-
| style="background: white; color: #0052A1"|0 || Low
+
| style="background: white; color: #0052A1"|
 +
Latitude
 +
(4 bytes)
 +
| <span style="background-color: #FAAC58">209a6900</span>    – Latitude 546990336 = 54,6990336 º E
 
|-
 
|-
| style="background: white; color: #0052A1"|1 || High
+
| style="background: white; color: #0052A1"|
 +
Altitude
 +
(2 bytes)
 +
| <span style="background-color: #2EFE2E">0094</span>        – Altitude 148 meters
 
|-
 
|-
| style="background: white; color: #0052A1"|2 || Panic
+
| style="background: white; color: #0052A1"|
|}
+
Angle
 
+
(2 bytes)
 
+
| <span style="background-color: #088A29">0000</span>    – Angle 0
*''GPS Element''
  −
 
  −
 
  −
{| class="wikitable"
   
|-
 
|-
! style="background: white; color: #0052A1"| Longitude
+
| style="background: white; color: #0052A1"|
! style="background: white; color: #0052A1"| Latitude
+
Satellites
! style="background: white; color: #0052A1"| Altitude
+
(1 bytes)
! style="background: white; color: #0052A1"| Angle
+
| <span style="background-color: #088A29">12</span>    – 18 Visible satellites
! style="background: white; color: #0052A1"| Satellites
  −
! style="background: white; color: #0052A1"| Speed
   
|-
 
|-
| 4 bytes || 4 bytes || 2 bytes || 2 bytes || 1 bytes || 2 bytes
+
| style="background: white; color: #0052A1"|
|}
+
Speed
 
+
(2 bytes)
X    Longitude
+
| <span style="background-color: #088A29">0000</span>    – 0 km/h speed
 
  −
Y    Latitude1
  −
 
  −
Altitude    In meters above sea level1
  −
 
  −
Angle    In degrees, 0 is north, increasing clock-wise 1
  −
 
  −
Satellites    Number of visible satellites1
  −
 
  −
Speed in km/h. 0x0000 if GPS data is invalid1
  −
 
  −
Longitude and latitude are integer values built from degrees, minutes, seconds and milliseconds by formula
  −
 
  −
[[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
  −
Converted to DEC: 547146368
  −
For more information see two‘s complement arithmetics.
  −
 
  −
 
  −
*''IO Element''
  −
 
  −
{| class="wikitable"
   
|-
 
|-
 
+
| style="background: white; color: #0052A1"|IO Element
| style="background: white; color: #0052A1"|Event IO ID || 1 byte || rowspan="8" |
+
(6-123 bytes)
<span style="background-color: #0040FF">00</span> – IO element ID of Event generated (in this case when 00 – data generated not on event)
+
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #0040FF">00</span> – IO element ID of Event generated (in this case when 00 – data generated not on event)
    
<span style="background-color: #A9A9F5">1e</span> – 30 IO elements in record (total)
 
<span style="background-color: #A9A9F5">1e</span> – 30 IO elements in record (total)
Line 178: Line 154:     
0    – IO element’s value = 0
 
0    – IO element’s value = 0
  −
|-
  −
| style="background: white; color: #0052A1"|N of Total IO || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|N1 of One Byte IO || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st IO Value || 1 byte
  −
|-
  −
| ... ||
  −
|-
  −
| style="background: white; color: #0052A1"|N1’th  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|N1’th IO Value || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|N2 of Two Bytes || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st IO Value || 2 bytes
  −
|-
  −
| |... ||
  −
|-
  −
| style="background: white; color: #0052A1"|N2’th  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|N2’th IO Value || 2 bytes
  −
|-
  −
| style="background: white; color: #0052A1"|N4 of Four Bytes || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st IO Value || 4 byte
  −
|-
  −
| |... ||
  −
|-
  −
| style="background: white; color: #0052A1"|N4’th  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|N4’th IO Value || 4 bytes
  −
|-
  −
| style="background: white; color: #0052A1"|N8 of Eight Bytes || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|1’st IO Value || 8 bytes
  −
|-
  −
| |... ||
  −
|-
  −
| style="background: white; color: #0052A1"|N8’th  IO ID || 1 byte
  −
|-
  −
| style="background: white; color: #0052A1"|N8’th IO Value || 8 bytes
  −
|}
  −
Event IO ID – if data is acquired on event – this field defines which IO property has changed and generated an event. If data cause is not event – the value is 0.
  −
  −
N    total number of properties coming with record (N=N1+N2+N4+N8)
  −
  −
N1    number of properties, which length is 1 byte
  −
  −
N2    number of properties, which length is 2 bytes
  −
  −
N4    number of properties, which length is 4 bytes
  −
  −
N8    number of properties, which length is 8 bytes
  −
  −
  −
'''Example'''
  −
  −
Received data:
  −
  −
  −
  −
<span style="background-color: #848484">00000000</span><span style="background-color: #A9BCF5">0000008c</span><span style="background-color: #04B45F">08</span><span style="background-color: #FF0000">01</span><span style="background-color: #9F81F7">0000013feb55ff74</span><span style="background-color: #D8D8D8">00</span><span style="background-color: #FFFF00">0f0ea850</span><span style="background-color: #FAAC58">209a6900</span><span style="background-color: #2EFE2E">0094</span><span style="background-color: #088A29">0000</span>120000<span style="background-color: #0040FF">00</span>
  −
  −
<span style="background-color: #A9A9F5">1e</span><span style="background-color: #DF3A01">09</span>010002000300040016014703f0001504c800<span style="background-color: #DF3A01">0c</span>0900730a00460b00501300464306
  −
  −
d7440000b5000bb60007422e9
  −
f180000cd0386ce0001<span style="background-color: #DF3A01">07</span>c700000000f10000601a4600
  −
  −
0001344800000bb84900000bb84a00000bb84c00000000<span style="background-color: #DF3A01">02</span>4e0000000000000000cf00
  −
  −
00000000000000<span style="background-color: #FF0000">01</span><span style="background-color: #F5DA81">00003fca</span>
  −
  −
In total 152 Bytes
  −
  −
  −
<span style="background-color: #848484">00000000</span> 4 zeroes, 4 bytes
  −
  −
<span style="background-color: #A9BCF5">0000008c</span> data length, 4 bytes
  −
  −
<span style="background-color: #04B45F">08</span> – Codec ID
  −
  −
<span style="background-color: #FF0000">01</span>    Number of Data (1 record) 1’st record data
  −
  −
  −
  −
<span style="background-color: #9F81F7">010000013feb55ff74</span> – Timestamp in milliseconds (1374042849140)
  −
  −
GMT: Wed, 17 Jul 2013 06:34:09 GMT
  −
  −
<span style="background-color: #D8D8D8">00</span> – Priority
  −
  −
GPS Element
  −
  −
<span style="background-color: #FFFF00">0f0ea850</span>    – Longitude 252618832 = 25,2618832º N
  −
  −
<span style="background-color: #FAAC58">209a6900</span>    – Latitude 546990336 = 54,6990336 º E
  −
  −
<span style="background-color: #2EFE2E">0094</span>        – Altitude 148 meters
  −
  −
<span style="background-color: #088A29">0000</span>    – Angle 0
  −
  −
<span style="background-color: #088A29">12</span>    – 18 Visible satellites
  −
  −
<span style="background-color: #088A29">0000</span>    – 0 km/h speed
  −
  −
IO Element
      
<span style="background-color: #DF3A01">0c</span>    – 12 IO elements, which value length is 2 Bytes
 
<span style="background-color: #DF3A01">0c</span>    – 12 IO elements, which value length is 2 Bytes
Line 384: Line 244:     
0    – IO element’s value
 
0    – IO element’s value
 +
|-
 +
| style="background: white; color: #0052A1"|Number of Data 2(1 byte)
 +
| style="background: white; color: #0052A1"|
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #FF0000">01</span>    – Number of Data (1 record)
 +
|-
 +
| style="background: white; color: #0052A1"|CRC-16(4 bytes)
 +
| style="background: white; color: #0052A1"|
 +
| style="background: white; color: #0052A1"|
 +
| <span style="background-color: #F5DA81">00003fca</span>    - CRC-16, 4 Bytes (first 2 are always zeros)
 +
|}
 +
Number of data – number of encoded data (number of records).
 +
Codec ID is constant 08.
 +
 +
Data field length is the length of bytes [codec id, number of data 2].
 +
Number of data 1 should always be equal to number of data 2 byte.
 +
CRC-16 is 4 bytes, but first two are zeroes and last two are CRC-16 calculated for [codec id, number of data 2]
 +
Minimum AVL packet size is 45 bytes (all IO elements disabled).
 +
Maximum AVL packet size for one record is 783 bytes.
 +
 +
 +
Timestamp – difference, in milliseconds, between the current time and midnight, January 1, 1970 UTC
 +
 +
*''Priority''
 +
 +
Priority level (AVL packet priority) can be:
 +
*Low Priority
 +
**Module makes an additional record with an indication that the event was caused by an I/O element change (depending on Operands configuration).
 +
*High Priority
 +
**Module makes an additional record with High priority flag and sends event packet immediately to the server using GPRS.
 +
*Panic Priority
 +
**This priority triggers same actions as High priority, but if GPRS fails, it sends an AVL packet using SMS data if SMS data sending is enabled and the number is provided in SMS/Call Settings.
 +
 +
 +
 +
*''GPS Element''
   −
<span style="background-color: #FF0000">01</span>   – Number of Data (1 record)
+
X    Longitude
 +
 
 +
Y    Latitude1
 +
 
 +
Altitude    In meters above sea level1
 +
 
 +
Angle    In degrees, 0 is north, increasing clock-wise 1
 +
 
 +
Satellites    Number of visible satellites1
 +
 
 +
Speed in km/h. 0x0000 if GPS data is invalid1
 +
 
 +
Longitude and latitude are integer values built from degrees, minutes, seconds and milliseconds by formula
 +
 
 +
[[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
 +
Converted to DEC: 547146368
 +
For more information see two‘s complement arithmetics.
   −
<span style="background-color: #F5DA81">00003fca</span>    - CRC-16, 4 Bytes (first 2 are always zeros)
      
 

Navigation menu