npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tuktuk-chart-plotter

v0.0.21

Published

Tuktuk chart plotter with SignalK and MBTiles support

Downloads

46

Readme

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 4999
  • CHARTS_PATH = location for chart files (.mbtiles), default charts/
  • CLIENT_CONFIG_FILE = client config file, default client-config.json

Client config

  • When the plotter is ran with a local server using npm run start or npm run watch, the browser will receive a configuration file defined by the CLIENT_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": [19.105224609375, 59.645540251443215, 27.88330078125, 65.84776766596988],
      "center": [24.805, 60.0888]
    }
  ]
}

Data providers

Signal K

Chart plotter is designed to work with Signal K:

"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