I've discovered a serious problem with sending bearing to waypoint (BTW) data from OpenCPN to my Raymarine ST4000+ autopilot. I did not post this in the beta thread, because I have confirmed that the same problem happens in stable release 3.2.2. I do believe that this problem did NOT previously happen in 2.5.1, which I was using in 2012.

I have, on occasion, wanted to run my boat in "Track mode," where OpenCPN sends a pre-programmed route to my autopilot. This worked flawlessly in 2012 using version 2.5.1 (I believe), but it has not worked in 2013 (v3.2.2) or this year (v3.3.1606). Since last year, every time I attempt to put my autopilot into track mode, it initiates a turn to port of over 20°. Recently I began to suspect some issue with magnetic variation, and today I confirmed repeatedly that the autopilot wants to turn exactly 24° to port. This is significant, because in my sailing area the magnetic variation is 12°, exactly half the error that I am seeing.

For example, today I was headed back to home port. Just to demonstrate this fact, I activated a route that clearly shows that BTW is 48° true (See "This Leg - BRG):

In my area with 12°W variation, 48° true = 60° mag. However, my autopilot is getting BTW of 36° mag, 24° less than it should be getting, hence the 24° turn to port:

Here is a sample of the NMEA log. It sure looks like OpenCPN is outputting 36° mag to the autopilot:

As for settings, I just noticed that the check box for "Use magnetic bearings in output sentence ECAPB was checked. I don't remember having done this, so I either did it inadvertently or it defaulted to checked at some point when I upgraded.

I do recall reading about an issue with Simrad devices. Is this the same problem? Or does fixing the Simrad problem have the opposite effect (magnetic variation in the wrong direction) on other devices?

FWIW, I tried changing "Assumed magnetic variation" from 12° to 0°, then restarting OpenCPN, but this change had no apparent effect on the BTW problem.

I may have been premature in stating that the same problem occurs with 3.2.2. I'm going through the log files for that version (I ran it today on my old Netbook), and it appears that the ECAPB sentence was transmitted with "true" BTW, and that the autopilot correctly added 12° to the true value. Had I entered track mode at that time, the boat would have tracked properly.

Of course, 3.2.2 does not have the option check box to transmit magnetic data. So it appears that the problem is limited to 3.3.xxxx, where there is that new option. And I would say that it simply applies the variation in the wrong direction, except that I did experiment with changing the variation to 0 and it had no effect on the BTW that the autopilot received.