Skip to content

Latest commit

 

History

History
172 lines (131 loc) · 7.7 KB

File metadata and controls

172 lines (131 loc) · 7.7 KB

Changelog

7.0.0 (2026-03-24)

  • Feature: Official docs site. Because of that, Readme is now more concise.

  • Feature: Bulk Propagation API. Designed to bulk process many satellites and dates, this API is backed by C++ compiled to WASM, showing 3x to 12x improvement compared to propagate loop. See blog article: WASM: Making the Fastest SGP4 for the web for implementation details and benchmarks. Note: since JavaScript engines are very good at optimization, speed up is not guaranteed in all cases.

  • Feature: Shadow calculation. New shadowFraction function to know if a satellite is lit or in the shadow; if in penumbra, know the fraction of Sun obscured by Earth, thus exactly how much light is coming to the satellite.

  • BREAKING: Dropped support for Node.js of versions NOT listed here:

    • 20.19 and above
    • 22.13 and above
    • Major version 24 and newer
  • BREAKING: Dropped support for non-evergreen browsers.

  • BREAKING: Dropped AMD, CJS and minified builds. The library is now ESM only. If you're on Node.js that is listed above and use CJS, this doesn't affect you, because all current LTS Node.js support require(ESM) and this library works with that.

  • BREAKING: sunPos() now returns EciVec3<AU> as its rsun output, instead of number[]:

    // before
    const {
      rsun: [x, y, z], rtasc, decl
    } = sunPos(jday);
    // after
    const {
      rsun: { x, y, z }, rtasc, decl
    } = sunPos(jday);
  • BREAKING: The units of ndot and nddot fields on the SatRec object have changed:

    Field v6 v7
    ndot rev/day² rad/min²
    nddot rev/day³ rad/min³

    If you read these fields directly, you will need to adjust for the new units.

    Adjusting for new `ndot` and `nddot`
      import { constants } from 'satellite.js';
    
      const ndotRevPerDay2 = satrec.ndot * (constants.xpdotp * 1440);
      const nddotRevPerDay3 = satrec.nddot * (constants.xpdotp * 1440 * 1440);

6.0.2 (2026-01-07)

  • fix: twoline2satrec couldn't parse eccentricity padded with spaces instead of zeros (this only affects TLE generated by rare specialized software; see #153)

6.0.1 (2025-07-04)

  • fix: json2satrec couldn't parse OMM EPOCH that was ending with Z
  • fix: OMMJsonObject.REV_AT_EPOCH is made optional according to OMM spec

6.0.0 (2025-04-06)

  • chore: The library is rewritten to TypeScript and type definitions are now not hand-written but compiled from source code.
  • feature: New json2satrec function that allows parsing orbital elements in OMM format, encoded as JSON. Orbital elements in OMM format are already available for download from Celestrak and Space-Track. json2satrec supports both of these sources and aims to support all sources of properly formatted OMM data.

To obtain OMM as JSON from Celestrak, select "JSON" option at the top of "Current GP Element Sets" page or follow this link where it will be already selected.

Space-Track doesn't expose the JSON format in their UI, so to get JSON encoded OMM, on "Recent ELSETs" page, from "Current Catalog Files", copy a URL for the needed category and change the ending part of the URL from /format/xml to be /format/json.

  • BREAKING: The return type of the sgp4 and propagate functions is changed from:
{
  position: EciVec3<Kilometer> | false
  velocity: EciVec3<KilometerPerSecond> | false
}

to:

null | {
  position: EciVec3<Kilometer>
  velocity: EciVec3<KilometerPerSecond>
  meanElements: MeanElements
}

Where, if propagation failed, null is returned instead of individual keys set to false.

  • BREAKING: removed overloads of gstime and return types of sgp4 and propagate that were not documented by TypeScript definitions as of v5.0.0, but could happen in runtime with v5.0.0.
  • feature: New SatRecError enum that lists all error codes that can be set on SatRec.error.
  • feature: sgp4 and propagate function result object returns meanElements key, which is orbit parameters as they have evolved at the propagation moment. Since they are always internally calculated by SGP4 model, this doesn't impact performance.
  • feature: New sunPos function that calculates Sun position at date, useful to calculate if a satellite is in Earth umbra. Its accuracy is within 0.01 angular degree between years 1950 and 2050.
  • feature: Many additional properties of SatRec are documented
  • fix: dopplerFactor produces correct results depending on if the satellite is moving towards or away from the observer.

5.0.0 (2023-01-06)

  • Errors in calculations are fixed, WGS72 is used instead of WGS84 (#107).
  • Dependencies are upgraded.

4.1.4 (2022-07-18)

  • TypeScript definition for ecfToEci function is added.

4.1.3 (2020-12-18)

  • Fixed calculation of Doppler effect (dopplerFactor).

4.1.2 (2020-10-13)

  • Expose error in TypeScript definition of SatRec.
  • Fix TypeScript definition for PositionAndVelocity to allow error handling.

4.1.1 (2020-09-15)

  • Fix TypeScript definition for gstime (#73).
  • Fix documentation and TypeScript definition for degreesLong and degreesLat (#74).

4.1.0 (2020-09-14)

  • TypeScript support is added via new TypeScript definitions file (#71).
  • Rollup and some other dependencies are upgraded.

4.0.0 (2020-01-21)

  • Node.js 12 support is added. Node.js 6 and Node.js 8 support is dropped (breaking change).
  • Mocha, Chai and Istanbul are replaced by Jest.
  • Dependencies are upgraded.

3.0.1 (2019-03-14)

  • Unnecessary calculations in sgp4 function are reduced (#47).
  • vkmpersec calculation is moved to constants (#50).
  • degreesToRadians function is used in docs instead of deg2rad constant (#53).
  • Typos' fixes (#54).

3.0.0 (2018-11-26)

  • Node.js 4 support is dropped (breaking change).
  • Deprecated functions gstimeFromJday and gstimeFromDate are removed (breaking change).
  • New transformation functions are added: radiansToDegrees, degreesToRadians, radiansLat, radiansLong.

2.0.3 (2018-09-15)

2.0.2 (2018-04-16)

2.0.1 (2018-03-01)

  • sgp4 function's call result is used in sgp4init.
  • Longitude of eciToGeodetic result is in [-PI; PI] range now.

2.0.0 (2017-12-23)