All Projects → kuznetsovin → egts-protocol

kuznetsovin / egts-protocol

Licence: GPL-3.0 license
EGTS protocol receiver write on Golang

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to egts-protocol

zubax gnss
Zubax GNSS module
Stars: ✭ 45 (+55.17%)
Mutual labels:  gps, glonass
nmea
NMEA 0183 parser
Stars: ✭ 13 (-55.17%)
Mutual labels:  gps, glonass
roam-reactnative
React Native Location SDK. High accuracy and battery efficient location SDK for iOS and Android by Roam.ai
Stars: ✭ 20 (-31.03%)
Mutual labels:  gps
pyubx2
Python library for parsing and generating UBX GPS/GNSS protocol messages.
Stars: ✭ 49 (+68.97%)
Mutual labels:  gps
traccar-api-php
Traccar API - PHP API Implementation
Stars: ✭ 35 (+20.69%)
Mutual labels:  gps
AndroidGNSS
Code supporting raw ranges for the Android
Stars: ✭ 40 (+37.93%)
Mutual labels:  gps
telegram-nearby-map
Discover the location of nearby Telegram users 📡🌍
Stars: ✭ 329 (+1034.48%)
Mutual labels:  gps
rikitraki
This repository contains the client code of RikiTraki.com, a map-centric hiking log web application.
Stars: ✭ 16 (-44.83%)
Mutual labels:  gps
opendlv
OpenDLV - A modern microservice-based software ecosystem powered by libcluon to make vehicles autonomous.
Stars: ✭ 67 (+131.03%)
Mutual labels:  gps
gps-share
Utility to share your GPS device on local network
Stars: ✭ 49 (+68.97%)
Mutual labels:  gps
multi-sdr-gps-sim
multi-sdr-gps-sim generates a IQ data stream on-the-fly to simulate a GPS L1 baseband signal using a SDR platform like HackRF or ADLAM-Pluto.
Stars: ✭ 53 (+82.76%)
Mutual labels:  gps
Autonomous-Ai-drone-scripts
State of the art autonomous navigation scripts using Ai, Computer Vision, Lidar and GPS to control an arducopter based quad copter.
Stars: ✭ 45 (+55.17%)
Mutual labels:  gps
gnssIR python
Python scripts for GNSS interferometric reflection applications
Stars: ✭ 19 (-34.48%)
Mutual labels:  gps
Parallel.GAMIT
Python wrapper to parallelize GAMIT executions
Stars: ✭ 22 (-24.14%)
Mutual labels:  gps
Qwiic Ublox Gps Py
No description or website provided.
Stars: ✭ 38 (+31.03%)
Mutual labels:  gps
Peanuts
Peanuts is a free and open source wifi tracking tool. Based on the SensePosts Snoopy-NG project that is now closed.
Stars: ✭ 34 (+17.24%)
Mutual labels:  gps
gpx-builder
Builder of GPX files
Stars: ✭ 25 (-13.79%)
Mutual labels:  gps
node-nmea
Parser for NMEA sentences.
Stars: ✭ 23 (-20.69%)
Mutual labels:  gps
CoronaTracker
A full stack framework to trace possible close-contact candidates within last specified days for an already detected covid-19 positive patient
Stars: ✭ 13 (-55.17%)
Mutual labels:  gps
spider
A powful outdoor GPS track editor
Stars: ✭ 15 (-48.28%)
Mutual labels:  gps

EGTS receiver

EGTS receiver server realization writen on Go.

Library for implementation EGTS protocol that parsing binary packag based on GOST R 54619 - 2011 and Order No. 285 of the Ministry of Transport of Russia dated July 31, 2012. Describe fields you can find in these documents.

More information you can read in article (Russian).

Server save all navigation data from EGTS_SR_POS_DATA section. If packet have several records with EGTS_SR_POS_DATA section, it saves all of them.

Storage for data realized as plugins. Any plugin must have [store] section in configure file. Plugin interface will be described below.

If configure file has't section for a plugin ([store]), then packet will be print to stdout.

Install

git clone https://github.com/kuznetsovin/egts-protocol
cd egts-protocol
make

Run

./bin/receiver -c config.yaml

config.yaml - configure file

Docker

Build image

make docker

Start container:

docker run --name egts-receiver egts:latest

Start container with custom port and config:

docker run --name egts-receiver -v ./configs:/etc/egts-receiver -p 6000:6000 egts:latest

Example docker-compose:

version: '3'

services:
  redis:
    image: redis:latest
    container_name: egts_redis

  egts:
    image: egts:latest
    container_name: egts_receiver
    ports:
      - "6000:6000"

    volumes:
      - ./configs:/etc/egts-receviver/

Config format

host: "127.0.0.1"
port: "6000"
con_live_sec: 10
log_level: "DEBUG"

storage:

Parameters description:

  • host - bind address
  • port - bind port
  • conn_ttl - if server not received data longer time in the parameter, then the connection is closed.
  • log_level - logging level
  • storage - section with storage configs. (see example)

Usage only Golang EGTS library

Example for encoding packet:

package main 

import (
    "github.com/kuznetsovin/egts-protocol/libs/egts"
    "log"
)

func main() {
    pkg := egts.Package{
    		ProtocolVersion:  1,
    		SecurityKeyID:    0,
    		Prefix:           "00",
    		Route:            "0",
    		EncryptionAlg:    "00",
    		Compression:      "0",
    		Priority:         "11",
    		HeaderLength:     11,
    		HeaderEncoding:   0,
    		FrameDataLength:  3,
    		PacketIdentifier: 137,
    		PacketType:       egts.PtResponsePacket,
    		HeaderCheckSum:   74,
    		ServicesFrameData: &egts.PtResponse{
    			ResponsePacketID: 14357,
    			ProcessingResult: 0,
    		},
    	}
    
    rawPkg, err := pkg.Encode()
	if err != nil {
		log.Fatal(err)
	}
    
    log.Println("Bytes packet: ", rawPkg)
}

Example for decoding packet:

package main 

import (
    "github.com/kuznetsovin/egts-protocol/libs/egts"
    "log"
)

func main() {
    pkg := []byte{0x01, 0x00, 0x03, 0x0B, 0x00, 0x03, 0x00, 0x89, 0x00, 0x00, 0x4A, 0x15, 0x38, 0x00, 0x33, 0xE8}
    result := egts.Package{}

    state, err := result.Decode(pkg)
    if err != nil {
 		log.Fatal(err)
 	}
    
    log.Println("State: ", state)
    log.Println("Package: ", result)
}

Store plugins

That create a new plugin you must implement Connector interface:

type Connector interface {
	// setup store connection
	Init(map[string]string) error
	
	// save to store method
	Save(interface{ ToBytes() ([]byte, error) }) error
	
	// close connection with store
	Close() error
}

All plugins available in store folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].