OpenCPN Experiments
[ Taking the Princess Out, at the end of the testing OpenCPN chart-plotting software and ShareGPS on the Big Lake ]
I have this whole section here, of images about my discovery and installation of OpenCPN chart-plotting software, a great open-source product, that when used with all the electronic versions of the world ocean charts and charts for inland lakes in North America (Canada and the USA), gives one a GPS-on-the-water, which is very useful. No internet is needed for navigation, just the GPS signals. You use a laptop for the software and map display, and an Android tablet, running ShareGPS (another open-source software product), as your GPS computer, which you link to the laptop running OpenCPN. Here in this image, we are done, and are taking the Princess home.
[ Linking OpenCPN and ShareGPS using USB link and TCP stack. It works! ]
OpenCPN is an open-source chart-plotter for use on a boat in the ocean or a lake. ShareGPS is a clever tool that lets you send the GPS data from the GPS on your Android tablet, to your Windows-11 machine that has OpenCPN installed on it (and probably does NOT have an on-board GPS. I downloaded a bunch of charts for Great Lakes, for OpenCPN (including *paid-for* charts of Canadian waters, from "O-Charts", a Spanish Ocean-Charts provider). Out on the water, you need to know where you are, especially in Georgian Bay, as it is strewn with rocks (and sunken wrecked ships, also, of course).
This was the most difficult configuration exercise I've done in a while. I started with older versions of both software packages, and they did not work. The key is to use the latest OpenCPN and the latest (circa 2016 or 2017) version of ShareGPS, which is version number 0.4.1. You need this one to make it work. The key is to use "adb" (the Android Debug Bridge) - the program for side-loading Android apps directly on your tablet, without using Google "Playstore". You use "adb" to forward the default tcp port 50000 to a local port of your choice, and then configure OpenCPN using connection option "Network", even though you are connecting the tablet to the laptop using a USB serial cable.
The trick is to plug the tablet into the Windows-11 latptop, run "adb devices" to confirm connectivity to the Android tablet, and then configure the Android Tablet with ShareGPS to "Share GPS data to laptop, using USB link" (option when configuring ShareGPS). You install and start the ShareGPS app, and select "ADD" to create the connection for the USB link from the tablet to the laptop.
Then, and this is the key step: You run this adb command on the Windows-11 laptop: "adb forward tcp:20175 tcp:50000". Then, you start up OpenCPN, select "gear-icon" (configure) and "connections", and choose "Network", and select the data port number you chose (20175) for the tcp port, and the host as "localhost" and protocol as NMEA ("National Marine Electronics Association") - and use the version "NMEA 0183" of the communication protocol.
This is real network voodoo, but it works. And it gives a tight, operational connection, because of the use of the tcp stack, instead of the usual messing around with buffered serial-data transmission, which is a pain to code, and often can be flaky. When the OpenCPN shows the little check-mark in the status (on "Connections"), you will see a red target indicator (your GPS position), and if you zoom-in, it becomes a little "red boat" icon. In the top right corner of the OpenCPN screen, is an indicator which turns green, if the GPS is flowing data correctly. Little boat icon or target (which shows your location), turns yellow if GPS goes off. Once you get it working, ShareGPS will report the ADDed link as "Connected", and you can then switch the tablet ShareGPS program to "GPS Status", and get screen which shows the 3D GPS readings (Lat., Long., and altitude). The Android tablet acts as the GPS unit, and the OpenCPN program reads the NMEA-0183 datafeed it generates, as it gives you zoomable nautical charts, and shows your boat's position and track. Amazing that it works. :)
Ok, this is the wrong place for this, but I thought I would take a stab at getting OpenCPN to run on my hacked Linux boxes. I like real-time postional graphics, without internet access, and without black-box dreck-tech. I have the 0.4.1 running on several Android tablets, so using the network voodoo with "adb" I can send the NMEA 0183 protocol GPS data from the Android tablets to the Windows-11 laptop, running OpenCPN with the expensive Canadian charts. I bought a big 3000 watt pure-signwave-inverter and rigged it in the boat, and wired it to a deep-cycle (Nautilus) twelve-volt battery, so we have more than just the laptop and Android battery-life. FIgured I better build OpenCPN from soure. Ha ha. I needed to get a new "cmake" thing, and that needed "glew". Redhat/Fedora has been killed and eaten by IBM, ("Resistance is Futile!"), and so I have to Linux-from-scratch it all. Probably won't work, but I am now building "wxWidgets" stuff from source. Long compile. Maybe it works? (Not yet. Still cannot get a build to work from source...)
But, OpenCPN is pretty cool. Still have not built it from source yet, but the Windows-11 version running with ShareGPS, was tested in real-world, big-water conditions on August 16th, out on Georgian Bay, of Lake Huron. Pics below...
[ Testing the OpenCPN and ShareGPS open-source chart-plotting software, out on the Big Lake ]
This is a shot of the Windows-11 HP laptop, onboard my SeaRay, out on Georgian Bay, with OpenCPN running, connected to an Android tablet, which is running ShareGPS, and sending the GPS data to the laptop, for OpenCPN to display one's position. The little red boat on the OpenCPN display moves out into the water, and as I change headings, the little red boat on the screen reflects the change as expected. This technology has been around for quite a while - but it is expensive, and commercial chart-plotters duplicate equipment and technology that most folks already have.
[ Testing the OpenCPN, open-source chart-plotting software, and ShareGPS, running on linked Android tablet, out on the Big Lake ]
This is a shot of the Windows-11 HP laptop setup, onboard my SeaRay, out on Georgian Bay, with OpenCPN running, connected to an Android tablet, which is running ShareGPS, and sending the GPS data to the laptop, for OpenCPN to display one's position. The little red boat on the OpenCPN display moves out into the water, and as I change headings, the little red boat on the screen reflects the change as expected. This is very cool. It's like the "Glass FlightDeck" in a modern aircraft.
I really love my SeaRay, as the controls and configuration has a look and feel like one of the Enterprise's shuttle-craft, and I can feel like Captain Picard navigating down to a water-planet. Electronic nav. makes it even better. The laptop is plugged into a 3000 watt pure-sine-wave inverter, which in turn is connected with cables as big around as your finger, to a deep-cycle "Nautilus" 12-volt battery (just below deck, under the wooden-slat floor-door). This means we are not dependent on the laptop and Android tablet batteries. The big inverter was on sale, and I got the last one they had on the shelf - a curious phenomenon I am noticing a *lot* nowadays at retail stores. Prices are zooming, just like my SeaRay, with it's 5.7 litre V8 Mercrusier... :D
[ Red Boat Returning - The OpenCPN+ShareGPS Setup Showing Path Back to Harbour ]
This is a screen-shot of the small HP laptop, running OpenCPN on Windows-11, showing the path back to the harbour and the heading my small SeaRay, the "Princess", is tracking. Modern electronic navigation is a marvel, and it can be a real livesaver out at sea, or in a critical situation where visual references are either difficult to obtain or unavailable. This use of electronic nav. goes back to the early days of radio, where ships used RDF (Radio Direction Finder) equipment, to triangulate on land-based stations. What is nice here, is the use of open-source software, and publically available GPS signals, to get the same level of positional accuracy that large, expensive military-grade systems provide.