Coder Social home page Coder Social logo

aa-js's Introduction

SwiftAAaa-jsQLFitsFITSImporterObjCFITSIO

Become a Patreon

aa-js

Build Status

Astronomical Algorithms in JavaScript.

Other implementations: Swift (SwiftAA) , C# (AASharp).

aa-js is the port in javascript of the C++ implementation of Astronomical Algorithms by J.P. Naughter, called AA+, based on the reference text book by Jean Meeus. It is written in TypeScript, and covered as much as possible with tests validating the correctness of the algorithms. Tests are inspired from Jean Meeus' book and those written in SwiftAA, and are much more extended than what is available in AA+.

aa-js is the backbone of scientific algorithms used in arcsecond.io.

I am the author of the Swift version too. It's called SwiftAA.

Available Modules

  • Planets: all the (static and dynamic) details, coordinates, quantities about Mercury, Venus, Mars, Jupiter, Saturn, Neptune and of course Pluto: planet constants, aphelion, perihelion, phase angle, illuminated fraction, magnitude, semi-diameters.
  • In addition, for Mars: the planetocentric declination of the Sun and the Earth
  • In addition, for Jupiter: the planetocentric declination of the Sun and the Earth
  • In addition for Saturn: the details of the rings system
  • Earth & Moon: all the coordinates, and many details about the Moon
  • Sun: mean & true anomaly, coordinates
  • juliandays: creation, transformation, local mean sidereal time.
  • cosmology: the cosmology calculator from Ned Wright's, but re-implemented
  • distances: all the conversions of distances
  • nutation: in longitude, for obliquity, true & mean obliquity of the ecliptic
  • precession: all the precession functions between epochs for coordinates
  • sexagesimal: utilities for manipulating sexagesimals
  • transits: get rise, transit and set hours, dates, julian days, as well as altitude.

Installation

npm install aa-js

Usage

import { juliandays, Earth } from 'aa-js'

const jd = juliandays.getJulianDay(new Date())
const coords = Earth.Moon.getEquatorialCoordinates(jd)

Documentation

See inside the code. Almost every method is documented (quite sparingly sometimes). A good knowledge of basic astronomy helps very much. A copy of the Astronomical Algorithms textbook, by Jean Meeus (amazon) would also help, since many methods refer to it.

aa-js's People

Contributors

cedric-foellmi avatar coffee-converter avatar dependabot[bot] avatar onekiloparsec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.