2020-01-04, 01:22 AM
I can say I found a bug as you described in the first post sailing today. The problem was in the autopilot route plugin for opencpn, not pypilot.
pypilot works in both gps and compass mode. In gps mode if a route is not activated, it just follows the course, but using true north rather than the (possibly misaligned) compass course of magnetic heading.
If pypilot receives nmea APB while engaged, it will automatically switch to gps mode, and the heading to hold will be updated with each new APB message. The only exception is if it receives GPAPB message in which case it will ignore the message if the autopilot is in compass mode rather than switching automatically, so you can probably put this prefix 'GP' in opencpn to get this behavior.
pypilot works in both gps and compass mode. In gps mode if a route is not activated, it just follows the course, but using true north rather than the (possibly misaligned) compass course of magnetic heading.
If pypilot receives nmea APB while engaged, it will automatically switch to gps mode, and the heading to hold will be updated with each new APB message. The only exception is if it receives GPAPB message in which case it will ignore the message if the autopilot is in compass mode rather than switching automatically, so you can probably put this prefix 'GP' in opencpn to get this behavior.