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 🙏

© 2026 – Pkg Stats / Ryan Hefner

signalk-compass-calibrator

v0.2.0

Published

Signal K plugin that calibrates magnetic heading from source-aware historical navigation data.

Downloads

121

Readme

Signal K Compass Calibrator

Signal K plugin that calibrates a selected magnetic heading source from source-aware historical navigation data, then publishes a corrected navigation.headingMagnetic value as a distinct Signal K source.

Status

Initial implementation for testing on real Signal K installations.

The calibration step currently uses a Prometheus-compatible history backend such as VictoriaMetrics. This is intentional for now: the Signal K History API does not expose the Signal K source label needed to calibrate one physical heading source against matching historical COG/SOG/variation data.

Use macjl/signalk-prometheus-exporter-macjl to export source-aware Signal K data to Prometheus/VictoriaMetrics until source-aware history is available directly from Signal K.

Once a profile is accepted and activated, runtime publishing is intentionally frugal: the active correction table is compiled in memory and the plugin only publishes the corrected navigation.headingMagnetic value. Runtime calibration is inactive until both a saved table and a live Signal K input source are explicitly selected in the web app.

Features

  • Select one raw magnetic heading source to calibrate.
  • Select COG, SOG, and magnetic variation reference sources.
  • Discover historical sources through Prometheus/VictoriaMetrics labels.
  • Run explicit batch calibration over a selected time range, with coarse preselection of useful moving periods, 1-second boundary refinement, and stable COG sub-segment selection.
  • Review timelines, zoomed navigation periods, radial heading coverage, correction bins, adaptive per-period thresholds, quality metrics, warnings, and a labelled correction plot.
  • Save or discard candidate tables, view/delete saved tables, and select the runtime table and live Signal K input source separately.
  • Publish only the corrected heading at runtime on navigation.headingMagnetic.
  • Avoid feedback loops by ignoring the plugin's own Signal K source.

Installation

From a Signal K server environment:

npm install github:macjl/signalk-compass-calibrator

Then enable the plugin from the Signal K plugin configuration UI.

After restarting Signal K, open the app from the Admin UI Web Apps menu. It is registered as an embeddable webapp, so the Signal K admin navigation stays visible while the calibrator runs in the content area.

Configuration

The plugin configuration page intentionally has no operational fields. Configuration is done in the Compass Calibrator web app:

  • Prometheus/VictoriaMetrics base URL and optional basic auth.
  • metric names for heading, COG, SOG, and variation.
  • Signal K context, inferred from historical navigation.magneticVariation and selectable before calibration.
  • historical source selections for heading, COG, SOG, and variation.
  • saved calibration table and live Signal K input source for runtime publishing.

Speeds are shown in knots in the web app. Final calibration samples are fetched at a fixed 1-second resolution from useful navigation sub-periods selected by the adaptive calibration algorithm.

Default runtime output:

navigation.headingMagnetic

Default Signal K output source:

signalk-compass-calibrator

Development

npm test

GitHub Actions uses the shared Signal K plugin CI workflow to validate the package on pushes and pull requests.

The CI workflow also runs Signal K integration checks, verifies App Store packaging, validates the plugin schema, checks Node 20 compatibility for Cerbo GX/Venus OS, and simulates App Store installation with npm install --ignore-scripts.

Author

Jean-Laurent Girod, @macjl

License

Apache-2.0