Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 20-01-2018, 10:12   #1
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,245
Autopilot Control

I have been using the autopilot to steer to waypoints and follow routes.

I found that the command to steer is whatever the route angle is, rather than the best angle to get the boat to follow the route as closely as possible. The commanded angle is never adjusted to correct for cross track errors as they may accumulate, especially if the autopilot is not tuned, or tuned for minimum power consumption.

Further, going around turns, when the next routepoint becomes active, it is usually at the wrong time, so it will overshoot, and follow the route, again on a parallel line rather that directly over the route line. This ensures a cross track error. It is not possible to set a turn radius either.



Shouldn't we have a maximum cross track error parameter? Above this, the commanded heading would be changed (by yet another adjustable multiplier?) to get the boat back on track? Shouldn't the boat actually "hit" the waypoint as closely as possible rather than just passing it? This would require several tunable parameters, and so it could be a usability issue.

Routes probably should be performed in the autopilot itself, but currently the activate route feature is only sending gps headings, not actually waypoint positions... Maybe it should do that instead?
__________________

boat_alexandra is offline   Reply With Quote
Old 20-01-2018, 10:46   #2
Registered User

Join Date: Jan 2011
Location: UK/France
Boat: Gib'Sea 402
Posts: 288
Re: Autopilot Control

What you're suggesting is just what we used to do on aircraft systems.

If the autopilot can't/doesn't do the calculations, maybe an autopilot plug-in could do this and provide the necessary user customisation?
__________________

hoolie is online now   Reply With Quote
Old 20-01-2018, 13:10   #3
Registered User

Join Date: Mar 2010
Location: QC, Canada
Boat: Kelt 8.50
Posts: 79
Re: Autopilot Control

Quote:
Originally Posted by boat_alexandra View Post
I have been using the autopilot to steer to waypoints and follow routes.

I found that the command to steer is whatever the route angle is, rather than the best angle to get the boat to follow the route as closely as possible. The commanded angle is never adjusted to correct for cross track errors as they may accumulate, especially if the autopilot is not tuned, or tuned for minimum power consumption.

Further, going around turns, when the next routepoint becomes active, it is usually at the wrong time, so it will overshoot, and follow the route, again on a parallel line rather that directly over the route line. This ensures a cross track error. It is not possible to set a turn radius either.



Shouldn't we have a maximum cross track error parameter? Above this, the commanded heading would be changed (by yet another adjustable multiplier?) to get the boat back on track? Shouldn't the boat actually "hit" the waypoint as closely as possible rather than just passing it? This would require several tunable parameters, and so it could be a usability issue.

Routes probably should be performed in the autopilot itself, but currently the activate route feature is only sending gps headings, not actually waypoint positions... Maybe it should do that instead?
It is not my experience with my autopilot.

In O I activate a route.

I set the autopilot to track whatever it receives. It will first steer the boat toward the next waypoint. Then it will adjust the heading to correct the XTE and bring it to 0.

When arriving at the waypoint, O will proceed to the next waypoint, but the autopilot will beep and keep the same heading until I acknowledge the change. Then It will then make a sharp turn toward to the next waypoint and continue correcting for the XTE as needed.

Jean-Marie
houlejm is offline   Reply With Quote
Old 20-01-2018, 13:52   #4
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,200
Re: Autopilot Control

What Jean-Marie says corresponds well to my experiences for many (most) Autopilots. The course to steer is loaded only once when initiated. After that XTE is the only parameter read and act to. It doesn't matter if O change the course to steer while on a track to next WP. And next leg is just a completely new initiating for the AP, after a press on the push button.

My AP also ha it's own max XTE. If exceeded it goes off navigating and return to Auto mode.
Håkan
Hakan is offline   Reply With Quote
Old 20-01-2018, 14:38   #5
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,245
Re: Autopilot Control

The XTE explains a lot... Thanks.

I am using my own autopilot which I didn't program to read XTE (yet) I will do that. I didn't realize this parameter was used in such a critical way.

But the point still remains that there is no way to configure things like:

1) turn radius.
2) max xte allowed, or how aggressively to correct for XTE

The autopilot could do a much better job if it knew more than just the course, and XTE. It needs to actually know the route itself to really work best. Otherwise, it is difficult to use the autopilot in tight channels or canals.


