Some Notes
- YakBitz SeaTalk to NMEA WiFi SeaYak output: DBT, MWV, VWR, MTW, VHW, HDG, HDM, HDT, RMB, RMC, VTG, XTE, BWC, APB, GGA, GLL, ZDA
- YakBitz SeaTalk to NMEA WiFi: operate as Access Point or Station mode for WiFi. Supports TCP and UDP.
- QK-A027 SeaTalk 4800 baud to NMEA RS-422 w/ WiFi w/AIS output: 4800 baud or 38400 (default): DBT, MWV, VHW, VLW, MTW, RMC, HDG
- QK-A027 SeaTalk 4800 baud to NMEA RS-422 w/ WiFi w/AIS output: Ad-Hoc or Station modes for WiFi via 802.11 b/g/n WPA/WPA2. Supports TCP/2000.
- Garmin GPS192C NMEA RS-422(?) output: GPRMC, GPGGA, GPGSA, GPGSV, GPGLL, GPBOD, GPRTE, and GPWPL
- Garmin GPS192C NMEA RS-422(?) input: DBT, DPT, MTW, VHW
- WestMarine VHF NMEA output: 4800N8,1 GPRMC
- Standard Horizon GX2400GPS NMEA input 4800 and 38400 baud: GGA, GLL, RMC, GSA, GSV, DSC/DSE
- Standard Horizon GX2400GPS NMEA output 4800 and 38400 baud: DSC, DSE, GGA, GLL, GNS, RMC, GSA, GSV, VDM
Goal
A homebrew navigation system with the following capabilites:
- Navigation: display of our course on NOAA charts. Data required: course over ground, speed over ground, GPS location.
- Performance: true wind direction and speed, apparent wind direction and speed, speed through the water, speed over ground, course over ground.
- Logging: all information captured to log file in ASCII format.
- An article on Apple or Android tablets.
- OpenPlotter a combination of software and hardware to be used as navigational aid on small and medium boats.
- Motissier Hat provides AIS receiver, GNSS receiver, compass, heel and trim, barometric pressure, OpenPlotter compatible
- An implementation using Raspberry Pi, OpenPlotter, RTL-SDR for AIS, and Motissier Hat for Raspberry Pi (playlist)
- Enhanced Solutions NMEA wired connections (up to four inputs, one output) to WiFi Network (up to four clients), $129 as of 2019-07-04.
- James Conger Building your own Chartplotter with a Raspberry Pi and OpenCPN
- Sailing Balachandran How to Sail Digital for CHEAP with Raspberry Pi (2019-01-12) and video report two years later (2020-10-17)
- Sailing Brick House OpenPlotter, raspberry pi for Sailboats
- David Burch OpenCPN Series
- Smart Sailing Boat Openplotter instruction video for "Raspberry Pi
- Seatalk to NMEA and Seatalk to WiFi converters from YakBitz about $70
- Seatalk to NMEA and Seatalk to WiFi converter with AIS splitter about $70.
Development
- 20201026
- Tried to boot the Raspberry Pi 3B+. No luck. Red LED only. No green LED activity meaning no SD card activity.
- Installed the more recent Raspberry Pi OS using the Raspberry Pi Imager and the Cana MicroSD card reader.
- Booted without issue. Set the localization information (country, keyboard, timezone), pi user password, WiFi network and password. host google.com fails. (access configuration utility with sudo piwiz)
- Wireless connection failed. Restarted. Now the wireless network is working. host google.com resolves.
- editted /etc/config.txt to set framebuffer_width=1280 and framebuffer_height=720. Not very good. /opt/vc/bin/tvservice -s indicates state 0xa [HDMI DMT (39) RGB 16:9] 1360x768 @ 60.00Hz, progressive
- updated the Raspberry Pi OS using sudo apt-get update and sudo apt-get dist-upgrade per https://www.raspberrypi.org/blog/raspbian-update-june-2018/
- rebooted with sudo poweroff
- enabled SSH via the graphical Raspberry Pi Configuration utility. Confirmed SSH works.
- Following instructions at https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:getting_started:opencpn_installation:raspberrypi_rpi2 to install OpenCPN
- sudo vi /etc/apt/sources.list
- add deb http://ppa.launchpad.net/opencpn/opencpn/ubuntu/ bionic main
- sudo apt install dirmngr
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C865EB40
- sudo apt-get update
- sudo apt-get install opencpn
- OpenCPN
was added to the Education menu under the Raspberry.
- Started OpenCPN
. Shows Failed to inspect lock file '/home/pi/opencpn/_OpenCPN_SLock' (error 2: No such file or directory). Starts anyway!
- Downloaded charts: GSHHG World Basemap and 05 CGD - Pennslyvania, ....
- Install Mesa Utils (sudo apt-get install mesa-utils)
- Change graphics memory split to 128MB (sudo raspi-config -> Advanced Options -> Memory Split)
- Enable OpenGL Driver (sudo raspi-config -> Advanced Options -> GL Driver)
- Reboot to verify video functionality
- Much better video. /opt/vc/bin/tvservice -s indicates state 0x120009 [HDMI DMT (39) RGB 16:9] 1360x768 @ 60.00Hz, progressive
- Turn off screen blanking (sudo vi /etc/lightdm/lightdm.conf -> [Seat:*] -> xserver-command=X -s 0 dpms)
- Verify OpenGL (glxinfo | grep Gallium and glxinfo | grep Mesa)
- Download NTP software sudo apt-get install ntp, sudo systemctl stop systemd-timesyncd, sudo systemctl disable systemd-timesyncd, sudo /etc/init.d/ntp stop, and sudo /etc/init.d/ntp start
- Install supporting packages for OpenCPN (sudo apt-get install gpsd gpsd-clients screen)
- Configure GPSD per "VK-162 G-Mouse USB GPS Dongle" below
- Confirmed GPS functioning using cgps first and then cgps -s
- Enable GPS in OpenCPN as detailed at https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:options_setting:connections#network_gpsd_connection
- 20190122
- Build QRP-Labs QLG1. Connected to QRP-Labs QCX. Receiving 1PPS, time synch, tracking 12 satellites in kitchen window with signal strength of 37. No luck getting a fix reported by the QCX
- Decided to connect the QLG1 to the Raspberry Pi.
- Pi booted into "blue screen". With USB to TTL convertor plugged into the Pi
- Google'd and set "hmdi_safe=1" in /boot/config.txt of Raspberry Pi via ssh connection. Now it shows a login window. See video documentation
- Comment out "hdmi_safe=1" in /boot/config.txt and reboot. Now it shows a login window. Connect USB to TTL convertor to the Pi. Device recognized as /dev/ttyUSBV0. Reboot.
- Rebooted and shows login window. WTF was that about.
- Installed kermit (sudo apt-get install ckermit) (see http://www.ronnutter.com/raspberry-pi-making-a-serial-console-server/)
- Find USB serial port using 'lsudb'.
- Find the tty using 'dmesg | grep FT', its 'ttyUSB0'.
- Add myself to the dialout group (sudo adduser jmb dialout)
- Run kermit and enter the following commands 'set carrier-watch off', 'set line /dev/ttyUSB0', 'set speed 9600', 'set stop-bits 1', 'set parity none' and connect
- Getting NMEA GPS sentences.
- Disconnect.
- Run OpenCPN and set a data connection as above for kermit. Got GPS lock!. OpenCPN showing own ship at 39d 02.7067'N x 077d 1.7659'W.
- Using Kermit, its possible to see all the data being sent:
- $GPGSA,A,3,27,23,16,09,08,26,07,31,21,,,,1.77,1.04,1.44*07
- $GPGSV,3,1,10,27,68,115,46,23,55,223,35,08,52,179,46,09,51,278,43*77
- $GPGSV,3,2,10,16,50,044,40,07,30,306,46,26,26,060,43,21,07,045,25*7F
- $GPGSV,3,3,10,31,05,114,28,11,03,182,19*71
- $GPRMC,223006.000,A,3902.7067,N,07701.7659,W,0.01,6.22,220119,,,A*75
- $GPVTG,6.22,T,,M,0.01,N,0.02,K,A*38
- $GPGGA,223007.000,3902.7067,N,07701.7659,W,1,9,1.04,144.0,M,-33.5,M,,*6D
- $GPGLL,3902.7067,N,07701.7659,W,223007.000,A,A*4D
- Seems that the QCX will not display a fix if GLL and VTG sentences are present per Paul Jorgenson KE7HR 03/06/18 #22215 https://groups.io/g/QRPLabs/topic/12511107#22230
- 20190121
- See OpenCPN install docs.
-
- Configure WiFi
- Improve security: Add my account with "sudo"
- Remove the default "pi" account and home diretory
- Enable SSH
- Reboot to verify SSHD functionality
- Test SSH connectivity
- Update kernel (sudo branch=next rpi-update)
- Update system (sudo apt-get update)
- Upgrade system (sudo apt-get update)
- Install Mesa Utils (sudo apt-get install mesa-utils)
- Change graphics memory split to 128MB (sudo raspi-config -> Advanced Options -> Memory Split)
- Enable OpenGL Driver (sudo raspi-config -> Advanced Options -> GL Driver)
- Reboot to verify video functionality
- Turn off screen blanking (sudo nano /etc/lightdm/lightdm.conf -> [Seat:*] -> xserver-command=X -s 0 dpms)
- Verify OpenGL (glxinfo | grep Gallium and glxinfo | grep Mesa)
- Install supporting packages for OpenCPN (sudo apt-get install gpsd gpsd-clients screen)
- Reboot to verify functionality
- Install OpenCPN from Ubuntu PPA (sudo nano /etc/apt/sources.list, add "deb http://ppa.launchpad.net/opencpn/opencpn/ubuntu/ xenial main") ("xenial" for Stretch; "trusty" for "Jessie")
- Install dirmngr (sudo apt-get install dirmngr)
- Add Ubuntu key server (sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C865EB40)
- Get data (xsudo apt-get update)
- Install OpenCPN (sudo apt-get install opencpn)
- Download charts using the built-in Chart Downloader
- 20190118 Unpack Raspberry Pi, get it on the home WiFi using WPS, install most recent Raspbian, install updates.
Parts
- CanaKit Raspberry Pi 3 B+ $90
- Etepon 1024x600 TFT Screen $50
- QRP Labs GPS Receiver QLG1 $23
- TTL to USB adaptor to bring GPS NMEA signals to Raspberry Pi $12.50
- 12V to 3.3V Optoisolator to bring RayMarine SeaTalk NMEA signals to Raspberry Pi $7.50 using EL817 C809N
- Various Dupont connectors $13
- USB keyboard and mouse from Best Buy $14
-
- dAISy Hat AIS receiver $65
- dAISy 2+ dual channel AIS receiver with NMEA output $89
- Additional Samsung MicroSD memory cards
References
- Raspberry Pi UARTS UARTS are 3.3V. One UART is a PL011 (/dev/ttyAMA0) used for wireless/Bluetooth. One is a mini-UART (/dev/ttyS0) used for the console.
- Using the UART on Raspberry Pi.
- Raspberry Pi GPIO and its pinout. UART TX (GPIO 14) and RX (GPIO 15).
- 3.3V pins are limited to 50mA current draw. (see https://www.circuits.dk/everything-about-raspberry-gpio/)
- GPIO pins have programmable(?) current limits. (see https://www.circuits.dk/everything-about-raspberry-gpio/) Recommended not to exceed 0.5mA.
- GPIO output pins are limited to sourcing 16mA each and 50mA alltogether. (see https://www.circuits.dk/everything-about-raspberry-gpio/)
- GPIO pins can safely sink 16mA each. (see https://www.circuits.dk/everything-about-raspberry-gpio/)
- Use 200ohm or higher series reistors on the GPIO pins (3.3V / 16mA ~= 220ohm)
- How to setup the UART on Raspberry Pi 3.
- Everything You Want to Know About Raspberry Pi GPIO: But Were Afraid to Ask
-
- Google search for nmea data capture arduino
- OpenCPN on Raspberry Pi with AIS. Pi 2, and a year later Pi 3
- QRP-Labs QLC1 and assembly instructions
- GPS/GNSS receive module YIC5 Series used in QLC1
- MediaTek GPS Module NMEA Protocol Manual
- Eric Raymond's NMEA Revealed
- Eric Raymond's AIVDM/AIVDO protocol decoding
- Google Chrome Extention NMEA Sleuth
- AISHub an AIS data exchange open participation effort
- FairWind an Android-based Smart, Cloud-Enabled Navigation System for small Yachts with Boat Apps
- Maritime Instrument & Display Controller based on UDOO Neo, acting as a navigator, chart plotter, wireless NMEA multiplexer
-
- OpenPlotter from Sailoog
- Sailoog Moitessier Hat with dual channel AIS, GNSS, Compass, Heel, Trim from gyroscope, accelerometer, and magnetometer sensors (IMU), and atmospheric pressure 120 Euro
- S/V Matilda write up on using OpenCPN and OpenPlotter on a Raspberry Pi
-
VK-162 G-Mouse USB GPS Dongle
sudo apt-get update && sudo apt-get -y install gpsd gpsd-clients python-gps
sudo shutdown -r now
sudo dpkg-reconfigure gpsd
sudo nano /etc/default/gpsd
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="false"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="true"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyACM0"
# Other options you want to pass to gpsd
GPSD_SOCKET="/var/run/gpsd.sock"
GPSD_OPTIONS="-n"
sudo nano /etc/rc.local
agregar:
/bin/systemctl stop gpsd.socket
/bin/sleep 1
/usr/sbin/gpsd /dev/ttyACM0 -n -F /var/run/gpsd.sock
/bin/sleep 1
/usr/sbin/service ntp restart
sudo nano /etc/ntp.conf
agregar:
# Use GPS receiver
server 127.127.28.0 prefer
fudge 127.127.28.0 time1 0.0 refid GPS
# GPS PPS reference, if provided by GPS device
server 127.127.28.1 prefer
fudge 127.127.28.1 refid PPS
Servicio de inicio: Detener servicio: Finalmente, use este comando para obtener información del módulo de GPS. Verás esto:
sudo systemctl enable gpsd.socket
sudo systemctl start gpsd.socket
//Para detener
//sudo systemctl stop gpsd.sock
//sudo systemctl disable gpsd.sock
Verificar:
cgps –s