Tuktuk Chart plotter
Chart plotter for Signal K with the support for raster chart providers.
Very much WIP.
|
Usage
Install "Tuktuk chart plotter" webapp from the Signal K Appstore together with @signalk/charts-plugin.
Configure charts plugin to server some charts and open the Tuktuk chart plotter in
<signalk-server-address>/tuktuk-chart-plotter/
.
Some example MBTiles charts can be found from:
- Finnish nautical charts: https://github.com/vokkim/rannikkokartat-mbtiles
- NOAA charts: https://github.com/vokkim/noaa-nautical-charts
Developing
Install dependencies:
npm install
Running tests (only eslint for now):
npm run test
Start development server:
npm run watch
Plotter accessible at http://localhost:4999/ To see actual data, you should have a signalk-server-node running and maybe some charts.
Code style
Tuktuk uses uses eslint and Prettier to enforce and format code style. To auto-format the code run:
npm run lint-fix
Local server
Tuktuk ships with a local server intended for development use only. For production use, please install Tuktuk as a Signal K Webapp
Environment variables
PORT
= server port, default 4999CHARTS_PATH
= location for chart files (.mbtiles
), defaultcharts/
CLIENT_CONFIG_FILE
= client config file, defaultclient-config.json
Client config
-
When the plotter is ran with a local server using
npm run start
ornpm run watch
, the browser will receive a configuration file defined by theCLIENT_CONFIG_FILE
environment variable. -
When the plotter is accessed through Signal K server plugin, the browser will use default Signal K configration defined in
public/index.html
Example config:
"data":"type": "signalk""address": "localhost:3000""course": "COG""follow": true"showInstruments": true"zoom": 13"charts":"index": 0"type": "tilelayer""maxzoom": 15"minzoom": 4"name": "liikennevirasto_rannikkokartat_public_15_4""description": "Lähde: Liikennevirasto. Ei navigointikäyttöön. Ei täytä virallisen merikartan vaatimuksia.""tilemapUrl": "/charts/liikennevirasto_rannikkokartat_public_15_4/{z}/{x}/{y}""bounds": 19105224609375 59645540251443215 2788330078125 6584776766596988"center": 24805 600888
Data providers
Signal K
Chart plotter is designed to work with Signal K:
- Install and run signalk-server-node
- Add
signalk
data provider toclient-config.json
:
"data":"type": "signalk""address": "localhost:3000"...
Browser Geolocation API
To use the Geolocation API, add geolocation
provider:
"data":"type": "geolocation"...
Local charts
Put charts in MBTiles format to your CHARTS_PATH
.
Files must end with .mbtiles
postfix. Charts found by the chart plotter are listed in http://localhost:4999/charts/
.
Local charts are configured in client-config.json
by adding local
chart provider:
..."charts":"index": 0"type": "local"...
Signal K charts
Map tiles hosted by Signal K server are configured in client-config.json
by adding signalk
chart provider:
..."charts":"index": 2"type": "signalk""address": ":3000"...
Online charts
Other charts in client-config.json
are of type tilelayer
:
"charts":"index": 1"type": "tilelayer""maxzoom": 15"minzoom": 1"name": "OpenStreetMap""description": "OSM charts.""tilemapUrl": "http://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
License
MIT