Platform for processing and interacting with boat sensor data. Runs on Raspberry Pi or BeagleBone Black.
JavaScript HTML CSS
Switch branches/tags
Nothing to show
Clone or download

README.md

#HomeGrown Marine: Boat Computer

The HomeGrown Marine Boat Computer is a platform for processing and interacting with boat sensor data, such as GPS speed, position, heading, and wind. It runs on a small PC on the boat, like a Raspberry Pi or Beaglebone Black, so you can build a WiFi streaming boat computer for under $100. Its designed with a modular architecture that will let you pick and choose the functions you need, or easily develop your own modules. With this, you can build a regatta processor to compete with very expensive offerings from the big guys.

It is designed using Node.js, which allows for a really flexible and light weight webserver. And, Node's event based architecture also works really well with the nature of sensor data. Modules that process and consume event data can cleanly subscribe to relavent events, such as new wind or gps messages.

###Included Apps:###

  • docs: store racing related docs in the boat computer, so you have access to them on the water

  • logs: log NMEA 0183 sensor data to disk, so that it can be analysed later

  • events: log rig tune changes, so that you can compare the effects of different settings

  • udp_broadcast : broadcasts nmea stream over UDP so that it can be used with iPhone and android apps like iRegatta or NMEARemote

  • polars: will calculate target heel, wind angles and speed given current wind speed

  • tacktick: converts heel and target data from polars app into special messages so that they can be displayed on your tacktick screens.

###Other App Projects:###

Build One

This can be done easily, with a little soldering and assembly.

Materials:

The serial data converter will convert from the 12V RS-232 style data sent by your instruments to 3V TTL as expected by the miniPC.

TODO: diagrams and pictures.

  1. Install node.js and forever on boat PC
  • Raspberry Pi
  • BeagleBone Black - comes pre-installed on BeagleBone Black
  1. Copy boat_computer project and any desired apps to boat PC
  2. install node serial port
  3. run '''npm install''' from the project directory
  4. install startup scripts make sure apache is disabled if you want to use port 80

####If you're have trouble setting this up and getting it running, please open an issue to ask for help here.

If you just want to record your boat data, check out this simple NMEA Logger. It will just log boat data to an SD card.

Make An App

Apps are the way of extending your boat computer. They can be light-weight, just responding to data changes, or they can include a web based user interface component. The boat computer will import, and try and call a load method on every file or directory in the apps/ directory. The load method will receive three arguments: server, boat_data, and settings.

module.exports.load = function(server, boat_data, settings)

server

server is the Boat Computer webserver. It can serve simple static web pages and server dynamic programic interfaces into the sensor data. It is an express.js server object.

settings

Settings is the global preference and configuration storage mechanism. It only has two methods: get(key) and set(key, value). So, if an app needs to either save a user preference or configuration value, this is the way to do it.

boat_data

boat_data is the interface to the boat's NMEA 0183 instrument system. It can either receive or broadcast nmea messages or parsed data. Receiving data works by subscribing to one of three events:

  • 'nmea' - receive the raw NMEA messages off of the serial bus.
  • 'data' - receive all parsed data as objects
  • 'data:type' - receive only specific types of data. For example, receive only GPS data by subscribing to 'data:rmc'

sending data to other apps and the instrument system is done by calling boat_data.broadcast(message,data). If only message is specified, it will be sent only to the serial bus. If data is specified, as a json object, it will be broadcast to the rest of the apps on your system. If an encoder is specified for the data type, it will also be encoded into a NMEA sentence and broadcast over the serial bus.

TODO:

- use homegrown nmea

Next Steps

  • better installation scripts and instructions
  • support for NMEA 2000 and signal k
  • more apps
  • move log zip dir to tmp
  • move docs dir to somewhere else.