|
|
15-02-2018, 21:32
|
#1
|
Registered User
Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,443
|
autopilot route plugin
initial working version (requires opencpn from git as well)
http://github.com/seandepagnier/autopilot_route_pi
The idea is to improve the logic for following routes with an autopilot.
Some basic improvements include:
1) performed using spherical calculations (opencpn cheats using mercator)
2) various modes and tuneable parameters
3) more custom route leg display
In the future I intend:
1) additional tuning parameters
2) additional route leg display options
3) boundary support
4) automatic avoid collision with ais targets
5) sailing rules to prevent jibing or luffing sails with significant wind shifts
In the screenshot below, the actual track overlaps the planned route with maximum error of 5 meters. The wind was below 5 knots, so the boat speed was 1-2 knots, and still possible to track closely using "route position bearing" mode which has no discontinuities at waypoints, and improves on XTE mode in many situations.
|
|
|
16-02-2018, 04:55
|
#2
|
Registered User
Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 983
|
Re: autopilot route plugin
Nice. Very impressive screen shot.
Fabbian
|
|
|
16-02-2018, 11:05
|
#3
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
Looking pretty nice Sean. I'm going to try vdr simulation with it.
|
|
|
20-02-2018, 10:28
|
#4
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
Sean, to run this new PI do I need to setup for MSVC++2017 and the newer version of wxWidgets and use the resultant opencpn.lib which is API 1.15?
Since the v4.8.2 release on Feb 6 you guys have been very busy adding to Opencpn.
One of the commits is
Merge pull request #994 from transmitterdan/wx311Updates
which is for using wxWidgets 3.11 I believe.
It appears I can get this new version of
Add the NOAA tilesets to chart downloader. 1.0.146
3 hours ago by Pavel Kalian master aee79014
Simply by download https://ci.appveyor.com/project/bdbcat/opencpn/build/1.0.146/artifacts
That will contain opencpn.lib (API version 1.15) so I will be able to standalone compile autopilot_route_pi and then run it without having to reconfigure my MSVC++ to 2017 and wxWidgets 3.11
----However... Should I be reconfiguring anyway?
|
|
|
20-02-2018, 12:10
|
#5
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
Well, I tried compiling it with MSVC++2013 and the old wxWidgets, using
cmake -T v120_xp .. and of course it had some errors... are these because I have not moved on to wxWidgets 3.11 and MSVC++2017?
Quote:
"C:\Users\Frederick\Documents\GitHub\autopilot_rou te_pi\build\ALL_BUILD.vcxproj
" (default target) (1) ->
"C:\Users\Frederick\Documents\GitHub\autopilot_rou te_pi\build\autopilot_route_p
i.vcxproj" (default target) (3) ->
(ClCompile target) ->
C:\Users\Frederick\Documents\GitHub\autopilot_rout e_pi\src\autopilot_route_pi
.cpp(549): error C3867: 'std::list<waypoint,std::allocator<_Ty>>::clear': funct
ion call missing argument list; use '&std::list<waypoint,std::allocator<_Ty>>::
clear' to create a pointer to member [C:\Users\Frederick\Documents\GitHub\autop
ilot_route_pi\build\autopilot_route_pi.vcxproj]
C:\Users\Frederick\Documents\GitHub\autopilot_rout e_pi\src\computation.cpp(79
): error C2065: 'M_PI' : undeclared identifier [C:\Users\Frederick\Documents\Gi
tHub\autopilot_route_pi\build\autopilot_route_pi.v cxproj]
C:\Users\Frederick\Documents\GitHub\autopilot_rout e_pi\src\computation.cpp(80
): error C2065: 'M_PI' : undeclared identifier [C:\Users\Frederick\Documents\Gi
tHub\autopilot_route_pi\build\autopilot_route_pi.v cxproj]
C:\Users\Frederick\Documents\GitHub\autopilot_rout e_pi\src\apdc.cpp(363): err
or C2065: 'GL_SMOOTH_LINE_WIDTH_RANGE' : undeclared identifier [C:\Users\Freder
ick\Documents\GitHub\autopilot_route_pi\build\auto pilot_route_pi.vcxproj]
C:\Users\Frederick\Documents\GitHub\autopilot_rout e_pi\src\apdc.cpp(372): err
or C2065: 'GL_ALIASED_LINE_WIDTH_RANGE' : undeclared identifier [C:\Users\Frede
rick\Documents\GitHub\autopilot_route_pi\build\aut opilot_route_pi.vcxproj]
C:\Users\Frederick\Documents\GitHub\autopilot_rout e_pi\src\apdc.cpp(557): err
or C2065: 'GL_SMOOTH_LINE_WIDTH_RANGE' : undeclared identifier [C:\Users\Freder
ick\Documents\GitHub\autopilot_route_pi\build\auto pilot_route_pi.vcxproj]
C:\Users\Frederick\Documents\GitHub\autopilot_rout e_pi\src\apdc.cpp(566): err
or C2065: 'GL_ALIASED_LINE_WIDTH_RANGE' : undeclared identifier [C:\Users\Frede
rick\Documents\GitHub\autopilot_route_pi\build\aut opilot_route_pi.vcxproj]
3 Warning(s)
7 Error(s)
|
|
|
|
20-02-2018, 17:57
|
#6
|
Registered User
Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,443
|
Re: autopilot route plugin
It should compile now, but you must use the git version of opencpn, and the opencpn.lib generated from it.
|
|
|
22-02-2018, 13:39
|
#7
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
Sean, it does indeed compile now. I tried it in v4.99 and it is rejected with a message to get an updated version of O. So now I will git fetch and compile O.
I'm gettting an error in compiling O
Quote:
Build FAILED.
"C:\Users\Frederick\Documents\GitHub\OpenCPN\build \ALL_BUILD.vcxproj" (default
target) (1) ->
"C:\Users\Frederick\Documents\GitHub\OpenCPN\build \WXSVG.vcxproj" (default targ
et) (13) ->
(ClCompile target) ->
C:\Users\Frederick\Documents\GitHub\OpenCPN\src\wx svg\src\svgxml\svgxml.cpp(2
4): fatal error C1083: Cannot open include file: 'expat.h': No such file or dir
ectory [C:\Users\Frederick\Documents\GitHub\OpenCPN\build\ WXSVG.vcxproj]
0 Warning(s)
1 Error(s)
|
It looks like I need to check dependencies. expat.h for example.
I will run a clean and try again first.
later; no dice. did not fix it.
|
|
|
22-02-2018, 14:19
|
#8
|
Registered User
Join Date: Sep 2016
Location: Greater Houston Galveston Metroplex
Boat: 1979 Endeavor 32
Posts: 337
|
Re: autopilot route plugin
Sean,
This looks very promising. Nicely done. Unfortunately I cannot test the plugin at this time. The boat is dockbound and I am homebound working on other things. To make matters worse, my Nexus 6 phone is toast (I broke a step on a dock ladder and got dunked). So I'm conducting business from my laptop while also working on my pet project.
In the meantime, I have been doing a little research. It turns out that a great deal that has already been accomplished by others. Their intended applications are much more ambitious than mine and the distinct possibility exists that the system I envision will be simplified quite a bit by comparison.
Ultimately, I am going to need to know what data, in what format, you will need to incorporate it into the AP route plugin and how to create a layer for chart overlay that is updated dynamically. But a few things have to be finalized before I get to that point.
This is one source I have been studying. You may find it interesting: MDPI Open Access Journals - Simulation of a Geiger-Mode Imaging LADAR System for Performance Assessment
__________________
Kindest Regards,
Phillip
|
|
|
22-02-2018, 14:57
|
#9
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
Pavel has provided a good workaround just using Continuous Integration and Appeveyor so I am going to use this
https://ci.appveyor.com/project/bdbc....161/artifacts
Using this version 4.99.0 and the opencpn.lib, I am still getting a message saying ap_route is not compatible to get an updated version
Nothing seems to work.
|
|
|
22-02-2018, 15:41
|
#10
|
Registered User
Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,443
|
Re: autopilot route plugin
What exact message?
Did you build opencpn from git also? It shoudl work.
|
|
|
23-02-2018, 05:07
|
#11
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
|
|
|
23-02-2018, 06:23
|
#12
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
Message: Autopilot_route_pi is not compatible with this version of Opencpn.
|
|
|
23-02-2018, 09:13
|
#13
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 516
|
Re: autopilot route plugin
Only a quick try.
I Can activate a route, and a window popsup. This is an always ontop nonborder window, therefore I can not move it around the screen to a position I like.
It is not posible to unactivate the route again (at least not with the right mouse click). In the rightclicke menu the item 'activate route' remains and if clicked somehow a new instance is started and causing in the output a doubled nmea sentence.
Dirk
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
|
|
|
23-02-2018, 15:04
|
#14
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,849
|
Re: autopilot route plugin
Sean, can I go back to an earlier version of 4.99.0 that will compile properly?
Pavel has made a number of changes that will not work with MSVC2013.
I need to know which commit to compile that has your essential code so that the plugin will be accepted and O will compile with MSVC2013 and wxWidgest 3.0.2!!!
Otherwise I will not be able to help.
|
|
|
28-02-2018, 07:39
|
#15
|
Registered User
Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,443
|
Re: autopilot route plugin
Quote:
Originally Posted by rooiedirk
Only a quick try.
I Can activate a route, and a window popsup. This is an always ontop nonborder window, therefore I can not move it around the screen to a position I like.
It is not posible to unactivate the route again (at least not with the right mouse click). In the rightclicke menu the item 'activate route' remains and if clicked somehow a new instance is started and causing in the output a doubled nmea sentence.
Dirk
|
You can drag the window holding "alt" I should add the border as an option.
You can deactivate by right clicking the route window rather than main chart.
The double output sounds like a bug. Thanks for feedback.
Quote:
Originally Posted by rgleason
Sean, can I go back to an earlier version of 4.99.0 that will compile properly?
Pavel has made a number of changes that will not work with MSVC2013.
I need to know which commit to compile that has your essential code so that the plugin will be accepted and O will compile with MSVC2013 and wxWidgest 3.0.2!!!
Otherwise I will not be able to help.
|
I do not find your errors. Are they the same as appveyor?
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|