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 23-01-2018, 16:45   #61
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
Re: Autopilot Control

I like this approach/description...

From Panbo article:
"When your vessel goes off course while navigating between the origin (previous waypoint) and your current destination waypoint because of a remote control command, etc. the NAV mode uses one of two methods to get back on course: COURSE or XTE. (See figure in below.) If COURSE is selected, the NAVpilot-500 will calculate a new course based on your new position after dodging, etc. that will take you directly to your destination waypoint. If XTE is
selected, the NAVpilot-500 will use XTE or cross track error to steer the boat towards your ORIGINAL course before dodging. You may select, either COURSE or XTE as shown below."

We could do this in OCPN, I think.

But what is clear from reading is that whatever we do must be configurable, and that the tried and true XTE method must be the default.

Sean, it seems to me that a PlugIn with lots of configurability would be the way to start. This would allow others to play, and build a knowledge base regarding A/P and boat response characteristics. Once we understand the behavior well enough, bring it into the core as a configurable option.

Dave
bdbcat is offline   Reply With Quote
Old 23-01-2018, 17:57   #62
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,628
Images: 2
Re: Autopilot Control

I find this all very interesting. I have an old ST4000 and after a "dodge" it just heads back to the original heading and waypoint with out using XTE, ie XTE is reset.

I found this statement from the article very interesting:
Quote:
Raymarine displays have a fairly-easy-to-get-at function called "Reset XTE" which would make the SPX30 return to a waypoint course just like the 300 used to.
Why? Because Opencpn has such a feature too. Right Click and pick Zero XTE, also shown towards the bottom here Activating Routes and Active Route Console
rgleason is offline   Reply With Quote
Old 23-01-2018, 18:16   #63
Registered User

Join Date: Jul 2005
Location: Bellingham
Boat: Outbound 44
Posts: 9,319
Re: Autopilot Control

On the Navpilot mentioned above there is also another interesting mode. You can set it up so that when you tell the AP to steer a specific compass course it will then create an imaginary waypoint far ahead of the vessel and then use XTE to steer to it. In this case you'll see your steering course change over time. The default mode is to just accept the compass course steer that course.
__________________
Paul
Paul L is offline   Reply With Quote
Old 23-01-2018, 19:10   #64
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,628
Images: 2
Re: Autopilot Control

Quote:
We could do this in OCPN, I think.
Dave, I am wondering if you already have this with the Zero XTE choice, albeit a little indirect?
rgleason is offline   Reply With Quote
Old 24-01-2018, 01:21   #65
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: Autopilot Control

Quote:
Sean, it seems to me that a PlugIn with lots of configurability would be the way to start. This would allow others to play, and build a knowledge base regarding A/P and boat response characteristics. Once we understand the behavior well enough, bring it into the core as a configurable option.
I just had a new PluginMessage in the message system about the active route leg. For now it has info about waypoint lat/lon XTE and BRG. Maybe you need for this purpose some additional info as last waypoint lat/lon. The time to do this would be now as O is in beta at the moment.
Code:
f( g_pRouteMan->m_bDataValid )
            {
                v[_T("error")] = false;
                v[_T("range")] = g_pRouteMan->GetCurrentRngToActivePoint();
                v[_T("bearing")] = g_pRouteMan->GetCurrentBrgToActivePoint();
                v[_T("XTE")] = g_pRouteMan->GetCurrentXTEToActivePoint();
                v[_T("active_route_GUID")] = g_pRouteMan->GetpActiveRoute()->m_RouteNameString;
                v[_T("active_waypoint_lat")] = g_pRouteMan->GetpActiveRoute()->m_pRouteActivePoint->GetLatitude();
                v[_T("active_waypoint_lon")] = g_pRouteMan->GetpActiveRoute()->m_pRouteActivePoint->GetLongitude();
            }
        }
        wxString msg_id( _T("OCPN_ACTIVE_ROUTELEG_RESPONSE") );
        g_pi_manager->SendJSONMessageToAllPlugins( msg_id, v );
__________________
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.
rooiedirk is offline   Reply With Quote
Old 24-01-2018, 08:00   #66
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Autopilot Control

