This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tack functionality does not work for me
#11
I think I'm entirely up to date, but when I tack in pypilot plugin, the remote pypilot on tinypilot restarts with the following main message in the log:

Code:
current = mul*resolv(ap.command.value - ap.heading) / self.tack_angle
AttributeError: 'Autopilot' object has no attribute 'command'

Hope this helps
Reply
#12
The tack function is still not working.
What has to be done to fix it?
What could we do to help?
Reply
#13
The problem is too many people ordered from my store in the last few months so I have limited time, and I'm trying to deal with other things, but don't worry, it is on my list within the next month or two.
Reply
#14
We (me and MoNkToNk) are working on the tack function now.
In our initial test in Compass mode it seems to work now (only the heading correction we have to switch)
Question what does the ap.tack.threshold mean, and do?
Reply
#15
There are various parameters for tacking I came up with.
1) tack.delay -- seconds wait after tack command before actually tacking
2) tack.angle -- degrees to tack
3) tack.rate -- ideal turn speed of boat in deg/s (this may be a stupid idea)
4) tack.threshold -- at what point during tacking to switch back to the autopilot holding the new course. So if set to 50 out 100, tacking would end when the boat is pointed directly into the wind, and the tack would be completed under the normal autopilot with the new heading command. If too high, will overshoot, if too low will undershoot tacking (in theory)


This is by no means the optimal tacking algorithm. The problem is depending on the sea state, wind, current sails and more, tacking strategy could be completely different. It may be impossible to tack without back winding a sail, or just impossible to tack and the boat must jibe. So optimal tacking strategy is not obvious and this is unlikely to be it.. feel free to try others
Reply
#16
(2021-04-14, 12:11 PM)Onno Wrote: We (me and MoNkToNk) are working on the tack function now.
In our initial test in Compass mode it seems to work now (only the heading correction we have to switch)
Question what does the ap.tack.threshold mean, and do?

Hi Onno,

that´s great to hear. Hope you´ll share youre solution here with us  Smile

Best regards

Andreas
Reply
#17
Yes we do share the code!
https://github.com/pypilot/pypilot/pull/95
https://github.com/pypilot/pypilot/pull/85
Reply
#18
Hi,

I tested this and shared my experience with Onno.

I can´t get tacking to work.

Setup: Tinypilot, latest image, running on a raspberry zero W, Opencpn 5.2.4 running on a raspberry 3b+ with latest Raspbian "Buster" and build-from-source plugin for controlling pypilot.

With no modified files when running the pypilot plugin in OC and hit the "tack" button (in auto AP-Mode) then the plugin switched to standby and disconnects from pypilot.

With the new tacking.py-file after I hit the "tack" button in OC the plugin switched from "none" to "tacking" for the tacking mode but I got no new heading command. The AP don´t move to the new direction. It´s also not possible to use the "tack"-button of the control unit cause -if I read the code right- is not implemented yet.

I tried to build pypilot completly new but this was also unsuccessful. When doing this pypilot have no display on the zero and does not work (don´t know what I,m doing wrong).

Best regards

Andreas
I download the tacking.py-file, put it in the folder of tinypilot and run pypilot.build on the zero. After this it´s possible to
Reply
#19
We are using the latest Beta image and changed the code with pushed changes above, then it works in the Windows OpenCPN Pypilot plug-in.
We have it now working on the webgui to, I will ask MonkTonk to push that.
Reply
#20
Hi,

I use the tinypilotimage from 27.10.2020 too.
I don´t really understand why pypilot don´t set a new heading command when hit the "tack" button in the plugin (which I compiled from source) as it does in the video you show me. I tested it with the build in plugin of opencpn (with the gains issue) too without difference.

The calculations are done in pypilot which runs as tinypilot. In my understandings it doesn´t matter if opencpn runs on windows or raspian as long as the platform of tinypilot is the same cause it´s the same program where the calculations are done but there must be a difference.
As you wrote in an email you made the same experience like me when running opencpn on a raspberry so it seems that this is not only a special problem of my system.

I just want to write here that using the new tacking.py, copy this file into the folder of tinypilot and run pypilot.build bring tacking not alive. The plugin don´t break the connection to tinypilot as before but tinypilot don´t set a new heading command and therefore it will not tack.
So there´s more work left when using oc on a raspberry and not on a windows system.

Best regards

Andreas
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)