Question of understanding regarding your location API

42 views
Skip to first unread message

Mario Stelzer

unread,
Nov 10, 2020, 6:42:13 AM11/10/20
to meri.digitraffic.fi
Dear ladies and gentlemen, 

I am using your API with great joy for an universitary project. But still I have some troubles of understanding:

What does the vessel location request (api/v1/locations/latest/) deliver exactly? At first, I thought it would contain all vessels which are currently located in the Finnish water regions. But after a look at the timestamps, the last message are sometimes several weeks or even months old.

So if a ship leaves the region, will the api preserve the last position of the vessel? Or only if there is no new signal received, the last signal stays in the reply even if it old.

I have also read in this topic that for a real time vessel tracking it would make more sense of using your websockets?!

Thanks a lot.

Best regards from Germany


Miika Tolonen

unread,
Nov 10, 2020, 11:50:19 AM11/10/20
to Mario Stelzer, meri.digitraffic.fi
Hi Mario



Time should something like to minutes less than current time to get latest which are online.

Miika Tolonen
Talpionmäentie 190
54260 Lappeenranta, Finland
tel. +358 40 753 8661



--
Digitraffic – Ajantasaista avointa liikennetietoa sovelluskehitykseen Suomen tie-, rautatie- ja vesiliikenteestä.
https://www.digitraffic.fi/
 
Digitraffic – Information about open data for application development from Finnish road, railway and marine.
https://www.digitraffic.fi/en/
---
Sait tämän viestin, koska olet tilannut seuraavan Google-ryhmän: meri.digitraffic.fi.
Jos haluat peruuttaa tämän ryhmän tilauksen ja sen sähköpostiviestien vastaanottamisen, lähetä sähköpostia osoitteeseen meridigitraffi...@googlegroups.com.
Jos haluat tarkastella tätä keskustelua verkossa, siirry osoitteeseen https://groups.google.com/d/msgid/meridigitrafficfi/4a444fd3-a8a0-4327-81d2-ab15e39f6f05n%40googlegroups.com.

Mario Stelzer

unread,
Nov 10, 2020, 2:16:28 PM11/10/20
to meri.digitraffic.fi
Hi Miika,

thanks for your fast help, it works well with the two additonal timestamp parameters.

For my documentation, could you tell me whether I am right with my assumptions for the use of the location-controller without any further parameters. Are all vessels preserved as long as there is no new signal containing a position outside your geofence?


Thanks

Mario

meri.digitraffic.fi

unread,
Nov 11, 2020, 2:53:55 AM11/11/20
to meri.digitraffic.fi
Hi Mario

Thank you for your question.  We only preserve the latest data and metadata for each vessel(using MMSI as identifier).  Values are not removed, so this means that all data and metadata is preserved if there is no newer values available for that ship(MMSI).
And as Miika kindly informed, you can use the from-parameter to filter only newer values.  Please note, this only filters the latest values, you can't get history with this API.

There is a bit of delay and cache on the API, so if you want to have the latest values in real time, you should consider using websockets.  More information here: https://www.digitraffic.fi/en/marine-traffic/#websocket-api

Ystävällisin terveisin / Best regards
– Digitraffic asiakastuki / Digitraffic support / Teijo –

Mario Stelzer

unread,
Nov 11, 2020, 10:12:58 AM11/11/20
to meri.digitraffic.fi
Hi again,

thanks a lot, the websocket works perfectly for my requirements.


Best regards

Mario
Reply all
Reply to author
Forward
0 new messages