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

keplerian-walkerdelta-propagator

v1.0.0

Published

A JavaScript library for two-body Keplerian orbital propagation and Walker Delta constellation generation

Readme

Keplerian Constellation Propagator

A JavaScript library for two-body Keplerian orbital propagation and Walker Delta constellation generation. The library provides tools for satellite position calculation in both ECI and ECEF coordinate systems.

Installation

npm install keplerian-walkerdelta-propagator

Usage

Basic Propagation

const KeplerianPropagator = require('keplerian-walkerdelta-propagator');

const propagator = new KeplerianPropagator();

// Define satellite parameters (Starlink-like orbit)
const satParams = {
  a: 6928137, // meters (altitude 550 km)
  e: 0,
  i: 53.0, // degrees
  raan: 0, // degrees
  argPerigee: 0, // degrees
  trueAnomaly0: 0, // degrees
  epoch: Date.parse('2024-01-01T00:00:00Z'),
};

// Propagate to 1 hour after epoch
const time = satParams.epoch + 3600000;
const position = propagator.propagate({ ...satParams, time });
console.log('Position (ECI):', position);

// Convert to ECEF
const gmst = propagator.gmst(time);
const positionECEF = propagator.eciToEcef(position, gmst);
console.log('Position (ECEF):', positionECEF);

Walker Delta Constellation

// Generate a Starlink-like constellation (72 planes × 22 satellites)
const constellation = propagator.generateWalkerDelta({
  a: 6928137, // meters (altitude 550 km)
  i: 53.0, // degrees
  totalSatellites: 1584, // 72 planes × 22 satellites
  geometryPlanes: 72,
  phasing: 1,
  epoch: Date.parse('2024-01-01T00:00:00Z'),
});

Generate CSV with Positions

const startTime = satParams.epoch;
const endTime = startTime + 24 * 60 * 60 * 1000; // 24 hours
const interval = 60 * 1000; // 1 minute

let csvContent =
  'Time,X_ECI_km,Y_ECI_km,Z_ECI_km,X_ECEF_km,Y_ECEF_km,Z_ECEF_km\n';

for (let time = startTime; time <= endTime; time += interval) {
  const posECI = propagator.propagate({ ...satParams, time });
  const gmst = propagator.gmst(time);
  const posECEF = propagator.eciToEcef(posECI, gmst);

  const date = new Date(time).toISOString();
  // Convert from meters to kilometers
  const x_eci_km = posECI.x / 1000;
  const y_eci_km = posECI.y / 1000;
  const z_eci_km = posECI.z / 1000;
  const x_ecef_km = posECEF.x / 1000;
  const y_ecef_km = posECEF.y / 1000;
  const z_ecef_km = posECEF.z / 1000;

  csvContent += `${date},${x_eci_km.toFixed(9)},${y_eci_km.toFixed(
    9,
  )},${z_eci_km.toFixed(9)},${x_ecef_km.toFixed(9)},${y_ecef_km.toFixed(
    9,
  )},${z_ecef_km.toFixed(9)}\n`;
}

API Reference

KeplerianPropagator

Main class for orbital propagation calculations.

Methods

propagate(params)

Propagates a satellite using Keplerian dynamics.

  • params (Object):
    • a (number): Semi-major axis in meters
    • e (number): Eccentricity
    • i (number): Inclination in degrees
    • raan (number): Right ascension of ascending node in degrees
    • argPerigee (number): Argument of perigee in degrees
    • trueAnomaly0 (number): Initial true anomaly in degrees
    • epoch (number): Initial epoch in milliseconds
    • time (number): Propagation time in milliseconds
  • Returns: {x, y, z} in meters (ECI coordinates)
generateWalkerDelta(params)

Generates a Walker Delta constellation.

  • params (Object):
    • a (number): Semi-major axis in meters
    • i (number): Inclination in degrees
    • totalSatellites (number): Total number of satellites
    • geometryPlanes (number): Number of orbital planes
    • phasing (number): Phasing factor
    • epoch (number): Initial epoch in milliseconds
  • Returns: Array of satellite objects with orbital parameters
gmst(date)

Calculates Greenwich Mean Sidereal Time (GMST).

  • date (Date|number): Date object or timestamp in milliseconds
  • Returns: GMST in radians
eciToEcef(posECI, gmst)

Converts ECI coordinates to ECEF.

  • posECI (Object): {x, y, z} in meters (ECI coordinates)
  • gmst (number): GMST in radians
  • Returns: {x, y, z} in meters (ECEF coordinates)

License

Keplerian Constellation Propagator is licensed under the GNU General Public License v3.0 (GPLv3).
See the LICENSE file for details.