I want to improve opencpn autopilot integration, but are we limited by the nature of nmea0183? What other messages exist in what formats for which autopilots?

How can OpenCPN command steering to compass or wind in a generic way?

I might want to follow a route, but not risk accidental jibe. Or even follow a route but perform tacking as needed. Many boats can self tack. I can come up with a lot more examples.


I have created a new plugin for my autopilot:
github.com/pypilot/pypilot_pi

It allows configuring the autopilot to steer to compass, gps, wind, true wind. Perform tacks, and tune the autopilot's many parameters etc... Everything is handled by signalk rather than nmea0183... Only nmea0183 is used for activated routes and tracks.

This is my solution, ok, but the more logic that can be shared for other autopilots as well, it is better.
boat_alexandra is offline   Reply With Quote
Old 20-01-2018, 14:58   #6
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,245
Re: Autopilot Control

I see now that opencpn produces rmb, rmc, apb, and xte sentences. I can certainly improve by reading and using these fields, but they are still not sufficient for many purposes.
boat_alexandra is offline   Reply With Quote
Old 20-01-2018, 16:35   #7
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Hard Aground back in Canada
Boat: Finnsailer 38
Posts: 1,210
Re: Autopilot Control

I think you are talking about the “active route console” in Opencpn.

I think of it as the navigator. It generates the apb, rmc, xte, etc... sentances.
The same navigation function can be performed by a stand alone GPS (if you can still buy one of those).

The things you are talking about changing are traditionally handled in the autopilot (a seperate piece of hardware).

If you want to combine the functions of the navigator and the autopilot, can’t you do that in your autopilot plugin by duplicating the functions that you need?

Will your plugin be the autopilot, or just a configuration, control and display?
__________________
Cheers,
JM
nahannivatsea.blogspot.ca
NahanniV is offline   Reply With Quote
Old 20-01-2018, 16:51   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,176
Re: Autopilot Control

Sean, OpenCPN has choices for the approach to a mark which determine what is done. I have detailed the process with a series of drawings. (One of them I notice needs to be corrected, but that is pretty apparent, nevertheless I should change it.)

I think you'll find these drawings and descriptions informative.

Send a Route to the Autopilot, the basics
rgleason is offline   Reply With Quote
Old 20-01-2018, 18:04   #9
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,245
Re: Autopilot Control

Quote:
Originally Posted by NahanniV View Post
I think you are talking about the “active route console” in Opencpn.

I think of it as the navigator. It generates the apb, rmc, xte, etc... sentances.
The same navigation function can be performed by a stand alone GPS (if you can still buy one of those).
That may be, but OpenCPN could do a bit more, or have a higher layer above this. After reading the wiki, it is pretty obvious that OpenCPN could be a bit smarter about how it handles waypoint arrivals.

Also, depending on the distance between waypoints, the cross track adjustment could vary considerably. Maybe some autopilots handle this differently.

We could for example, have a feature to "smooth" routes which adds intermediate positions along the route to give the correct turning radius.

As for a generic way to command the autopilot to steer to wind or true wind, apparently none exists.

Eventually, more advanced autopilot parameters will exist. For just one of countless examples, the autopilot might also be able to raise the centerboard. This might need to be integrate such that if the track is going toward shallow water (based on vector chart depths and sounder data) the autopilot can raise the board in time.

Quote:
The things you are talking about changing are traditionally handled in the autopilot (a seperate piece of hardware).

Yes, well, the autopilot holds a course. It can be gps, compass or wind, but without OpenCPN it never did follow any waypoints.

Many parameters for this type of thing could be in OpenCPN, and OpenCPN would tweak the nmea sentences.

I learned now that it does support various arrival radii, but this is slightly different from turn radius, or maximum cross track error and other settings or rules.

Should we consider enhancing the autopilot integration in opencpn by adding more tunable parameters in a way that affects all autopilots?

Quote:
If you want to combine the functions of the navigator and the autopilot, can’t you do that in your autopilot plugin by duplicating the functions that you need?
Yes, I can do that, I already have a lot of functions specific to this autopilot in the plugin.

It just seems like it would be nice to have a generic way to handle autopilots as much as possible. Consider various separate radar plugins.
Quote:

Will your plugin be the autopilot, or just a configuration, control and display?
The autopilot is completely configurable through a web browser, the openplotter interface, as well as a small lcd and keypad and/or tv remote.