Quote:
Originally Posted by rooiedirk View Post
I just had a new PluginMessage in the message system about the active route leg. For now it has info about waypoint lat/lon XTE and BRG. Maybe you need for this purpose some additional info as last waypoint lat/lon. The time to do this would be now as O is in beta at the moment.
Code:
f( g_pRouteMan->m_bDataValid )
            {
                v[_T("error")] = false;
                v[_T("range")] = g_pRouteMan->GetCurrentRngToActivePoint();
                v[_T("bearing")] = g_pRouteMan->GetCurrentBrgToActivePoint();
                v[_T("XTE")] = g_pRouteMan->GetCurrentXTEToActivePoint();
                v[_T("active_route_GUID")] = g_pRouteMan->GetpActiveRoute()->m_RouteNameString;
                v[_T("active_waypoint_lat")] = g_pRouteMan->GetpActiveRoute()->m_pRouteActivePoint->GetLatitude();
                v[_T("active_waypoint_lon")] = g_pRouteMan->GetpActiveRoute()->m_pRouteActivePoint->GetLongitude();
            }
        }
        wxString msg_id( _T("OCPN_ACTIVE_ROUTELEG_RESPONSE") );
        g_pi_manager->SendJSONMessageToAllPlugins( msg_id, v );
It's a start, but I have issues:


1) I need to generate the APB messages from the plugin. As far as I can tell, any ports set for output, will also generate these messages from the core which will conflict.

2) The plugin needs to determine when the waypoint is reached, or the next one activated.

3) I need to know the position of the next waypoint after the active one, but preferably the entire route (see below)


So the plugin either needs:

1) an api where the plugin "takes over" autopilot calculations
2) the plugin could implement it's own "active" mode which is completely separate from the core. This solves #1 and #2, but is confusing to use because of the two modes (like watchdog and core anchor alarm) The "This Leg" dialog would not be used.. so I prefer #1


I would support many different modes:

1) XTE with tunable PID filter. In this mode, normal XTE is computed by the plugin, and the AP is commanded in bearing. The gains are graphically represented and easily visualized.
2) Next waypoint mode. This mode aims for the next waypoint regardless of XTE... the same as continuously resetting XTE, and always using the bearing.
3) Best route mode. This mode uses a specified time or distance, and finds calculates the best position along the route at that distance, or future time, and steers to it. complete with graphical representation. This avoids discontinuities at waypoints as there no longer an arrival radius.


I need the entire route, because I wish to have a button (integrated with the draw plugin) that draws a boundary around the route. The user can then modify this boundary by dragging it.

There could be any number of boundaries specified to avoid also.

The logic to stay in/out the route boundary is less clear, feel free to comment.
seandepagnier is offline   Reply With Quote
Old 24-01-2018, 08:26   #67
Moderator Emeritus
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 4,663
Images: 4
Re: Autopilot Control

It's probably time for a review of basic guidance-system engineering:
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 24-01-2018, 08:54   #68
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: Autopilot Control

@Sean,
Quote:
1) I need to generate the APB messages from the plugin. As far as I can tell, any ports set for output, will also generate these messages from the core which will conflict.

2) The plugin needs to determine when the waypoint is reached, or the next one activated.

3) I need to know the position of the next waypoint after the active one, but preferably the entire route (see below)
To start with 3: With message REQUEST_ACTIVE_ROUTELEG you get an answer including the route name. With this name you could for request the whole route.

For point 1 it might be needed to as soon as an active route is found:
  • Deactivate the active route in core O
  • Take over complete routing from within the PI, including an own route information window, right click menu, etc etc.
Point 2 would be solved then also. Only I don't know how to stop the active routing in O from a plugin.
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.
rooiedirk is offline   Reply With Quote
Old 24-01-2018, 10:54   #69
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Autopilot Control

An autopilot plugin could be implemented that is an alternative to the native route following system in the core. I don’t see anything to prohibit that. So I would prefer to leave the core alone and steer the ideas toward an AP plugin. Call it Automated Passage Plugin.
transmitterdan is offline   Reply With Quote
Old 24-01-2018, 10:56   #70
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Autopilot Control

Quote:
Originally Posted by Paul Elliott View Post
It's probably time for a review of basic guidance-system engineering:

2 minutes of my life I can never reclaim...but funny nevertheless.
transmitterdan is offline   Reply With Quote
Old 24-01-2018, 11:43   #71
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Autopilot Control

Quote:
Originally Posted by transmitterdan View Post
So I would prefer to leave the core alone and steer the ideas toward an AP plugin.
This is the plan, as outlined by Dave.

Quote:
Call it Automated Passage Plugin.
I don't think "passage" makes sense.


