Maritime navigation with a Rasp Pi and OpenCPN

Lead Image © Dietmar Hoepfl,

On Course

The Raspberry Pi is ideally suited to serve as the basis for a low-cost navigation system. OpenCPN software and a GPS receiver are all you need to add.

The previous article in this series [1] described using the Raspberry Pi as a multimedia center for a boat. In this article, I discuss turning the nanocomputer into a low-cost maritime navigation system. It is also possible to expand this project and deliver GPS data to all parts of the boat. Because the Rasp Pi consumes minimal amounts of power, it is ideally suited for use on private boats and in RVs.

Maritime navigation with electronics is not a new idea. Large ships have been using GPS devices for a long time to determine location and plan routes. These devices are also available for purchase for smaller boats. The hitch is that a GPS device costs a lot of money and map updates add to the financial outlay. These costs often scare boaters away. Other commercially available navigation devices typically are well outfitted with street and highway mappings, but waterways appear to have been added as an afterthought. As a result, the more economical choice of using printed nautical maps is still the preferred method.

This is where the Rasp Pi offers itself as a solid foundation for a DIY navigation device. All you need to do is add a GPS receiver, the navigation software OpenCPN, and corresponding inland waterway maps. In this article, I describe how to outfit the Rasp Pi with the necessary software and a suitable choice of hardware, and I talk about where maps may be procured. As a bonus, I provide an overview of how the setup can be used for other instruments on board a boat.


The aforementioned multimedia Rasp Pi runs OpenELEC with a single remote control, which is ideal for media tasks, but not for navigation; therefore, I decided to add a second Rasp Pi for this project. The navigation software requires a genuine Linux distribution that will permit installation of additional packages.

A keyboard and mouse are mandatory; however, the space available on board a small boat is not big enough for these to be practical, especially not a normal-sized mouse. Logitech offers an alternative in the form of the K400 Plus [2]. Originally designed for use in the living room, this is a combined keyboard and touchpad. It does not take up much space, has no loose pieces, and is relatively inexpensive.

The Rasp Pi needs a GPS receiver and accessories to function as a navigational device. Specialty boating stores carry many different types of GPS antennae that can be assembled for use outside of the boat cabin. However, a Linux-compatible indoor GPS antenna suits my purposes just fine. This antenna can be fastened to a cabin window with two sided tape or with Velcro. Ultimately, the GPS antenna only needs an unobstructed line of sight with an adequate number of satellites.

The Navilock NL-402U [3] USB receiver (Figure 1) works with Linux without any problems. If this is not available in your area, a reading of the specs will give you an idea of what you should look for. This unit was less expensive than the cheapest of the outdoor antenna models.

Figure 1: The Navilock NL-402U "mouse-type" GPS receiver works with Raspbian. (Picture:

A Raspbian Foundation

I have worked for 12 years on Debian development efforts; consequently, Raspbian was the only distribution I was willing to consider. A welcome side benefit of this bias is that OpenCPN packages are already available online for this distribution.

Prepared operating system images are available on the Raspbian project website [4]. They can be installed easily on a new SD card under Linux, Mac OS X, and Windows. Because Rasp Pi hardware is identical for all versions of the Pi, you don't have to worry about time-consuming hardware configuration. Once Raspbian is installed, the hardware configuration is practically perfect and the system is ready for use.

As described in the first part of this series, Raspbian has an overlay warning, so it is entirely possible that it produces an image signal with a blurry picture on the monitor. In this case, it is a good idea to avoid using the overlay display on the television. The remote control for the Grundig model used on my boat has a button for turning it off.

The image display should be set for 720p instead of 1080p when using OpenCPN (even though it is theoretically possible to use the 1080p), which means you can use OpenCPN maps without massive zoom-ins. The setting also protects the Rasp Pi GPU, which is not very powerful.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Raspberry Pi navigation on the open seas

    Thanks to the avNav free software, the Raspberry Pi becomes a control center for electronics on a yacht.

  • Welcome

    It is rumored that Thomas Edison tested thousands of filaments for an incandescent lamp before he produced the first commercially viable electric light bulb, and I imagine his is not a unique experience. Building mock-ups and working models exposes the weaknesses and strengths of a design, which prepares you to make a better version, then a better version, until you have found the right combination of materials, components, configuration, and cost.

  • Using the Raspberry Pi for a multimedia center on your boat

    Due to its diminutive size and minimal power needs, the Raspberry Pi works well as a multimedia center on boats or in RVs.