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

koenig-planner

v0.7.0

Published

WebAssembly bindings for the Koenig-D'Amico fuel-optimal impulsive maneuver planner

Readme

koenig-planner

WebAssembly bindings (npm package koenig-planner, Rust crate koenig-damico-planner-wasm) for the Koenig-D'Amico fuel-optimal impulsive maneuver planner, plus a client-side browser demo in the repo. The solver runs entirely in the browser — nothing leaves the machine.

Install (npm)

Published to npm as koenig-planner, built with wasm-pack --target bundler — your bundler (Vite / webpack / rollup / Next) wires up the .wasm automatically:

npm install koenig-planner
import { solve, version } from "koenig-planner";

// Chief orbit (deg / m), target relative orbital elements, and a cost model.
const request = {
  chief: { a: 25_000e3, e: 0.7, i: 40, raan: 358, argp: 0, mean_anom: 180 },
  t_i: 0,
  t_f: 117_990,
  dt: 30,
  w_meters: [50, 5000, 100, 100, 0, 400], // [δa, δλ, δeₓ, δe_y, δiₓ, δi_y]·a
  cost: { type: "piecewise" }, // or { type: "norm2" } / { type: "facemax" }
};

const outcome = solve(request); // typed SolveOutcome — never throws for a valid SolveRequest
if (outcome.status === "ok") {
  const { maneuvers, total_dv } = outcome.value;
  console.log(`${maneuvers.length} burns, Δv cost ${total_dv} m/s`);
} else {
  console.error(outcome.error.kind, outcome.error.message);
}

console.log(version());

This is a pure-compute solver with no DOM dependency. The --target web build in the Build section below is for running the bundled demo locally.

Interface

  • solve(req: SolveRequest): SolveOutcome — typed; never throws for a valid SolveRequest (errors are a { status: "err", error: { kind, message } } value). Untyped JS passing a malformed object throws at the deserialization boundary before the solver runs; unknown keys are ignored on this path (unlike solve_json, which rejects them).
  • solve_json(json: string): string — string-in/string-out escape hatch; returns the response JSON, or throws the serialized { kind, message } JSON on failure.
  • version(): string — the crate version (used by the demo footer).

Types are generated by tsify and shipped in the pkg/*.d.ts produced by wasm-pack.

Build

wasm-pack build crates/wasm --target web      # → crates/wasm/pkg/
cd crates/wasm/www && npm install && npm run dev

crates/wasm/pkg/ is a generated wasm-pack artifact (gitignored) that the demo consumes via its file:../pkg dependency. npm run dev and npm run build rebuild it first (the predev/prebuild hooks), so the standalone wasm-pack build line is only needed once before the initial npm install, which must resolve file:../pkg.

Demo

crates/wasm/www is a React + React-Three-Fiber app (built with Vite) — the "Koenig-D'Amico Impulsive Control Solver" console. It takes a chief orbit, target ROEs, and a cost model and renders the plan entirely client-side: two interactive 3D scenes (the chief orbit in ECI, and the deputy's relative orbit in the RTN frame — both with per-maneuver Δv arrows and a swept primer arrow), a Δv timeline, per-maneuver RTN Δv components, primer-magnitude and primer-component charts, and a playback scrubber.

Test

This crate targets wasm32 only (it is never built for the host), so all tests run on the wasm target via wasm-pack:

wasm-pack test --node crates/wasm   # unit + boundary tests, in Node