I'm not sure I like this name. I have ideas like

1) Autopilot Plugin (too generic?)
2) Advanced Autopilot Plugin
3) Autopilot Route and Waypoint Plugin
4) AP Route Plugin
5) Advanced AP Route Plugin

something better/different?

Keep in mind, I intend to implement advanced configurable "rules" For example, to ensure the boat doesn't jib downwind when following a gps route.

Quote:
Originally Posted by rooiedirk View Post
@Sean,

To start with 3: With message REQUEST_ACTIVE_ROUTELEG you get an answer including the route name. With this name you could for request the whole route.
There is another function "GetActiveRoutepointGPX" which I can't seem to find what plugin actually uses it.

Quote:

For point 1 it might be needed to as soon as an active route is found:
  • Deactivate the active route in core O
  • Take over complete routing from within the PI, including an own route information window, right click menu, etc etc.

Point 2 would be solved then also. Only I don't know how to stop the active routing in O from a plugin.
Dirk
Option 1:

wait for OCPN_RTE_ACTIVATED or OCPN_WPT_ACTIVATED message.
send OCPN_ROUTE_REQUEST to get the route.
Now I need a new message to deactivate the active route/waypoint. This is kind of a hack, as the user cannot deactivate the waypoint anymore in the usual way.


Option 2:

Add support to allow plugins to install context menus for routes, track, waypoints and ais rather than just default menus. This is probably really useful anyway for other plugins.

Then the plugin has it's own form of "activated" which is separate from the core. The graphics rendered can be different as well. If the user activates a route in the core using the normal method, then the plugin would "deactivate"


Option 3:

Allow plugins to perform the calculations while still allowing the concept of active route/waypoint to be used in a universal way. The "This Leg" dialog could still be used This would have the best support for integrating with other plugins. A few functions are needed to implement this.



What other plugins currently use the OCPN_RTE_ACTIVATED message?
seandepagnier is offline   Reply With Quote
Old 24-01-2018, 12:36   #72
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: Autopilot Control

Quote:
What other plugins currently use the OCPN_RTE_ACTIVATED message?
Currently I'm working on a compass deviation PI. For this PI I wanted a bearing to the next active waypoint. Therefore I did a push request with the following two messages.
_T("OCPN_ACTIVE_ROUTELEG_REQUEST"))
_T("OCPN_ACTIVE_ROUTELEG_RESPONSE") );
Those two mess. are available in the current beta of O
With those messages you would need to do a request every second or so to get a response, and if the response has no error set then there is a active route.

I don't mind if this is changed as long as I can get somehow a bearing to the active waypoint in my PI (That still is in alpha at this moment)
__________________
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.
rooiedirk is offline   Reply With Quote
Old 24-01-2018, 12:43   #73
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,628
Images: 2
Re: Autopilot Control

Dirk:
Quote:
Point 2 would be solved then also. Only I don't know how to stop the active routing in O from a plugin. Dirk
Somewhat silly, but you could just turn it off.
rgleason is offline   Reply With Quote
Old 24-01-2018, 12:48   #74
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,628
Images: 2
Re: Autopilot Control

Sean, if I have a vote, I'd like to see something short like "4) AP Route Plugin"
rgleason is offline   Reply With Quote
Old 24-01-2018, 12:48   #75
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Autopilot Control

Quote:
Originally Posted by rooiedirk View Post
Currently I'm working on a compass deviation PI.
What does this plugin solve? We have WMM, you can manually enter deviation without it, there is an option to command the AP in compass bearing already.

Steering to compass bearing is typically not a good idea for routes, as these are based on gps positions, so it's better to steer to gps.
seandepagnier is offline   Reply With Quote
Reply

Tags
autopilot


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
Replacing Dual Lever Control with Single Lever Control ? Alecadi Engines and Propulsion Systems 48 05-11-2019 16:01
valid sanitation control exemption control certificate dwedeking2 Training, Licensing & Certification 1 21-02-2017 10:04
For Sale: Seafire control module, remote display, control BobH260 General Classifieds (no boats) 0 28-08-2016 07:29
New Autopilot Control, old Autopilot motor Pablo Danic Marine Electronics 3 28-06-2016 23:28
Want To Buy: ST600R Autohelm Autopilot Control Unit sonaps Classifieds Archive 2 11-07-2011 16:16

Advertise Here


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


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.