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 26-03-2020, 04:21   #1
Registered User

Join Date: Feb 2019
Posts: 5
Change waypoint position in OpenCPN from remote application

Hi,
I have made a kayak drone with electric propulsion that automatically steers towards the active waypoint in OpenCPN. It basically follows the route set up in OpenCPN. Now I want the drone to follow a moving object. If I can send a new position for an existing waypoint to OpenCPN, I do not need to make any changes to the drone's control system.
Does anybody know a way to alter a waypoint in OpenCPN from an external program?

atlet
atlet is offline   Reply With Quote
Old 26-03-2020, 05:55   #2
Registered User

Join Date: Mar 2011
Posts: 651
Re: Change waypoint position in OpenCPN from remote application

One way would be to write a simple plugin that uses the OpenCPN API's
Code:
AddSingleWaypoint(PlugIn_Waypoint *waypoint, bool permament);
GetSingleWaypoint(wxString guid, PlugIn_Waypoint *waypoint);
UpdateSingleWaypoint(PlugIn_Waypoint *waypoint)
to create, retrieve and update a waypoint.

In your plugin you would need to maintain some sort of reference to the waypoint guid and of course your plugin would need some form of communications to the outside world , limited by only your requirements, imagination and programming skills.

The only caveat I have, is I have no idea whether OpenCPN adjusts it's active route if a waypoint's properties (esp. Lat & Long) are changed mid-way.
stevead is offline   Reply With Quote
Old 26-03-2020, 06:06   #3
Registered User

Join Date: Feb 2019
Posts: 5
Re: Change waypoint position in OpenCPN from remote application

Thanks a lot! I will try to see if this could be a way forward. Have not previously written any OpenCPN API, so I have to look into that first
atlet is offline   Reply With Quote
Old 26-03-2020, 08:51   #4
Registered User

Join Date: May 2012
Posts: 1,205
Re: Change waypoint position in OpenCPN from remote application

atlet ...

Using ShipDriver in AutoPilot mode I can move the waypoint. It becomes inactive and then when it is activated again the autopilot finds the new waypoint and steers towards it.

Interesting stuff you are working with. Have you published any code?

Mike
Rasbats is offline   Reply With Quote
Old 26-03-2020, 11:23   #5
Registered User

Join Date: Feb 2019
Posts: 5
Re: Change waypoint position in OpenCPN from remote application

Hi Mike,
Thanks for the feedback. No, I have not published any code. My control software is rather simple as I let OpenCPN do most of the navigational tasks. The control software only reads a few output telegrams from OpenCPN and based on those it controls throttle and the small rudder motor. If I had attempted to make a control application that included a chart and all the other stuff available in OpenCPN, it would have been a huge task and the result would have been very poor.
atlet is offline   Reply With Quote
Reply

Tags
enc, opencpn, remote


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
How do I batch change waypoint icons WallyD OpenCPN 7 18-12-2014 05:31

Advertise Here


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


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.