LdDl / go-egts

EGTS (Era Glonass Telematics Standard) parsing via Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-egts GoDoc Sourcegraph Go Report Card GitHub tag Build Status

EGTS (Era Glonass Telematics Standard) parsing via Golang

Table of Contents

About

This package provides parser for EGTS packets.

What is EGTS? This abbreviation stand for Era Glonass Telematics Standard.

This is standart protocol (over TCP) for Russian global navigation system. You can read description about it here: https://docs.cntd.ru/document/1200095098 (it's on Russian obviously).

You can check docs_rus folder for deailed workflow of packet sample.

PR's are welcome!

Installation

Simple.

go get github.com/LdDl/go-egts

Usage

See cmd directory of this library for examples.

  • Start server

    go run cmd/egts_server/main.go
  • Start client

    go run cmd/egts_client/main.go

After you start both server and client, you should see something like this

  • client side

    go run egts_client/main.go
    2021/12/16 21:18:15 Response code: {0 0      0 0 0 0 0 0 0 0 0 <nil> 0 0}
    2021/12/16 21:18:15 Packet: {1 0 00 11 0 00 0 11 0 16 1 0 0 0 0 245 0xc0000040c0 4587 0}
  • server side

    go run egts_server/main.go
    2021/12/16 21:18:08 Accept connection on port 8081
    2021/12/16 21:18:15 Calling handleConnection for remote address: [::1]:50840
    2021/12/16 21:18:15 PosData is:
            OID: 825791382 | Longitude: 48.362186 | Latitude: 54.287315 | Time: 2021-12-16 21:18:15.1412741 +0300 MSK m=+7.036938801
    2021/12/16 21:18:15 Result code has been sent to '[::1]:50840'

Tests

Run following command for testing library:

go test ./egts/packet_test/
go test ./egts/subrecord_test/

Support

If you have troubles or questions please open an issue.

License

It's MIT. You can check it here

About

EGTS (Era Glonass Telematics Standard) parsing via Golang

License:MIT License


Languages

Language:Go 100.0%