# GNUBoat GNUBoat software suite allows you to - measure the water depth on any devices (vessles, ...) with a water depth sensor in an NMEA2000 network (module device) - provides a webservice with OpenAPI defined interface to upload and analyse the measurements (module mapservice) - a webclient to explore the maps with the analysed water depths on it (module mapservice-webclient) On top there is a module with common stuff. ## Interoperability GNUBoat is fully open sourced and free software. To be as interoperable as possible, it is designed with a webservice architecture utilizing OpenAPI specifications. This specification describes the interfaces provided by the webservices and used by the clients in a human readable, but machine parseable way. So any other service or client could be easily integrated in the GNUBoat environment. **We like to happliy welcome any new clients and services!** You find the API descriptions in the _api_ folder of this repository or via the integrated swagger-editor within the webservices. Just call the e.g. [http://localhost:8080/mapservice/v1/ui/] after starting the mapservice in development mode like described below. If you have any questions, your welcome to contact us. ## Installing the modules You first need to generate the server stub with help of openapi-generator. To be able to do that, you need to have java installed. Than run: ``` buildhelpers/configure # to generade the all modules from the API specs python setup.py install # to install the module ``` ## GNUBoat Device The GNUBoat Device contains all components to log the data and interact with the user through a web interface. To do so, it consists of three components: - deviceservice: a webservice serving the webclient and connecting to the mapservice, if a network connection is available - gnuboat-daemon: The daemon queriing the NMEA2000 network and GPS dongle, storing the data to the log file and the rrd database, used by te deviceservice - The webclient as the user frontend for the gnuboat device. Actually it is served by deviceservice ### Production environment It is advised to install the provided debian package and configure it afterwards with help of the delivered puppet configuration. ### Development environment In this mode, the deviceservice simulates entries to the rrd database. Therefore the webclient is fully functional, without the need of a GPS device or a NMEA2000 network. gnuboat-device-daemon is not needed for the same reason. To start it in development mode (with a demo SQLite database): ``` export FLASK_ENV='Development' gnuboat-dev-deviceservice ``` If you want to test the interaction with a mapservice instance, run the mapservice in development mode as mentioned below in parallel. Than go to [http://localhost:8090] to visit the client or read the api specification via [http://localhost:8090/deviceservice/v1/ui/]. ## GNUBoat mapservice ### Production environment It is advised to install the provided debian package and configure it afterwards with help of the delivered puppet configuration. ### Development environment To start it in development mode (with a demo SQLite database): ``` export FLASK_ENV='Development' gnuboat-dev-mapservice ``` To be able to upload logs, you also need to launch - the broker rabbitmq - the result backend memcached - the celery worker Start them with ``` sudo service rabbitmq-server start sudo service memcached start export FLASK_ENV='Development' gnuboat-dev-mapservice-worker ``` You maay access the api specification via [http://localhost:8090/deviceservice/v1/ui/] now. ## GNUBoat mapservice-webclient Run the following command in src/mapservice-webclient (you need node.js installed!): ``` npm start ``` Please start the mapservice also and than visit [http://localhost:8001] in your browser. If you started `gnuboat-dev-mapservice` in development mode, as described above, you can login with user _jane_ and _testpass_. ## GNUBoat common GNUBoat common contains some helpful scripts: - gnuboat-log-converter: converts logfiles from NMEA0183 text format into different other formats - gnuboat-log-analyser: creates raster tiles out of logfiles - gnuboat-log-uploader: uploads logfiles to the mapservice All scripts display a help with _--help_ and have a manpage with additional information about their usage. ## Additional Resources - [trac.engsas.de/gnuboat]: GNUBoats development area - [svn.engsas.de/gnuboat]: GNUBoats git repository ## Related projects - [http://www.openseamap.org] - [http://openstreetmap.org] - [https://github.com/canboat/canboat] - [https://github.com/zalando/connexion]