Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 17-10-2015, 02: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, 06:41   #2
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,802
Re: Accessing waypoints from plugin development

I think what you desire isn't implemented yet as no plugin did that.
__________________

__________________
boat_alexandra is offline   Reply With Quote
Old 17-10-2015, 16:47   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,314
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, 03: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, 03: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, 04: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, 05: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, 07:03   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,314
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, 07:45   #9
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,877
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, 07:51   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,314
Re: Accessing waypoints from plugin development

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

Join Date: Mar 2008
Posts: 4,877
Re: Accessing waypoints from plugin development

Cags...

Implemented, in github now.

Thanks for the suggestion.
Dave
__________________
bdbcat is offline   Reply With Quote
Old 21-10-2015, 00: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, 11: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, 15:29   #14
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
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, 16: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

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 78 29-07-2017 03:15
APRS Plugin Development alawatsakima OpenCPN 8 21-09-2015 13:21
Plugin Development Question pelle2004 OpenCPN 3 04-07-2012 02:00
New Plugin Development on Linux globalkeith OpenCPN 5 03-05-2012 08:16
Accessing Your Cash in the Bahamas and Caribbean ianlgv Liveaboard's Forum 14 16-11-2010 11:46



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 02:40.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.