Giter VIP home page Giter VIP logo

tetra-sds's Introduction

tetra-sds

Tetra Advanced Radio Digital Information System

T.A.R.D.I.S (I wanted it to spell TARDIS OK.)

Decodes Tetra Terrestrial Trunked Radio Time and Location Data in Time and Space...

Based on the ETSI Standard: https://www.etsi.org/deliver/etsi_ts/100300_100399/1003921801/01.03.01_60/ts_1003921801v010301p.pdf

Overview

Tetra is a digital two-way radio standard, used not only for voice but for Short Data Services (SDS) as well. This project is a python implementation for decoding said data.

Usage

Input the SDS data as a hex string or raw binary, outputs a dictionary with location, velocity, direction and time information. Data can be from a database binary blob, a text file, csv or directly from a Tetra Air Interface API.

import tetra-sds.decode as decode

data = decode.sds(hex_string)
print(data)

Then get the values from the returned dictionary, print it to get the layout.

latitude = data['location']['latitude']['decimal_degrees']
longitude = data['location']['longitude']['decimal_degrees']
speed = data['velocity']['kmh']

# ...etc.

It also may be of benifit to sort by epoc (ascending)

locations = sorted(locations, reverse=False, key=lambda k: k['time']['epoc']) 

Do what you wish with this data, such as create a list of lat,lon tuples or convert it into a geojson.

path = [ (pos['location']['latitude']['decimal_degrees'], pos['location']['longitude']['decimal_degrees']) for pos in locations ]

Design

The various data types are matched in the "lookup.py" file.

Processed data is stored in dictionaries. Those dictionaries are then combined into the "master" dictionary.

tetra-sds's People

Contributors

ben0p avatar bengorham avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.