-
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
propagateloop. 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
shadowFractionfunction 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 returnsEciVec3<AU>as itsrsunoutput, instead ofnumber[]:// before const { rsun: [x, y, z], rtasc, decl } = sunPos(jday); // after const { rsun: { x, y, z }, rtasc, decl } = sunPos(jday);
-
BREAKING: The units of
ndotandnddotfields on theSatRecobject have changed:Field v6 v7 ndotrev/day² rad/min² nddotrev/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);
- fix:
twoline2satreccouldn't parse eccentricity padded with spaces instead of zeros (this only affects TLE generated by rare specialized software; see #153)
- fix:
json2satreccouldn't parse OMMEPOCHthat was ending with Z - fix:
OMMJsonObject.REV_AT_EPOCHis made optional according to OMM spec
- chore: The library is rewritten to TypeScript and type definitions are now not hand-written but compiled from source code.
- feature: New
json2satrecfunction 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.json2satrecsupports 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
sgp4andpropagatefunctions 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
gstimeand return types ofsgp4andpropagatethat were not documented by TypeScript definitions as of v5.0.0, but could happen in runtime with v5.0.0. - feature: New
SatRecErrorenum that lists all error codes that can be set onSatRec.error. - feature:
sgp4andpropagatefunction result object returnsmeanElementskey, 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
sunPosfunction 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
SatRecare documented - fix:
dopplerFactorproduces correct results depending on if the satellite is moving towards or away from the observer.
- Errors in calculations are fixed, WGS72 is used instead of WGS84 (#107).
- Dependencies are upgraded.
- TypeScript definition for
ecfToEcifunction is added.
- Fixed calculation of Doppler effect (
dopplerFactor).
- Expose
errorin TypeScript definition ofSatRec. - Fix TypeScript definition for
PositionAndVelocityto allow error handling.
- Fix TypeScript definition for
gstime(#73). - Fix documentation and TypeScript definition for
degreesLonganddegreesLat(#74).
- TypeScript support is added via new TypeScript definitions file (#71).
- Rollup and some other dependencies are upgraded.
- 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.
- Unnecessary calculations in
sgp4function are reduced (#47). vkmperseccalculation is moved to constants (#50).degreesToRadiansfunction is used in docs instead ofdeg2radconstant (#53).- Typos' fixes (#54).
- Node.js 4 support is dropped (breaking change).
- Deprecated functions
gstimeFromJdayandgstimeFromDateare removed (breaking change). - New transformation functions are added:
radiansToDegrees,degreesToRadians,radiansLat,radiansLong.
satrecobject is not cloned insgp4andsgp4initfunctions due to performance reasons.
- Wrong predictions for Molniya 3-47 orbits are fixed. Special thanks to @nhamer.
sgp4function's call result is used insgp4init.- Longitude of
eciToGeodeticresult is in [-PI; PI] range now.
- Library became ES and Common.js compatible.
- Source code is reorganized to match original Python library.
degreesLatanddegreesLongdon't adjust input radians value and throwRangeErrorif it's out of bounds (breaking change).invjdayfunction is added.- Julian day calculations take account of milliseconds (#38).
- Incorrect position and velocity bug for times not close to TLE epoch is fixed (#37).
- Continuous integration and test coverage are provided.
- Bower support is dropped.