Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 17-10-2015, 01:52   #1
Registered User

Join Date: Aug 2015
Posts: 17
Accessing waypoints from plugin development

Hi,

I have a nice little plugin under development. However, I have run into a problem accessing waypoints. I can call up individual waypoints by GUID (once I have it) and I can see the implementation of the linked list of waypoints defined by macro in the plugin header.
The problem is that I cannot see any function to return me a pointer to the internally maintained Plugin_WaypointList.

Is there a function I am missing or is this just not possible. I see squidd.io maintains its own list.

Cags
Cags is offline   Reply With Quote
Old 17-10-2015, 05:41   #2
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,418
Re: Accessing waypoints from plugin development

I think what you desire isn't implemented yet as no plugin did that.
seandepagnier is offline   Reply With Quote
Old 17-10-2015, 15:47   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,651
Images: 2
Re: Accessing waypoints from plugin development

You should probably make a request to change the Plugin API accordingly.
To do this you should register on Tracker
OpenCPN::Tracker Register new user
and enter a Task under "Plugin System" see the dropdown menu on the upper left.
OpenCPN::Tracker Plugin System: Tasklist

What are you trying to do with the plugin?
rgleason is offline   Reply With Quote
Old 18-10-2015, 02:35   #4
Registered User

Join Date: Aug 2015
Posts: 17
Re: Accessing waypoints from plugin development

I'll do that thanks.
The plugin is a race management system along the line of expedition and decman. At the moment it handles starts and laylines. Routing is next.
I'd like to use as much of the built in functionality as possible though.
Cags is offline   Reply With Quote
Old 18-10-2015, 02:54   #5
Registered User

Join Date: Apr 2006
Posts: 4,413
Re: Accessing waypoints from plugin development

I did a hard reset and lost all the saved waypoints... And you know what? It didn't matter. It takes a couple of seconds to program a wayppoint and several orders of magnitude longer to reach it.

Now if you have a tricky passage in a channel with turns and bends you might need to take a few minutes in advance to program this. That would be prudent and useful. Practically speaking... waypoint, libraries are hardly necessary...

I've never understood all the hoopla about waypoint libraries and route libraries.

Is Google working on a google sailboat? Oh Boy!
Sandero is offline   Reply With Quote
Old 18-10-2015, 03:06   #6
Registered User

Join Date: Aug 2015
Posts: 17
Re: Accessing waypoints from plugin development

Sandero - I think you've missed the point. But then I'd say the amount of things you don't understand would fill a library. Stick to the basics mate.
Cags is offline   Reply With Quote
Old 18-10-2015, 04:58   #7
Registered User

Join Date: Apr 2006
Posts: 4,413
Re: Accessing waypoints from plugin development

Thank you for the kind comment. I dare say I have passed the basics a long time ago...

I may have missed the point of the thread but as it mentioned "waypoints' and these are often stored in plotter memory... I thought I would offer my 30+ years of experience "using" waypoints.
Sandero is offline   Reply With Quote
Old 18-10-2015, 06:03   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,651
Images: 2
Re: Accessing waypoints from plugin development

Cags
Quote:
The plugin is a race management system along the line of expedition and decman. At the moment it handles starts and laylines. Routing is next.
I'd like to use as much of the built in functionality as possible though.
I am very interested in this effort, and I would like to help with testing at some point where you think it would be useful.

You may know that there are some other related efforts by Big Tom Sailing Dashboard to get good performance sailing data readily available, and Dave Coweld has a TacknLayline plugin that works under linux and almost works under windows, but crashes last time I tried it.

You may already be aware that there are other excellent related plugins such as Weather_routing by Sean and Polar_pi by Konni enhanced and improved by Ptulp. Polauto is an excellet windows program for obtaining polars for your boat.

There seems to be a lot happening with sailing focused plugins which is great. Perhaps someday well will have a coordinated Sailing Suite.
rgleason is offline   Reply With Quote
Old 18-10-2015, 06:45   #9
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,404
Re: Accessing waypoints from plugin development

cags...

See the tracker, I posted a comment.
Dave
bdbcat is offline   Reply With Quote
Old 18-10-2015, 06:51   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,651
Images: 2
Re: Accessing waypoints from plugin development

Thank you Bdcat!
FS#1875 : waypont list
rgleason is offline   Reply With Quote
Old 20-10-2015, 07:52   #11
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,404
Re: Accessing waypoints from plugin development

Cags...

Implemented, in github now.

Thanks for the suggestion.
Dave
bdbcat is offline   Reply With Quote
Old 20-10-2015, 23:45   #12
Registered User

Join Date: Aug 2015
Posts: 17
Re: Accessing waypoints from plugin development

Thanks Dave,

I see that OK. Our mini-routines differed by one word - so I feel confident I'm getting the hang of OpenCPN's codebase and construction.

Next feature request, I'll try and write and submit - now to get the hang of Git.

Cags
Cags is offline   Reply With Quote
Old 21-10-2015, 10:51   #13
Registered User

Join Date: Aug 2015
Posts: 17
Re: Accessing waypoints from plugin development

Dave (or anyone),

I have found a couple omissions in the GetSingleWaypoint and UpdateSingleWaypoint functions in the pluginmanager.

Rather than annoying everyone every time I have one of these, is there a quick routine I can run through to fix these and submit them with a minimum of fuss.

I have a build environment according to the site instructions with a GIT cloned master - but I'm new to 'all thangs GIT'.

Thanks!

Cags
Cags is offline   Reply With Quote
Old 21-10-2015, 14:29   #14
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,212
Re: Accessing waypoints from plugin development

Cags...
Do you have cloned the repository on github already? If not, login to github, go to https://github.com/OpenCPN/OpenCPN and hit the "Fork" button.
Then add your fork to your locat git repository using something (depending on you username) like
Code:
git remote add cags https://github.com/cags/OpenCPN.git
(or better use SSH so that you don't have to type the username and password every time you push, more on that at https://help.github.com/articles/set-up-git/) Make your changes to the codebase
Commit them using something like
Code:
git commit -a -m "My change description"
Push to your github fork
Code:
git push cags master
go to https://github.com/cags/OpenCPN and create a pull request against the main repository
  • https://git-scm.com/book/en/v2 is essential reading
  • Keep the code changes to the minimum addressing the particular problem, if you need to make more unrelated changes at a time, create a separate branch for each
  • Avoid tabs, use spaces for indentation
  • Use *nix line endings (LF)
  • If anything is not clear, feel free to ask
Pavel
nohal is offline   Reply With Quote
Old 21-10-2015, 15:09   #15
Registered User

Join Date: Aug 2015
Posts: 17
Re: Accessing waypoints from plugin development

Thanks Pavel,

I've followed your instructions to the letter and can positively say, I've no idea what I was doing. Anyway, Let me know if anyone can see any change requests.

Thanks

Cags
Cags is offline   Reply With Quote
Reply

Tags
men, plug


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
OpenCPN PlugIn Development bdbcat OpenCPN 161 04-09-2019 12:50
APRS Plugin Development alawatsakima OpenCPN 8 21-09-2015 12:21
Plugin Development Question pelle2004 OpenCPN 3 04-07-2012 01:00
New Plugin Development on Linux globalkeith OpenCPN 5 03-05-2012 07:16
Accessing Your Cash in the Bahamas and Caribbean ianlgv Liveaboard's Forum 14 16-11-2010 10:46

Advertise Here


All times are GMT -7. The time now is 04: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.