| 1 | # GNUBoat
|
|---|
| 2 |
|
|---|
| 3 | GNUBoat software suite allows you to
|
|---|
| 4 | - measure the water depth on any devices (vessles, ...) with a water depth
|
|---|
| 5 | sensor in an NMEA2000 network
|
|---|
| 6 | (module device)
|
|---|
| 7 | - provides a webservice with OpenAPI defined interface to upload and
|
|---|
| 8 | analyse the measurements
|
|---|
| 9 | (module mapservice)
|
|---|
| 10 | - a webclient to explore the maps with the analysed water depths on it
|
|---|
| 11 | (module mapservice-webclient)
|
|---|
| 12 |
|
|---|
| 13 | On top there is a module with common stuff.
|
|---|
| 14 |
|
|---|
| 15 | ## Interoperability
|
|---|
| 16 |
|
|---|
| 17 | GNUBoat is fully open sourced and free software. To be as interoperable as possible,
|
|---|
| 18 | it is designed with a webservice architecture utilizing OpenAPI specifications. This
|
|---|
| 19 | specification describes the interfaces provided by the webservices and used by the clients
|
|---|
| 20 | in a human readable, but machine parseable way. So any other service or client could be
|
|---|
| 21 | easily integrated in the GNUBoat environment. **We like to happliy welcome any new clients and services!**
|
|---|
| 22 | You find the API descriptions in the _api_ folder of this repository or via the integrated
|
|---|
| 23 | swagger-editor within the webservices. Just call the e.g. [http://localhost:8080/mapservice/v1/ui/]
|
|---|
| 24 | after starting the mapservice in development mode like described below. If you have any
|
|---|
| 25 | questions, your welcome to contact us.
|
|---|
| 26 |
|
|---|
| 27 | ## Installing the modules
|
|---|
| 28 |
|
|---|
| 29 | You first need to generate the server stub with help of openapi-generator.
|
|---|
| 30 | To be able to do that, you need to have java installed. Than run:
|
|---|
| 31 |
|
|---|
| 32 | ```
|
|---|
| 33 | buildhelpers/configure # to generade the all modules from the API specs
|
|---|
| 34 | python setup.py install # to install the module
|
|---|
| 35 | ```
|
|---|
| 36 |
|
|---|
| 37 | ## GNUBoat Device
|
|---|
| 38 |
|
|---|
| 39 | The GNUBoat Device contains all components to log the data and interact with the
|
|---|
| 40 | user through a web interface. To do so, it consists of three components:
|
|---|
| 41 | - deviceservice: a webservice serving the webclient and connecting to the mapservice, if
|
|---|
| 42 | a network connection is available
|
|---|
| 43 | - gnuboat-daemon: The daemon queriing the NMEA2000 network and GPS dongle, storing the
|
|---|
| 44 | data to the log file and the rrd database, used by te deviceservice
|
|---|
| 45 | - The webclient as the user frontend for the gnuboat device. Actually it is served by
|
|---|
| 46 | deviceservice
|
|---|
| 47 |
|
|---|
| 48 | ### Production environment
|
|---|
| 49 |
|
|---|
| 50 | It is advised to install the provided debian package and configure it afterwards
|
|---|
| 51 | with help of the delivered puppet configuration.
|
|---|
| 52 |
|
|---|
| 53 | ### Development environment
|
|---|
| 54 |
|
|---|
| 55 | In this mode, the deviceservice simulates entries to the rrd database. Therefore
|
|---|
| 56 | the webclient is fully functional, without the need of a GPS device or a NMEA2000
|
|---|
| 57 | network. gnuboat-device-daemon is not needed for the same reason.
|
|---|
| 58 |
|
|---|
| 59 | To start it in development mode (with a demo SQLite database):
|
|---|
| 60 | ```
|
|---|
| 61 | export FLASK_ENV='Development'
|
|---|
| 62 | gnuboat-dev-deviceservice
|
|---|
| 63 | ```
|
|---|
| 64 |
|
|---|
| 65 | If you want to test the interaction with a mapservice instance, run the mapservice
|
|---|
| 66 | in development mode as mentioned below in parallel.
|
|---|
| 67 |
|
|---|
| 68 | Than go to [http://localhost:8090] to visit the client or read the api specification
|
|---|
| 69 | via [http://localhost:8090/deviceservice/v1/ui/].
|
|---|
| 70 |
|
|---|
| 71 | ## GNUBoat mapservice
|
|---|
| 72 |
|
|---|
| 73 | ### Production environment
|
|---|
| 74 |
|
|---|
| 75 | It is advised to install the provided debian package and configure it afterwards
|
|---|
| 76 | with help of the delivered puppet configuration.
|
|---|
| 77 |
|
|---|
| 78 | ### Development environment
|
|---|
| 79 |
|
|---|
| 80 | To start it in development mode (with a demo SQLite database):
|
|---|
| 81 | ```
|
|---|
| 82 | export FLASK_ENV='Development'
|
|---|
| 83 | gnuboat-dev-mapservice
|
|---|
| 84 | ```
|
|---|
| 85 |
|
|---|
| 86 | To be able to upload logs, you also need to launch
|
|---|
| 87 | - the broker rabbitmq
|
|---|
| 88 | - the result backend memcached
|
|---|
| 89 | - the celery worker
|
|---|
| 90 |
|
|---|
| 91 | Start them with
|
|---|
| 92 | ```
|
|---|
| 93 | sudo service rabbitmq-server start
|
|---|
| 94 | sudo service memcached start
|
|---|
| 95 | export FLASK_ENV='Development'
|
|---|
| 96 | gnuboat-dev-mapservice-worker
|
|---|
| 97 | ```
|
|---|
| 98 |
|
|---|
| 99 | You maay access the api specification via [http://localhost:8090/deviceservice/v1/ui/] now.
|
|---|
| 100 |
|
|---|
| 101 | ## GNUBoat mapservice-webclient
|
|---|
| 102 |
|
|---|
| 103 | Run the following command in src/mapservice-webclient (you need node.js installed!):
|
|---|
| 104 | ```
|
|---|
| 105 | npm start
|
|---|
| 106 | ```
|
|---|
| 107 | Please start the mapservice also and than visit [http://localhost:8001] in your browser.
|
|---|
| 108 | If you started `gnuboat-dev-mapservice` in development mode, as described above, you can
|
|---|
| 109 | login with user _jane_ and _testpass_.
|
|---|
| 110 |
|
|---|
| 111 | ## GNUBoat common
|
|---|
| 112 |
|
|---|
| 113 | GNUBoat common contains some helpful scripts:
|
|---|
| 114 | - gnuboat-log-converter: converts logfiles from NMEA0183 text format into different other formats
|
|---|
| 115 | - gnuboat-log-analyser: creates raster tiles out of logfiles
|
|---|
| 116 | - gnuboat-log-uploader: uploads logfiles to the mapservice
|
|---|
| 117 |
|
|---|
| 118 | All scripts display a help with _--help_ and have a manpage with additional information about their usage.
|
|---|
| 119 |
|
|---|
| 120 | ## Additional Resources
|
|---|
| 121 |
|
|---|
| 122 | - [trac.engsas.de/gnuboat]: GNUBoats development area
|
|---|
| 123 | - [svn.engsas.de/gnuboat]: GNUBoats git repository
|
|---|
| 124 |
|
|---|
| 125 | ## Related projects
|
|---|
| 126 |
|
|---|
| 127 | - [http://www.openseamap.org]
|
|---|
| 128 | - [http://openstreetmap.org]
|
|---|
| 129 | - [https://github.com/canboat/canboat]
|
|---|
| 130 | - [https://github.com/zalando/connexion]
|
|---|