This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
index.html
58 lines (58 loc) · 2.18 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<h1>AIS API</h1>
<p>I looked for a free API solution to access machine readable AIS Data. This solution uses the free web solutions to crawl the data and returns them in json.</p>
<h2>How to use</h2>
<p>This is a nodejs web app.</p>
<h3>Paths</h3>
<h4>/getLastPosition/:mmsi</h4>
<p>Takes position from MT and from VT and returns the newest
example: <a href="/getLastPosition/211281610">http://host:port/getLastPosition/211281610</a></p>
<h4>/getLastPositionFromVF/:mmsi</h4>
<p>Returns position from VF
example: <a href="/getLastPositionFromVF/211281610">http://host:port/getLastPositionFromVF/211281610</a></p>
<h4>/getLastPositionFromMT/:mmsi</h4>
<p>Returns position from MT
example: <a href="/getLastPositionFromMT/211281610">http://host:port/getLastPositionFromMT/211281610</a></p>
<h4>/getVesselsInArea/:area</h4>
<p>Returns all vessels in area, defined by a list of area keywords
example: <a href="/getVesselsInArea/WMED,EMED">http://host:port/getVesselsInArea/WMED,EMED</a></p>
<pre><code class="language-Javascript">[{
name: vessel.SHIPNAME,
id: vessel.SHIP_ID,
lat: Number(vessel.LAT),
lon: Number(vessel.LON),
timestamp: vessel.LAST_POS,
mmsi: vessel.MMSI,
imo: vessel.IMO,
callsign: vessel.CALLSIGN,
speed: Number(vessel.SPEED),
area: vessel.AREA_CODE,
type: vessel.TYPE_SUMMARY,
country: vessel.COUNTRY,
destination: vessel.DESTINATION,
port_current_id: vessel.PORT_ID,
port_current: vessel.CURRENT_PORT,
port_next_id: vessel.NEXT_PORT_ID,
port_next: vessel.NEXT_PORT_NAME,
},…]
</code></pre>
<h4>/getVesselsInPort/:shipPort</h4>
<p>Returns all vessels in a port, named after the MT nomenclature
example: <a href="/getVesselsInPort/piraeus">http://host:port/getVesselsInPort/piraeus</a><br>
Output format identical to <b>getVesselsInArea</b></p>
<h2>Install on local machine</h2>
<p>Requirements: npm & nodejs.</p>
<ol>
<li>
<p>clone this repo</p>
</li>
<li>
<p>run <code>npm install</code></p>
</li>
<li>
<p>run <code>node index.js</code></p>
</li>
</ol>
<h2>Deploy to heroku</h2>
<p>This application can be easily deployed to heroku, simply install the heroku cli and run the following commands:</p>
<p><code>heroku create</code></p>
<p><code>git push heroku master</code></p>