Full Version: PyPilot doing remarkably well on long trip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
My servo.gain is 6.7. I have no idea or recollection of how that happened. And to be honest, I have no classical understanding of what it means either. I think this is my cue for building up a workbook page with all information that can be found on this forum on what all those parameters mean.

Attached my pypilot.conf.
Hi Ironman
thanks again.

A far as I understand the servo-gain is an mulitiplicator
to your gain settings.

I was wondering at your low P and D settings, but with your
high servo-gain this makes sense.

I posted a video sailing downwind and the settings a while ago.

so when I m back on the boat I will have a closer look at yor conf file .....
Hi Ironman

here is my pypilot.conf file: [attachment=1465]

Taking the servo_gain´s in consideration and the different caractaristics of the two boats ( mine is 13 Tons long keel )
the settings make sense to me.

A considarable difference  the FF gain, wich I think determines the speed the boat reacts to course change, there yours
must be verry quick in responding. On the other side maybe there is a physical limit by the maximum speed the autopilot
can move so if you lower your FF there might be no change until you below that phyiscal limit.

Yes indeed if you set FF to 0 it takes an excruciating long time to change heading; the D or DD component resist the heading change, so to speak, and the FF puts a little weight in it. My boat is 9m long keel, 5 tons, for comparison, and it is sluggish to say the least but the FF makes for an ok response. Can't hurt your boat to crank up the FF for a little test, can it?
servo gain is usually set to 1.0 I added it for special cases where the regular gain range was not enough. Is it really set to 6.7?

Yes, the FF gain helps react to heading changes, since as you say DD and D resist this, and P is too slow.
Just checked the code and the servo.gain is certainly not simply a multiplication factor for the gains, as suggested earlier; it has something to do with the speed of the servo. Yet, it seems to have a reflection on the gain settings. I know I ran into radically different gains when I upgraded tinypilot and motor.ino last year, and attributed the different gain settings to that. But I think it must have happened when I scrolled through the pypilot_client gui with the mouse. I know one thing: I'm not going to change it now, because pypilot runs better than ever. Just came back from a 200NM trip, at least 30 hours on pypilot.

Code:        speed *= self.gain.value # apply gain

the last week I finished my pypilot projekt and mounted it on the boat.

Made a short trip over the "Ijsselmeer" (Netherlands) and it works very good.
I lost the compasscalibration two times due to underwater cables or tunnels (driving throug channels this time).

On the Ijsselmeer no such problems.
Compassmode works very well, following a route was also good but here pypilot moves slowly from the route (not more than 100m) and then corrected the XTE a little bit "agressive". 
Generally I have to understand the gains and customize them even better. Maybe the route-modus is better when using the route-plugin.

A short video of the working pypilot you can found here: pypilot first test - YouTube
Gains: D:0,11 DD:0,12 FF:0,348 I:- P:0,002 PR: 0,028 R:-

I´m very statisfied with the result of the work.

Best regards

What happened at the underwater cable? How far did the boat go off course? Did the compass calibrate incorrectly after? Were you able to "lock" the calibration to avoid this?

The future wind pilot and other pilots will not all depend on compass, but on other sensors instead.

As for route following, it depends on the plotter a lot as well. Are you able to use the autopilot route plugin? It has alternate algorithm from XTE and especially avoid overshooting at waypoints.

yes, I´ll try to explain this a little better...

I spend two days with driving on the boat the others with working at the boat  Dodgy .
Day 1 I drive over a number of lakes connected with canals. The canals are usually not wider than 30m. It was the very first time running pypilot on the boat in real life so I decided to look if I can calibrate pypilot and how it then works as a heading sensor and how big are the differences between the magnetic compass and the heading shown by pypilot.

So after start I drive a slow big circle at a wider place.

Then pypilot says 2d fix and I follow the canals and lakes. After passing a tunnel and an underwater cable pypilot shows a heading which was round about 100° off the course. This heading error stays until I drive a new circle. I then locked the calibration and all seems fine.
There was a lot of iron (retaining walls) around the tunnel.
Next day after switching pypilot on (during the night it was off) -calibration was still locked- there was a heading error again. I passed a lock, enter the Ijsselmeer and there I drive a circle, relock the calibration (2d fix) and sail a route over the sea. No more heading error again. Due to the fact that there was a lot of space I use pypilot in auto mode and after using the compass mode I decided to test the gps (route) mode.
Compass mode was fine, and route modus too except the steering correctments.
I use OpenCPN on a raspberry and during gps mode the build in route management of OpenCPN. 

The next times using pypilot I have to investigate if the heading errors shown by pypilot are due to magnetic irritation of the compartement of the boat itself or due to things outside of the boat. The place I mounted the sensor is far away enough from electric or magnetic components I thought.

I have to test the route plugin

I have to understand the gains deeper.

Best regards

you can also adjust the apb.xte.gain value to help tune route following. Otherwise, the autopilot route plugin should offer many more options to tue.
Pages: 1 2 3