free autopilot for sailboats using signalk written in python
Python C++ C CSS JavaScript Makefile Other
Switch branches/tags
Nothing to show
Clone or download



The dependencies can be installed with "apt install" or sometimes 'pip install"

server dependencies (required): python-gps python-serial libpython-dev python-numpy python-scipy swig
lcdclient dependencies: python-pil
webapp dependencies: python-flask

client dependencies (viewers control applications)
python-opengl python-pip
sudo pip install pyglet
sudo pip install pywavefront

# correct a bug in pywavefront
typically in /usr/local/lib/python2.7/dist-packages/pywavefront
+++ 2017-10-30 19:43:53.288141444 +0000
@@ -100,6 +100,7 @@
         glMaterialfv(face, GL_AMBIENT, self.gl_light(self.ambient))
         glMaterialfv(face, GL_SPECULAR, self.gl_light(self.specular))
         glMaterialfv(face, GL_EMISSION, self.gl_light(self.emissive))
+        self.shininess = min(128, self.shininess)
         glMaterialf(face, GL_SHININESS, self.shininess)

         if self.gl_floats is None:

sudo pip install ujson

wxwidgets client dependencies: python-opengl python-pip
# for the calibration program also:
    pip install pyglet
    pip install pywavefront

# my version of rtimulib is required!
git clone
cd RTIMULib2/Linux/python
python build
sudo python install

You may want to run pypilot as a service, see the scripts/debian directory


sudo pip install PyOpenGL
sudo apt-get install python-numpy python-scipy

Clone the data repository and copy data
git clone
cp -rv pypilot_data/* pypilot

most of the scripts can be run individually as standalone
or test programs, some function as clients, other as servers

servers (only one executes at a time)

pypilot/ -- classic PID based autopilot implementation
pypilot/ -- basic PID based autopilot with additional gains and filters

These server scripts can be run as tests:
* execute this script directly

signalk/ -- implements poll based server allowing external manipulation,
                     * basic demo server with clock
signalk/ -- implements tcp sockets in a separate unix process
                         relieving the main process from json parsing, and transmission.
                         * basic demo server
pypilot/ -- specialized imu specific to boat motions
                      includes automatic 2d/3d calibration and alignment of magnetic sensors
                      * useful for testing the imu (gyros) or even just reading gyros
pypilot/ -- signalk <-> nmea0183 translator
                   reads nmea0183 from serial ports or from tcp connections, and multiplexes
                   the output to both nmea0183.
                   * convert and multiplex nmea0183 data

pypilot/ -- controls servo via RC pwm signal, and gpio feedback for fault
                    * use to test or verify a working servo is detected,
                      can be used to control or calibrate the servo

clients (run as many of these):

ui/ -- simple interface to command autopilot
ui/ -- interactive gui for all autopilot calibrations
ui/kivy -- work in progress kivy control app

signalk/ -- console client
signalk/ -- graphical user version (wx widgets)
signalk/ -- glut plot client -- useful for sensors and control
signalk/ -- plot client with wx widgets (for checked listbox)

lcd/ -- autopilot control interface using GPIO pins.

webapp/ -- python flask application that runs a webserver providing remote autopilot control through a browser