ais

Tries to gather the latest AIS position of a MMSI number

Usage no npm install needed!

<script type="module">
  import ais from 'https://cdn.skypack.dev/ais';
</script>

README

ais.js Build Status npm

Tries to gather the latest AIS position of a MMSI number

Installation

npm install ais

Usage

var ais = require("ais");

// pass the MMSI as first parameter
ais.get(211704920, function(pos, more) {
    console.log(pos); // prints either a lat/long array
    // [56.57469, 9.05306] or null

    console.log(more); // prints more information about the vessel
    // {course: 360, speed: 0.5, name: "TUULI"}
    // speed in knots, course in degrees
});