![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
MeeusJs is an implementation of some algorithms of the Book 'Astronomical Algorithms of Jean Meeus' in Javascript. It follows the second edition, copyright 1998, with corrections as of August 10, 2009.
The library can be used to calculate sun and moon positions and their phases (rise, transmit, set) on a high accuracy.
The library is about 20kb (minimized) and licensed under MIT. It includes various unit tests against the data of http://ssd.jpl.nasa.gov/horizons.cgi.
The sourcecode is written by Fabio Soldati (@fabiz) from http://www.peakfinder.org.
Currently the following chapters are implemented:
Chapter | Module |
---|---|
3. Interpolation | A.Interp |
7. Julian Day | A.JulianDay |
10. Dynamical Time and Universal Time | A.DeltaT |
11. The Earth's Globe | A.Globe |
12. Sidereal Time at Greenwich | A.Sidereal |
13. Transformation of Coordinates | A.Coord |
14. The Parallactic Angle, and three other Topics | A.Moon |
15. Rising, Transit, and Setting | A.Rise |
16. Atmospheric Refraction | A.Refraction |
22. Nutation and the Obliquity of the Ecliptic | A.Nutation |
23. Apparent Place of a Star | A.Nutation |
25. Solar Coordinates | A.Solar |
27. Equinoxes and Solstices | A.Solstice |
40. Correction for Parallax | A.Parallax |
47. Position of the Moon | A.Moon |
48. Illuminated Fraction of the Moon's Disk | A.MoonIllum |
49. Phases of the Moon | A.MoonPhase |
// gets sun position and times for zurich
var jdo = new A.JulianDay(new Date()); // now
var coord = A.EclCoord.fromWgs84(47.3957, 8.4867, 440); // zurich
// gets the position of the sun
var tp = A.Solar.topocentricPosition(jdo, coord, true);
// print azi and alt
console.log(tp.hz.toString());
// gets the rise, transit and set time of the sun for today
var times = A.Solar.times(jdo, coord);
// print rise, transit and set in universal time
console.log("rise:" + A.Coord.secondsToHMSStr(times.rise) +
", transit:" + A.Coord.secondsToHMSStr(times.transit) +
", set:" + A.Coord.secondsToHMSStr(times.set));
// gets the moon position and times for zurich
var jdo = new A.JulianDay(new Date()); // now
var coord = A.EclCoord.fromWgs84(47.3957, 8.4867, 440); // zurich
// gets the position of the moon
var tp = A.Moon.topocentricPosition(jdo, coord, true);
// print azi and alt
console.log(tp.hz.toString() + ", dist:" + tp.delta);
// gets the rise, transit and set time of the moon for today
var times = A.Moon.times(jdo, coord);
// print rise, transit and set in universal time
console.log("rise:" + A.Coord.secondsToHMSStr(times.rise) +
", transit:" + A.Coord.secondsToHMSStr(times.transit) +
", set:" + A.Coord.secondsToHMSStr(times.set));
// print moon phase and illuminated
var suneq = A.Solar.apparentTopocentric(jdo, coord);
var i = A.MoonIllum.phaseAngleEq2(tp.eq, suneq);
var k = A.MoonIllum.illuminated(i);
var chi = A.MoonIllum.positionAngle(moontp.eq, suneq);
console.log("phase:" + i + ", illuminated:" + k + ", angle:" + chi);
FAQs
Implementation of the Astronomical Algorithms of Jean Meeus in Javascript
The npm package meeusjs receives a total of 86 weekly downloads. As such, meeusjs popularity was classified as not popular.
We found that meeusjs demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.