Git Product home page Git Product logo

shipsensing's Introduction

Dock monitor system

This project includes four sub projects.

  1. API - Vessel API to get info about vessels
  2. Pi-Node - Node server that takes picture of vessel and stores the data to database
  3. Pi-C - Manages communication with arduino via XBee
  4. Arduino - Handles sensor logic and communicates with PI via XBee
  5. Web - Interface to check out dock activity. Also has an api to get the dock activity.

Installing Project

$ git clone git://github.com/aaronsmooth/ShipSensing.git

======

Using API's

###Vessel API To lookup a vessel you must create a search field that passes a fully-qualified URL content request to the Vessel API.

#####Query Parameters

  • key - Search Key. [mmsi, imo, id, name]
  • val - Value of the key.
  • format - Format of the result. [json, xml]

Examples of fully-qualified URLs:

  1. http://vesselapi.parseapp.com/lookup?key=name&val=TUGELA&format=json
  2. http://vesselapi.parseapp.com/lookup?key=name&val=WORLD%20SPIRIT&format=xml
  3. http://vesselapi.parseapp.com/lookup?key=mmsi&val=636015819&format=json
  4. http://vesselapi.parseapp.com/lookup?key=imo&val=9191319&format=xml
$ curl --request GET "http://vesselapi.parseapp.com/lookup?key=name&val=TUGELA&format=json"

###Activity API To search for activites you must create a search field that passes a fully-qualified URL content request to the web API.

#####Query Parameters

  • limit - Limit of the search results. Default is 10. Set limit to "none" to get all results. [1 to whatever number you want]
  • format - Format of the result. [json, xml]
  • mmsi, imo, name and id can be used to filter results.

Examples of fully-qualified URLs:

  1. http://dockmonitor.parseapp.com/activity?limit=2&format=json
  2. http://dockmonitor.parseapp.com/activity?limit=none&format=json
  3. http://dockmonitor.parseapp.com/activity?mmsi=248264000&limit=2&format=xml
$ curl --request GET "http://dockmonitor.parseapp.com/activity?limit=none&format=xml"

======

Building Project

###Pi-Node

#####Install and setup Node

// Update package manager
$ sudo apt-get upgrade && sudo apt-get update

// Install Node
$ wget http://nodejs.org/dist/v0.10.2/node-v0.10.2-linux-arm-pi.tar.gz
$ tar -xvzf node-v0.10.2-linux-arm-pi.tar.gz

// Set NODE_JS_HOME variable to the directory where you un-tarred Node, and add the bin dir to your PATH
$ NODE_JS_HOME=/home/pi/node-v0.10.2-linux-arm-pi 
$ PATH=$PATH:$NODE_JS_HOME/bin

#####Running Node server

// Go to "pi-node" directory of the project
$ npm install

// Wait for all dependencies to be installed and then run the server
$ node server.js

###Pi-Py Setup

// Go to "pi-py" directory of the project
$ bash setup.sh

// Wait for setup to complete
$ ./server.py

shipsensing's People

Contributors

pasangsherpa avatar amnelson avatar jsebrof avatar

Watchers

 avatar  avatar Aaron Nelson avatar

Forkers

pasangsherpa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.