What to do with boat data....

What's all this data going to be used for?

It going to feed the Internet of Things donchaknow... :)

I was playing around with graphing barometric pressure over time, which was kind of interesting.
Perhaps RPM or windspeed vs boatspeed over time to let you know when you really need a scrub?
An automated log book?
Contributing to Teamsurv surveys?
 
I can accept the explanation "I just like doing it" don't try to persuade me that it has any practical use at all.
It going to feed the Internet of Things donchaknow... :)

I was playing around with graphing barometric pressure over time, which was kind of interesting.
Perhaps RPM or windspeed vs boatspeed over time to let you know when you really need a scrub?
An automated log book?
Contributing to Teamsurv surveys?
 
What's all this data going to be used for?

"Because it's there" is the usual answer!

However, as a scientist in a data-heavy field (Geographic Information), I can assure you there no such thing as too much data. The more you have, the more you can find out about the underlying systems, and often you find out things you'd never have known if you hadn't collected a vast bulk of data.

However, that depends on having effective ways of visualizing and analyzing the data. We are all used to an extremely data heavy application in the form of weather forecasts; in principle this is no different. But we don't perceive weather forecasts as the extremely data intensive things that they are because over the years effective and elegant ways of analyzing and presenting the data have been developed.
 
Before getting to highcharts I'm pulling my hair out here trying to get php to create a rrdtools graph this module..
http://php.net/manual/en/book.rrd.php

The info seems to work but rrd_graph won't, just a blank error.

Did you use php direct on rrdtool?

Some examples would be great.

I use the RRDexport to XML command (fired at the same time you update the RRD database)
then the highchart page, just uses the already generated XML file.
 
Last edited:
Life is too short to trawl through this (particularly minority interest) thread, but I wonder if anybody has so far suggested that perhaps it's in the wrong forum?
Personally I would just go sailing.

I would just like to go sailing as well, however as my boat's the other side of the country I like to know what the conditions are likely to be, as well as keep an eye on the boat.

I keep a raspberry pi running with a webcam and pressure+temperature sensors. A photo is taken every fifteen minutes and the data is periodically sent to a webserver (another Pi) using rsync where it is graphed for the preceding few days: http://agurney.myftp.org/aisling/

The Pi's left on 24x7, and a wind generator stops it draining the battery.
 
<really pedantic> I was quoting George Mallory!</really pedantic>

Mallory wants to steal your data. Better to quote Monroe

data.png
 
Pretty much there with all the main bits working :cool:
Video is a bit low resolution, but there's a start and end box where you put in something like "-12h" & "now" then some click boxes for what nmea data to print, and off it goes :)
Just more cut and paste to finish off the web page and back to the proper jobs list, but we'll worth a good few hours messing about with some code, imho.
(next stop, highcharts and getting an esp8266 sending over batteries voltage wireless)

 
My S.USV UPS board arrived today and it is just the ticket. Has a 300mA battery which can power a pi for approx 30 minutes. The battery is charged while the pi is on, and 10 seconds (user defined) after the power is removed the S.USV performs a controlled shutdown. There are many configuration options, including timed startups and shutdowns (the UPS has its own real time clock) - might be useful - and user defined scripts executed on shutdown. I bought the basic one as I already had a 12V to 5V DC convertor. The advanced one has a DC input which will accept anything from 7V to 24V, so powering from a solar panel is an option. Hopefully the end of corrupt SD cards.
 
Looks like a capable device, your Pi will love you for it :)

I was thinking of just adding an old USB power bank in line just in case I hit the wrong switch by mistake and hopefully smooth things out a bit when starting the engine.

Real time clock would be handy though, Openplotter syncs to gps time so you need to remember to turn that on first before booting up the Pi.
 
Update just for the one or two who might actually be interested ;)

Pi has been running full time for many months, data gets recorded to a sqlite3 database which is easy to copy over to anywhere. Not hard to record as openplotter does everything in signalk, node-red takes care of shoving everything into the database once a minute.

Right now on a job with loads of time sitting around and a guy who knows much more python than me suggesting a few pointers , the bokeh python library is fantastic! Time for another look at graphing it.

So pretty much sorted, and very interesting so far :cool:
Battery voltage is useful living onboard.

This will take a while to load as it's a slow server and about 6Mb, the python code creates a web page on your hard drive , I just copied it over to a web site for a look online. 5 data types so far. Click on the legend to show/hide. The only saved database I could find backed up to dropbox was for a last summer, away from the boat at the moment.
http://www.moondogmoving.co.uk/lines.html

1stPyGraph.JPG


Python code - any suggestions to trim it down a bit very welcome.

Code:
from bokeh.plotting import figure, output_file, showimport sqlite3
import pandas as pd
from bokeh.io import output_notebook
import numpy as np
from bokeh.models import ColumnDataSource, CheckboxGroup, RadioGroup, Toggle
from bokeh.layouts import row




conn = sqlite3.connect('boatdata.db')
df = pd.read_sql_query("select timestamp , eng from engine;", conn, parse_dates=['timestamp'])
df2 = pd.read_sql_query("select timestamp , SOG  from navdata;", conn, parse_dates=['timestamp'])
df3 = pd.read_sql_query("select timestamp , main_batt / 1000  from LX;", conn, parse_dates=['timestamp'])
source = ColumnDataSource(df)
source1 = ColumnDataSource(df2)
source2 = ColumnDataSource(df3)


# output to static HTML file
output_file("lines.html")


# create a new plot with a title and axis labels
p = figure(title="Boat Database", x_axis_label='Time',plot_width=1200, 
           plot_height=600, tools="pan, wheel_zoom,  box_zoom,hover, reset", x_axis_type='datetime')


# add a line renderer with legend and line thickness


p.line(x='timestamp', y='SOG', legend="Speed", source=source1, line_width=2, visible = False, color='red')
p.line(x='timestamp', y='main_batt / 1000', legend="Battery Voltage", source=source2, line_width=2, color='blue')
p.line(x='timestamp', y='eng', legend="Engine Temperature", source=source, line_width=2, visible = False, color='blue')
# show the results
p.legend.click_policy="hide"






show(p)
 
Last edited:
What are you going to use all that data for?

Really doesn't matter if it doesn't get used. It's automatic. Done. There should you want it. And fun to do, plus lots learned.

Though in the real world it's handy for spotting tends. Already spotting the engine starting to run a few degrees hotter long before the overheat alarm would have even though about triggering flagged up a chunk of pine needles wedged below the water input filter. Exhaust or alternator running hotter could flag up an impending problem. Daily battery voltage is very useful to keep an eye on. When engine revs get added it will be a hint as to how clean the bottom is with sog against revs. Lots of things.

Though do you really want to know or just want to infer that it's a waste of time ;)

(note the post was to just for the one or two who might actually be interested, are you actually included in that?)
 
Top