The opencpn pypilot plugin is the 4th user interface. Only one user interface is needed, but so far, only from opencpn can it follow routes and waypoints and display overlay on the chart based on the autopilot's performance and configuration.

The autopilot runs as a separate server.

There are some slight integration issues. If you activate a route for example, it engauges the autopilot if it isn't engauged. Maybe it shouldn't? If it shouldn't, then it's possible to have "active routes" when the autopilot is disabled. Is that normal?

I don't ask the user to confirm course change on each waypoint arrival... why would anyone want that?
boat_alexandra is offline   Reply With Quote
Old 20-01-2018, 18:51   #10
Registered User

Join Date: Jun 2007
Location: SW Florida
Boat: FP Belize, 43' - Dot Dun
Posts: 3,834
Re: Autopilot Control

Quote:
Originally Posted by boat_alexandra View Post
That may be, but OpenCPN could do a bit more, or have a higher layer above this. After reading the wiki, it is pretty obvious that OpenCPN could be a bit smarter about how it handles waypoint arrivals.

Also, depending on the distance between waypoints, the cross track adjustment could vary considerably. Maybe some autopilots handle this differently.
Commercial APs work hard to maintain a XTE of only a few feet.

Quote:
Originally Posted by boat_alexandra View Post
We could for example, have a feature to "smooth" routes which adds intermediate positions along the route to give the correct turning radius.
In real world cruising, automatic turning at a waypoint change to continue the route isn't a highly used feature since in such close quarters the one on watch can handle the turn. Too much automation can be a bad thing.

Quote:
Originally Posted by boat_alexandra View Post
As for a generic way to command the autopilot to steer to wind or true wind, apparently none exists.
All APs I know offer this feature under their own control interface.

Quote:
Originally Posted by boat_alexandra View Post
Eventually, more advanced autopilot parameters will exist. For just one of countless examples, the autopilot might also be able to raise the centerboard. This might need to be integrate such that if the track is going toward shallow water (based on vector chart depths and sounder data) the autopilot can raise the board in time.
Again, too much automation causes more problems than it's worth. The one on watch needs to understand the boat is in shallow water. If the AP raises the centerboard, it won't be very long until the boat in grounded.

Quote:
Originally Posted by boat_alexandra View Post
Yes, well, the autopilot holds a course. It can be gps, compass or wind, but without OpenCPN it never did follow any waypoints.
"GPS" and waypoints are the same thing.

Quote:
Originally Posted by boat_alexandra View Post
Many parameters for this type of thing could be in OpenCPN, and OpenCPN would tweak the nmea sentences.

I learned now that it does support various arrival radii, but this is slightly different from turn radius, or maximum cross track error and other settings or rules.

Should we consider enhancing the autopilot integration in opencpn by adding more tunable parameters in a way that affects all autopilots?
I seriously doubt the OCPN community will be able to drive features back into commercial APs.

Quote:
Originally Posted by boat_alexandra View Post
Yes, I can do that, I already have a lot of functions specific to this autopilot in the plugin.

It just seems like it would be nice to have a generic way to handle autopilots as much as possible. Consider various separate radar plugins.


The autopilot is completely configurable through a web browser, the openplotter interface, as well as a small lcd and keypad and/or tv remote.

The opencpn pypilot plugin is the 4th user interface. Only one user interface is needed, but so far, only from opencpn can it follow routes and waypoints and display overlay on the chart based on the autopilot's performance and configuration.

The autopilot runs as a separate server.

There are some slight integration issues. If you activate a route for example, it engauges the autopilot if it isn't engauged. Maybe it shouldn't? If it shouldn't, then it's possible to have "active routes" when the autopilot is disabled. Is that normal?
Yes, that is normal. A chartplotter can be set to goto a waypoint while the AP remains on standby. An integrated chartplotter and AP controller will ask to confirm engaging the AP when a 'goto' command is entered.

Quote:
Originally Posted by boat_alexandra View Post
I don't ask the user to confirm course change on each waypoint arrival... why would anyone want that?
It's much safer to ask the helmsman to confirm rather than allowing the AP to drive the boat 'blind'. Most hazards on the water are not on charts, they are other boats which OCPN/AP can't see.
DotDun is offline   Reply With Quote
Old 20-01-2018, 19:16   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,176
Re: Autopilot Control

