sudo apt-get update
sudo apt-get install -y git nginx python-pip python-dev python-pandas memcached sqlite3
sudo pip install virtualenv
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
git clone git@github.com:hsiboy/seabus.git
cd seabus
virtualenv /seabus/.venv-seabus
source seabus/.venv-seabus/bin/activate
pip install -r /home/vagrant/seabus/seabus/requirements.txt
note, there is a dependancy on meld3 which wont work with Python3, so you may want to
virtualenv -p `which python2.7` seabus/.venv-seabus
instead.
rm /etc/nginx/sites-enabled/default
cp config/nginx-seabus-dev /etc/nginx/sites-enabled/seabus
mkdir -p /var/www
ln -s /home/<user>/seabus/seabus/web/static /var/www/seabus
service nginx reload
The listener program receives and processses marine telemetry data relayed from a raspberry pi with an RTL-SDR tuner running aisdecoder to decode AIS beacons.
#Web The flask app provides near realtime access to the seabus telemetry data via websocket push updates.
- Initialize empty database.
(.venv) user@host:~/seabus$ ./manage.py db upgrade
To run the web app:
(.venv) user@host:~/seabus$ ./manage.py rundev
To run the listener:
(.venv) user@host:~/seabus$ ./manage.py listendev
To send a few recorded (canned) seabus AIS update beacons to the running listener:
(.venv) user@host:~/seabus/seabus/nmea_listen$ ./sendbeacons.sh seabus_beacons.txt
#API
There is an experimental API read endpoint available at http://api.seab.us/data/v1. At the moment it requires no access key and provides the same data delivered to the web front end. Both of these things may change, watch this space!