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-auto-polar

v0.0.2

Published

Aggregates boat performance data into running averages per wind condition (with a capped count) and displays the results via a static HTML/JS interface with CSV download.

Readme

Automatic Polar Performance Aggregator

Overview

The Automatic Polar Performance Aggregator is a SignalK plugin that collects and aggregates boat performance data under various wind conditions to create a polar performance diagram. The plugin processes incoming sensor data (wind speed, wind angle, and boat speed) and assigns the data to specific wind condition bins. Each bin maintains a sliding window of recent boat speed measurements from which it calculates a moving average. This average is then used to update a "potential speed" for that bin using an upgrade/decay method.

How It Works

  1. Synchronized Data Collection:

    • The plugin listens for SignalK delta updates.
    • It uses timestamps for each sensor reading to ensure that wind speed, wind angle, and boat speed are captured within a short window (one second by default).
    • If the time difference between the oldest and newest sensor reading exceeds one second, outdated values are discarded. This guarantees that only a synchronized set of readings is processed.
  2. Data Smoothing and Binning:

    • Each sensor reading is cached until enough data points (defined by a smoothing factor) are collected.
    • The averaged sensor values are binned based on wind speed (rounded to the nearest knot) and wind angle (rounded to the nearest 5°).
  3. Potential Speed Calculation:

    • For each bin, a sliding window (e.g., 60 data points representing about one minute) is maintained.
    • A moving average is calculated from this window.
    • Upgrade Logic: If the moving average exceeds the current stored potential speed, it is updated immediately.
    • Decay Logic (Optional): If the moving average is lower than the stored value, the potential speed decays slowly (using a configurable decay factor). This helps prevent transient low readings from abruptly reducing the potential speed.
  4. Data Persistence and Display:

    • Aggregated data is periodically saved to a JSON file, ensuring persistence across restarts.
    • The plugin provides HTTP endpoints for accessing a static web interface, JSON data, and CSV downloads of the polar performance data.

Why This Method?

  • Synchronized and Robust:
    By ensuring that sensor readings are processed only if they are within one second of each other, the plugin minimizes the risk of processing asynchronous data. This leads to a more accurate representation of your boat's performance.

  • Responsiveness:
    A small sliding window captures current performance trends without the overhead of maintaining a long history, ensuring that the polar diagram reflects recent improvements.

  • Efficiency:
    The combination of moving averages, upgrade/decay logic, and time-based synchronization provides a robust measure of potential speed with minimal processing and memory overhead.

Installation

  1. Copy the plugin folder into your SignalK plugins directory.
  2. Restart SignalK.
  3. Configure the plugin from the SignalK UI if needed (for example, adjusting the smoothing factor, sliding window size, or max time between values).

Usage

Once installed, the plugin automatically subscribes to the necessary SignalK paths and begins aggregating data. Access the plugin’s interface via:

  • Web Interface: [Your SignalK URL]/plugin/polar-performance
  • CSV Download: [Your SignalK URL]/plugin/polar-performance/csv

This data can then be used to analyze your boat’s performance under varying wind conditions.

License

ISC License
This project is licensed under the ISC License, a permissive open-source license that is both simple and minimalistic. It grants you the freedom to use, copy, modify, and distribute the software for any purpose, including commercial applications, provided that the original copyright notice and permission text are included in all copies. The ISC License is functionally similar to the MIT and simplified BSD licenses, making it popular among developers for its clarity and minimal restrictions. By choosing this license, the project contributors aim to encourage widespread use and collaboration while providing the software "as is" without warranty or liability.