
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
astronomia
Advanced tools
An astronomical library
This library is a translation of meeus from Go to Javascript and contains selected algorithms from the book "Astronomical Algorithms" by Jean Meeus, following the second edition, copyright 1998, with corrections as of August 10, 2009.
Additional algorithms not covered in the book have been added.
npm install --save astronomia
Make sure you add <meta charset="UTF-8"> to your HTML or at least include your
bundle with <script src="your-bundle.js" charset="UTF-8"></script> then
this package runs in modern browsers.
core-js/es6 polyfill)For documentation of the different packages please take a look at the source code as well as at the tests.
If you require a small footprint in your final application, each of the provided packages can be used as a single one:
// instead of
const base = require('astronomia').base
// use
const base = require('astronomia/base')
ES6 Syntax
// instead of
import {base} from 'astronomia'
// use
import base from 'astronomia/base'
To access dedicated VSOP87 data sets use e.g.
const {vsop87Bvenus} = require('astronomia').data
// or
const vsop87Bvenus = require('astronomia/data/vsop87Bvenus')
npm test
to even run very long lasting tests, do
SLOWTESTS=1 npm test
In local browser
npm run zuul -- --local 3000
If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license.
You are also implicitly verifying that all code is your original work or correctly attributed with the source of its origin and licence.
MIT Licensed
See LICENSE for more info.
The astronomy-engine package provides similar functionalities for astronomical calculations, including positions of celestial bodies, rise/set times, and more. It is known for its high precision and ease of use.
The meeusjs package is a JavaScript implementation of the algorithms described in Jean Meeus' 'Astronomical Algorithms'. It offers a wide range of astronomical calculations, similar to astronomia, but is based on a different set of algorithms.
The suncalc package focuses on calculating sun and moon positions, phases, and rise/set times. While it offers fewer features compared to astronomia, it is highly optimized for solar and lunar calculations.
FAQs
An astronomical library
The npm package astronomia receives a total of 296,024 weekly downloads. As such, astronomia popularity was classified as popular.
We found that astronomia demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.