Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 28-08-2017, 15:17   #1
Registered User

Join Date: Aug 2017
Posts: 4
Plot GPS points from web source?

Hi OpenCPNers,

How are you? I'm interested in using OpenCPN, and was wondering if this software can open up a file from a web site (GPX or KML) with gps points (markers) and overlay them on a chart.

Since the online file will be updated every 5 minutes with new markers, can OpenCPN automatically refresh its display in real time in order to show all the markers as the online file gets updated?

Thanks!
capolaris09 is offline   Reply With Quote
Old 28-08-2017, 19:21   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,633
Images: 2
Re: Plot GPS points from web source?

The answer I believe is yes. See VentureFarther website.

Website
https://www.venturefarther.com/

Thread:
http://www.cruisersforum.com/forums/...in-189029.html
rgleason is offline   Reply With Quote
Old 30-08-2017, 04:04   #3
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Plot GPS points from web source?

Quote:
Originally Posted by capolaris09 View Post
Hi OpenCPNers,

How are you? I'm interested in using OpenCPN, and was wondering if this software can open up a file from a web site (GPX or KML) with gps points (markers) and overlay them on a chart.

Since the online file will be updated every 5 minutes with new markers, can OpenCPN automatically refresh its display in real time in order to show all the markers as the online file gets updated?

Thanks!
O understands how to import GPX files and convert to a route. There is a import file dialog box for this feature.

But it does not know how to download GPX files from a user defined web site. What you can do is write a plugin similar to the Venture Farther plugin to automatically import the new GPX file into the routes and waypoints database. I think this would require a few changes to the base program (not hard) and some nifty plugin code writing. The plugin API knows how download files using Curl. That's what the chart downloader uses. So the hard part is already there.

Alternatively, one could write a separate program (or shell script) to periodically download the GPX files. Then a very simple plugin could inform O to import the new GPX files silently. This would probably be the easiest and fastest way.

Once the waypoints are imported they will show up in their correct geo location on the chart. O recently had an update to address slow performance with hundreds or a few thousand waypoints. If you plan to import many thousands of waypoints in a small area there could be performance issues again. We would have to test on some of the weaker CPU platforms.

But first, explain more what exactly you want to do. Maybe there is another already existing solution.
transmitterdan is offline   Reply With Quote
Old 30-08-2017, 07:31   #4
Registered User

Join Date: Aug 2017
Posts: 4
Re: Plot GPS points from web source?

Thanks guys for your valuable inputs!

@Transmitterdan - I think you are right… the easiest thing might be to just have a shell script to pull down the data, and then have a simple plugin to instruct O to update its display. Btw, I'm only planning on displaying a handful of points (less than 100).

Although it would be completely new to me, I would definitely be interested in trying to put together a super simple plugin that would tell O to open a gpx file every x minutes.

Could you & others please provide me with some sample (and simple if possible) plugins that might be relevant to what I'm trying to achieve? Would I be able to open the scripts with a text editor?

Thank you so much again!
capolaris09 is offline   Reply With Quote
Old 30-08-2017, 08:02   #5
Registered User

Join Date: Aug 2017
Posts: 4
Re: Plot GPS points from web source?

sorry... forgot to explain some more what I'd like to do.

Basically, there will be nearby vessels that I would like to monitor “live” on the chart as they are moving. For this, their locations will be saved automatically into a single gpx file (will do so in the computer). This gpx file will be overwritten every 2 minutes, and it will contain all the vessel location points available until at that point in time. Thus, I would like to see how the vessels are moving as they are overlaid over the marine chart.
capolaris09 is offline   Reply With Quote
Old 30-08-2017, 14:22   #6
Registered User

Join Date: May 2012
Posts: 1,205
Re: Plot GPS points from web source?

If you go the plugin route vdr_pi shows a timer at work doing stuff. vfkaps shows an API getting data from a web server. Interesting!

Mike
Rasbats is offline   Reply With Quote
Old 31-08-2017, 05:02   #7
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Plot GPS points from web source?

Capolaris,

What you describe is how AIS works. If a boat sends its AIS position message to OpenCPN then it will draw the present location of the boat on the chart and update it after each new message is received. It will also draw the historical track of each vessel. When the mouse is placed over the vessel's location a popup text shows the name of the vessel and other vital information such as course and speed. There is also a list report feature that shows all vessels.

So all you really need to do is write a script that downloads the new position data, converts that to NMEA AIS messages and sends the messages to OpenCPN via a socket connection. All the drawing and tracking is already done for you as a built in feature of the program

Look in my github repository for VDRplayer and AISconverter. These python programs do about 90% of what you need. AISconverter will read a text file containing information about a vessel and convert that to the cryptic AIS format. VDRplayer will send the messages to OpenCPN. Both can be called from a script in either Windows or Linux. They should work on MAC too but i cannot test that.
transmitterdan is offline   Reply With Quote
Old 31-08-2017, 05:36   #8
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,740
Re: Plot GPS points from web source?

The NMEA TTM and TLL sentences might be another option.
These are sentences used with Radar targets, but can be "abused" for this purpose.

They will be treated like AIS target, the NMEA format is perhaps easier.

The server would just need to send the target data and with tracks enabled you should get what you want.

Code:
xxTTM - Tracked Target Message
Target Number (0-99)
Target Distance
Bearing from own ship
Bearing Units
Target Speed
Target Course
Course Units
Distance of closest-point-of-approach
Time until closest-point-of-approach “-” means increasing
“-” means increasing
Target name
Target Status
Reference Target

xxTLL - Target Latitude and Longitude
Target Number (not used/ignored)
Latitude
Longitude
Name
Status
Reference Target (not used/ignored)
bcn is offline   Reply With Quote
Reply

Tags
gps


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPS Anchor Plot noelex 77 Marine Electronics 3 04-12-2012 04:09
What Do People Use to Plot Routes ? littlebigfred Navigation 33 10-06-2010 06:32
Convicted in Plot to Kill Couple for Yacht Sentenced to Life Terms knottybuoyz Cruising News & Events 47 07-05-2009 04:53
Do you plot,or not? Stede Marine Electronics 4 16-10-2003 10:04

Advertise Here


All times are GMT -7. The time now is 21:06.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.