Cruisers & Sailing Forums (https://www.cruisersforum.com/forums/)
-   OpenCPN (https://www.cruisersforum.com/forums/f134/)
-   -   Pluggin tracker? (https://www.cruisersforum.com/forums/f134/pluggin-tracker-176831.html)

pa36651 07-12-2016 11:51

Pluggin tracker?
 
I would like a pluggin that work as a tracker for other boats during racing etc.
The idea is that a OCPN pluggin read data from a webserver. On the webserver boat data (GPRMC) is stored in a SQL-DB (eventID, boat name, time, date, speed, course).
The webserver SQL-DB get the data from a mobile phone with any OPENGTS-compatible app up and running.
Every boat joining a race (or similar) has the phone activated during the race. Everyone with OCPN+pluggin and eventID available can follow the race.
Wish list:
1. All boats shown in OCPN.
2. Boat name visible (option toggle on/off).
3. Tracking visible for all boats (option toggle on/off).
4. Optional speed/course in a info window when boat when mouse over.

The config of the pluggin must include:
5. URL for webserver.
6. Start date.
7. Start time
8. eventID.
9. time interval between data collection.
10. Own boat name (since it shall not be plotted in own OCPN window).

I have a webserver up and running for data collection, and also a viewer.
URL: www.durodrive.com

I would like to code the pluggin, but I'm total novice in coding.

/Petter

transmitterdan 11-12-2016 11:36

Pluggin tracker?
 
Simplest thing is to convert the data to AIS NMEA format and send to OpenCPN via TCP/IP. No plugin required as O already displays track and other info for AIS targets.

rgleason 11-12-2016 18:23

Re: Pluggin tracker?
 
What a great idea.
I agree with TDan, convert the data to Nmea 0183 AIS sentences to be compatible with OpenCPN. The AIS format and OpenCPN's handling of AIS is built for this type of application.

However won't there need to be a plugin to connect to the website and create the data connection? Just as the plugin Squiddio downloads data from the internet?
In fact, that might be a good example to look at for coding.

rgleason 13-12-2016 10:05

Re: Pluggin tracker?
 
Might need an easy way to turn off normal AIS nmea in, which is done at the menubar AIS or in options - connections, and still have the race ais via internet showing.

rgleason 13-12-2016 10:08

Re: Pluggin tracker?
 
Yes TDan as usual, you're right, Tcp/ip connection will do it, just like the San Franciso AIS over the internet ..

Rasbats 13-12-2016 15:03

Re: Pluggin tracker?
 
Had no luck with the ip address but "ais.exploratorium.edu" port 80 got me a San Francisco feed.

Mike

ok, found it ... 192.174.2.16 works.

pa36651 20-12-2016 01:41

Re: Pluggin tracker?
 
SanFransisco solution seems to be simple. I will try ta make an output on durodrive.com according to AIS standard. I will need ta make fake MMSI.... hopefully O does support that.

transmitterdan 21-12-2016 06:48

Pluggin tracker?
 
pa,

You can look at my AIS converter Python script. It creates the proper NMEA data that OpenCPN requires. Look on github.com/transmitterdan

Baikal 23-12-2016 03:20

Re: Pluggin tracker?
 
It can have an idea how to relate to the Swedish open source gpsgate server monitoring server?

transmitterdan 23-12-2016 06:56

Re: Pluggin tracker?
 
Quote:

Originally Posted by Baikal (Post 2286098)
It can have an idea how to relate to the Swedish open source gpsgate server monitoring server?

I think this might be an interesting project. In principle this should be something that can work. AIS tracking needs a text vessel name, coordinate, speed and heading. I think this data is available from gpsgate server. Gpsgate has an NMEA output via UDP among its choices. If it sends the required data in NMEA format then my Python script could be modified to translate that to AIS messages and send them to OpenCPN. In this way gpsgate vehicles could be shown in OpenCPN.

Does anyone have an NMEA output sample from gpsgate or can tell me how to get one?

Baikal 23-12-2016 09:17

Re: Pluggin tracker?
 
We need to write to the technical support support@gpsgate.com and learn from them as much as possible to capture the NMEA sentences.
If I have GPSgate server for testing

transmitterdan 23-12-2016 12:07

Re: Pluggin tracker?
 
Over next days i will set up a gpsgate test server and report back what I learn.

nkiesel 24-12-2016 17:13

Re: Pluggin tracker?
 
For offshore races, bandwidth and allowed data sources are often severely limited. Thus would be good to have a generic API that can be fed from different sources. For this years PacCup we got daily position updates and could download positions updated every 4 hours from Yellow Brick side. We used airmail's web-to-email conversion to get them as text files.

nkiesel 26-12-2016 03:37

Re: Pluggin tracker?
 
another problem with using AIS NMEA like TLL is that these only have time but not date. Therefore, it seems we could not add information that is more than 24 hours old.

Another problem is that the whole AIS data assumes that a record received after another record is always newer. This would not be the case if positions are assembled from multiple sources (e.g. "real" AIS when competitor is close, and historic data from data upload).

Perhaps it would be better to create regular tracks and feed then from both AIS and the data upload?

nkiesel 27-12-2016 00:28

Re: Pluggin tracker?
 
I started working on a "fleet" plugin. Goals are

- has multiple sources for data
- AIS (via plugin message from AIS decoder)
- web (URL with scheduled download)
- files (watching directory for new files)

- creates tracks from that data
- use boat name (or MMSI?) as track name / GUID
- update tracks whenever new positions are available
- add rollover message for tracks (similar to what is done for AIS and routes), showing boat name (and AIS info if available)

stretch goals:
- pick different colors for the tracks
- render a boat icon (perhaps steal from AIS draw?)
- grouping of tracks into divisions
- time slider showing historic positions

So far I have a plugin that creates a hard-coded track when it's enabled. Next step will be web (downloading and parsing expedition format from ybtracking.com)


All times are GMT -7. The time now is 01:54.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.


ShowCase vBulletin Plugins by Drive Thru Online, Inc.