Code Monkey home page Code Monkey logo

ais_json's Introduction

ais_json

This is a simple AIS parser that reads a UDP stream from aisdispatcher parses it into JSON and posts the output via http to the aprs.fi endpoint.

requires libais: https://pypi.org/project/libais/

aprs.fi accepts the ais message in the following format:

{
 "protocol": "jsonais",
 "encodetime": "20131231235959",
 "groups": [
  {
   "path": [ { "name": "MYACCOUNT", "url": "http://www.example.com/" } ],
   "msgs": [
    {
     "msgtype": "18",
     "mmsi":123456789,
     "callsign":"C4LL5GN",
     "shipname":"MY BOAT NAME",
     "shiptype":37,
     "status":5,
     "speed":0,
     "lon":0.00000,
     "lat":0.00000,
     "course":0.0,
     "heading":0.0,
     "length":12,
     "width":2,
     "ref_front":6,
     "ref_left":1,
     "draught":1,
     "rxtime":"20131231235959"
    }
   ]
  }
 ]
}

usage:

  1. Receiving the data from the receiver: use AISDispatcher (http://www.aishub.net/ais-dispatcher) to recieve the stream on your machine.

  2. Decoding raw NMEA messages: use ais_json to decode and upload data to APRS.fi.

This code reads the AISdispatcher UCP stream, so for example, set AISDIspatcher output to PORT = 5000, IP='127.0.0.1' this script (ais_json) needs to be running in the background.

edit settings.py to include your aprs.fi account name and SeCrEtKeY

Your AIS SeCrEtKeY can be found in https://aprs.fi/account/ under "AIS password"

install

Run in the background

  • $ ./ais_json.py &

ais_json's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.