Showing posts with label navigation console. Show all posts
Showing posts with label navigation console. Show all posts

Sunday, July 24, 2016

Live Wallpaper, offline

The Live Wallpaper (in the navigation console) has been improved. Several bugs were fixed (like the one for the daylight), and you can now use it offline, like when no NMEA data are coming. This can be useful when you are not on the boat (like at home).

You can give a default position (in the preferences), and it will be used when no GPS Data is available.
New features:
  • The tilt is based on the Sun declination
  • You can have Moonlight and Sunlight
  • The tide curve of the closest station is displayed (closest in a radius of 100 nautical miles)
  • Sun and Moon positions are displayed (when the body is visible)
Code and (some) doc are available on GitHub.

Thursday, May 07, 2015

Web Console improvements

With the Raspberry PI now able to behave as an Access Point, almost all devices can connect to it (Apple, Android, all kind of phones or tablets). Using an HTML5 enabled browser makes live easier than writing a dedicated application for the given Operating System.
That's why we now have some improvements in the Web Console:
See above the "Night" scheme, with or without borders for the displays
Same for the "Day" scheme.

The HTML5 console is accessed from http://machine:port/html5/console.html, default port being 9999.
If you have installed node.js and the WebSocket user-exit, then you access the WebSocket console from http://machine:9876/data/console.ws.html
It is still self-contained, no external framework is used (like JQuery et al). Those are great - for sure - but this is to be run on a boat at sea, with Internet out of reach.
Notice on the snapshots that several data come from some sensors hooked-up on the Raspberry PI. They can be shown or hidden from the preferences or from the Console Admin page.
Notice that the Console Admin page has been removed from the Console, it can now be accessed from a separate URL, on the admin port (8080 by default) at http://machine:port/html5/admin.html, started when the console is in headless mode:
The default values on the pages above come from the Desktop Preferences.
And there is now a CLI (Command Line Interface) for to access those preferences from a non-graphical environment (like on the Raspberry PI).
The class to launch is olivsoftdesktop.PreferencesCLI. An entry will added soon in the User Interfaces.

All this runs fine on the Raspberry PI, all the snapshots above have been taken with the Raspberry PI run node.js as server.

An idea...

