Skip to content

astuder/ais_json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ais_json

Note

This fork was updated to run with Python3. It also adds a -v command line option to show debug info.

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:https://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:https://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 with debug output

  • $ ./ais_json.py -v

Run in the background

  • $ ./ais_json.py &

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 100.0%