Codec: Difference between revisions

From Teltonika Telematics Wiki
Line 37: Line 37:
*''Priority''
*''Priority''


[[Image:q.png|codec id.png]]
 
{| class="wikitable"
{| class="wikitable"
|-
|-

Revision as of 13:08, 30 October 2018

Introduction

A codec is a device or computer program for encoding or decoding a digital data stream or signal. Codec is a portmanteau of coder-decoder. A codec encodes a data stream or a signal for transmission and storage, possibly in encrypted form, and the decoder function reverses the encoding for playback or editing.


Codec ID table

codec id.png


Codec 8

  • AVL data packet

Because the smallest information amount that can be written is one bit, there can be some bits left unused when result is byte array. Any unused bits should be left blank.

Below table represents AVL data packet structure.

codec id.png

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

codec id.png

Timestamp – difference, in milliseconds, between the current time and midnight, January 1, 1970 UTC

  • Priority


0 Low
1 High
2 Panic


  • GPS Element


Longtitude Latitude Alitude Angle Stellites Speed
4 bytes 4 bytes 2 bytes 2 bytes 1 bytes 2 bytes

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 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.