Quote:
We could for example, have a feature to "smooth" routes which adds intermediate positions along the route to give the correct turning radius.
Sean, I have not exercised OpenCPN's waypoint turning, but have tried to investigate and understand the parameters and how it works. I know that Dave has spent a good deal of time and thought developing this. Also I do not know what other software does in this regard, but would be very interested in the details.

I wonder if there are some conditions where the buoy could be hit and would like to see if it is possible to develop some buoy offset standards and radius type rounding. Keep in mind that one of Dave's considerations is for roundings by sailors, who may not be on the route with XTE=0.

Quote:
As for a generic way to command the autopilot to steer to wind or true wind, apparently none exists.
Jon Gough has been developing a plugin called Windvane it is not yet alpha but he has been sailing with it. This might be another piece of the equation.

Integration with an Autopilot
I suppose there could be a full autopilot controller integrated into OpenCPN, but there may be good reasons not to do this, in particular energy use. I think that in any case Opencpn should be a good partner with most autopilots including Pypilot.

If we could improve OpenCPN's integration and control of autopilots it would be great.
rgleason is offline   Reply With Quote
Old 21-01-2018, 00:23   #12
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,200
Re: Autopilot Control

Sean..
I do agree to all DotDun's answers. They are important and more or less exactly my reactions.

I have an ongoing test on my own, dated, AP. That is to in O use a factor multiplying the XTE value sent to the AP. The test was performed since the AP didn't come to the course line but stayed offset more than I like. It works rather good. I can as you see turn it on/off from the consol window. The value is set in boat options.

AP's produced in the last five years are better then my dated AP. The regulator algorithms are much more efficient to adapt for both a new course and maintain a course line. But they are still reading course to steer only once and then take care of leeway by the XTE. And independent if O or a plotter of the same make is setting the course you've to accept a new course for every WP in a route.

So my conclusion is the same as DotDun's: There is not much to develop in what's sent from O to the AP, it works fine.
But if you make your own AP regulator you can maybe do it in another way.
Håkan
Attached Images
 
Hakan is offline   Reply With Quote
Old 21-01-2018, 04:18   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,176
Re: Autopilot Control

Also take a look at Shipdriver it could also be a real connection to an autopilot rather than a virtual driver. All great minds working on this.
ShipDriver - another BETA!!!
rgleason is offline   Reply With Quote
Old 21-01-2018, 04:24   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,176
Re: Autopilot Control

Hakan I am in the other camp and happen to agree with Sean about navigation around bouys.

He suggests hese two common values:
1) turn radius.
2) max xte allowed, or how aggressively to correct for XTE

Maybe the first thing to do is to get in the boat and test the buoy rounding settings that we have now and report back on the results?

Of course I always put in my own buoy offset by where I place the waypoint, but perhaps there should be a buoy offset value too.
rgleason is offline   Reply With Quote
Old 21-01-2018, 04:56   #15
Registered User

Join Date: Jun 2007
Location: SW Florida
Boat: FP Belize, 43' - Dot Dun
Posts: 3,834
Re: Autopilot Control

Quote:
Originally Posted by rgleason View Post
Hakan I am in the other camp and happen to agree with Sean about navigation around bouys.

He suggests hese two common values:
1) turn radius.
2) max xte allowed, or how aggressively to correct for XTE

Maybe the first thing to do is to get in the boat and test the buoy rounding settings that we have now and report back on the results?
How would OCPN/AP measure turn radius in real time? GPS lags up to a second behind realtime. Currently, ROT measures are crude and not fit for close quarter turns in a channel around a buoy.

Turn radius has an infinite number of variables that affect the actual performance of the boat that aren’t known to OCPN nor the AP, i.e. current, motor vs sail, rudder responsiveness to current conditions, wind/windage, other traffic, channel width/depth, etc. A helmsman deals with all these factors automatically using eyeballs and human brain. You’ll be very hard pressed to replicate even a small percent of that processing.
__________________

DotDun is offline   Reply With Quote
Reply

Tags
autopilot

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
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
Replacing Dual Lever Control with Single Lever Control ? Alecadi Engines and Propulsion Systems 47 03-12-2011 17:16
Want To Buy: ST600R Autohelm Autopilot Control Unit sonaps Classifieds Archive 2 11-07-2011 16:16



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.