Anyone with a smartphone or a tablet can access those live data. The problem is to type in the right URL...
Once you have chosen your configuration (IP address and ports), you can generate QR Code (https://www.the-qrcode-generator.com/ worked for me), print them, and post them somewhere in the boat. Whoever wants to reach the data just uses his QR Scanner - all smart stuffs have at least one - and boom! You're in!

HTML5 console

HTML5 WebSocket console

HTML5 Admin console
Those pages support query string parameters theme and border. theme can be 'white' or 'black', border can be 'Y' or 'N'.
Like in http://machine:9999/html5/console.html?theme=white&border=N

There are several QR Code generators, including some you can run off-line. This one works just fine, and can be installed on the computer on the boat, so you can generate your codes from anywhere. As you can see here.

Thursday, January 08, 2015

Version 3.0.1.5 available

New version - for both the Weather Wizard and the Navigation Console - 3.0.1.5 is available, at the usual place.
Few new features, minor UI improvements, and big uptake for the Raspberry PI.
A new feature for the Weather Wizard in headless mode, you can download several composites at the same time (one after the other actually). Use the -composite: and -pattern: parameters, separate each value with a comma.
For example, on Windows:
 set PRMS=-composite:./patterns/01.Favorites/01.3.00.Pacific.Sfc.500.Tropic.GRIB.ptrn
 set PRMS=%PRMS%,./patterns/01.Favorites/06.01.AllPac.Faxes.Satellite.ptrn
 set PRMS=%PRMS% -interval:360 
 set PRMS=%PRMS% "-pattern:/yyyy/MM-MMM | | yyyy-MM-dd_HHmmss_z | _Pacific | waz,/yyyy/MM-MMM | | yyyy-MM-dd_HHmmss_z | _Pacific.SatPic | waz"
 ::
 set command=java %JAVA_OPTIONS% -client -classpath "%CP%" -Dheadless=true main.splash.Splasher %PRMS%
On Linux and Mac:
 PRMS=-composite:./patterns/01.Favorites/01.3.00.Pacific.Sfc.500.Tropic.GRIB.ptrn
 PRMS=$PRMS,./patterns/01.Favorites/06.01.AllPac.Faxes.Satellite.ptrn
 PRMS=$PRMS -interval:360 
 PRMS=$PRMS "-pattern:/yyyy/MM-MMM | | yyyy-MM-dd_HHmmss_z | _Pacific | waz,/yyyy/MM-MMM | | yyyy-MM-dd_HHmmss_z | _Pacific.SatPic | waz"
 #
 command=java $JAVA_OPTIONS -client -classpath "$CP" -Dheadless=true main.splash.Splasher $PRMS

Thursday, July 10, 2014

How the Raspberry PI makes sense on board

A computer can be helpful on board, for several reasons.
  • Some useful navigation softwares need one to run (SailMail, for example, that allows you to receive faxes through the SSB, send and receive emails, all kinds of useful things)
  • Some chart plotter softwares (like OpenCPN, the best) require a computer to run as well, to plot the current position on an electronic chart.
  • The on-board electronics can be read from a computer (through NMEA, or some other proprietary protocols), and the data they emit can be used as parameters for calculations, like performance evaluation, routing, current estimation (tricky, but so useful).

Electricity can be precious on board (specially on a sail boat, where it is in short supply), it is required to run several important devices, like the autopilot, the water maker, and to some extend, the fridge. A laptop can draw a substantial amount of current, specially if its battery is old (2 to 3 amps and more, I have evidences). In those conditions, leaving it on all the time can be questionable. On top of that, turning it down, and turning it back up takes time...

Serial port access

The data we are interested in usually (like in 99% of the cases) come from a Serial port (USB, or 9-pins). A big detail to mention is that a Serial port can only be accessed by one process at a time. That means that when your chart plotter accesses the serial port, no other program can access it, even it is is not the same data the other program is interested in.
The chart plotter will be interested in the GPS data, another soft might be interested in the wind data; but there is no way around, one program, one port.
GPSd does not address this issue (even if it pretends to), and - in my opinion - makes things more complex. It's only interested in GPS data (not in Speed Through Water, not in Wind Data, etc), but it locks the port like everyone else, and just rebroadcasts them in another bloody format! Why isn't it just rebroadcasting the NMEA sentences as they've been read?.., I have no idea.

Introducing the Raspberry PI

The Raspberry PI does much more than the boards like Arduino, Sparkfun, Beaglebones, and others (those are great, don't get me wrong, I am not spitting in the soup), it is a fully featured Linux (Debian) computer, that can - as such - do all a computer can do, like multi tasking, multi threading, remote access (SSH, VNC), network access (Ethernet and Wireless). It only has 512 Mb of RAM. But that is enough, as we will see. Its hard disk is replaced by an SD card, ranging from 4GB to whatever you want. I use 16Gb cards. And at work, it draws less than 500mA, which is ridiculous. You can plug several kinds of screen on the Raspberry PI, a TV screen using an HDMI port, or a rear camera car monitor (3.5", 4.3", or 7") using an RCA port. Turning those screens off when not needed will also contribute to save some energy.
The Raspberry PI can read the serial port - Ok, exclusively - and re-broadcast the data on whatever channel (TCP, HTTP, UDP, RMI, whatever). This way they can be accessed from this channel, the data remaining the same. As soon as a device is turned on, it can join the ad-hoc network created by the Raspberry PI, and immediately read the data it broadcasts.

A program like OpenCPN is smart enough to support several kinds of channels.
HTTP is also an option to consider, smart phones and tablets are ready for that, without any modifications. HTML5 and CCS3 will do the job. Those devices have browsers that understand those technologies. It is very easy to display the data read by the Raspberry PI on an iPhone.
In addition, the Raspberry PI can log the data read from the NMEA Port, its SD card is big enough to log several days of data. Another feature of the Raspberry PI is its GPIO Header. This is the bridge to the world of sensors. For example, the BMP180 will allow the Raspberry PI to read the air temperature and the atmospheric pressure. Those data can very well be injected in the NMEA stream (they both have an NMEA equivalent). Some navigation station already provide this kind of interfaces, but in case yours does not, you will then get those data for less than $10.
See some implementation details here.

Even further, it is not difficult to come up with a small setting the Raspberry PI can use to monitor the tension of the batteries on the boat. This one does not - as far as I know - have an NMEA equivalent. It can be injected in the NMEA stream though, it will be considered as a custom sentence. And it can be logged too, along with the rest.
If needed, the data can be displayed on the Raspberry PI as they are read. I did some tests with a graphical interface, as well as in character mode, just to keep the energy consumption as low as possible. The screen is turned off when not needed, for the same reason.

Useful links



Basically, you can reproduce the settings used during the last Aremica's Cup, for a tiny fraction of their budget! The Raspberry PI is less than $40.
Compare with this...

If it does not work for you, do let me know, it should. I might be able to help.