Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pluto99

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pluto99

A fast implementation of the so-called pluto99 theory in JavaScript.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

pluto99 ♇

A fast implementation of the so-called pluto99 theory in JavaScript.

What?

A JavaScript library to get the heliocentric rectangular coordinates of dwarf planet Pluto according to the "pluto99" theory.

The JavaScript implementation is about 13.23 Kb (minified and gzipped).

The WebAssembly version is 26.17 Kb (minified and gzipped).

Install

$ yarn add pluto99

Usage

JavaScript version

In node:

const pluto99 = require('pluto99');

// Get an object with the (x,y,z) coordinates of Pluto.
const coords = pluto99(2451545);

In browsers, we recommend to load the script asynchronously:

import('pluto99').then((pluto99) => {
  // Get an object with the (x,y,z) coordinates of Pluto.
  const coords = pluto99(2451545);
});

WebAssembly version

In browsers:

import pluto99Loader from 'pluto99/dist/pluto99-wasm';

pluto99Loader.then((pluto99) => {
  // Get an object with the (x,y,z) coordinates of Pluto.
  const coords = pluto99(2451545);
});

About the precision

According to the doc:

The theory is valid between the years -2997 and 2983. (60 centuries approximately).

The largest discrepancy obtained by a comparison with the source DE406 is 0.00005 ua.

The largest discrepancies obtained in a comparison with the elements deduced from DE406 are:

  • a : 0.080 au (semi-major axis)
  • l : 0.2 degree (mean longitude)
  • h,k : 0.0022 degree
  • p,q : 0.0003 degree

Contribute

Build the JavaScript version

$ yarn build

Build the WebAssembly version

Install emscripten, then:

$ ./build && yarn build

Run the unit tests

Make sure to run the build script first, then:

$ yarn test

List of changes

With regards to the original terms, the following changes have been applied:

  • Convert phi from degrees to radians
  • Multiple Nu by 1,000 for consistency with the vsop87 theory

"So-called"?

The theory full name is "Pluto's tables from -2997 to 2983" and was published in March 1999.

Although, unlike VSOP, it does not have an official short name, it is popularly called "pluto99".

Keywords

FAQs

Package last updated on 20 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc