Pure javascript implementation of ephemeris calculations for sun, planets, comets, asteroids and stars.
JavaScript HTML CSS
Switch branches/tags
Nothing to show
Latest commit 46e44b3 May 17, 2017 @mivion committed on GitHub Update README.md
Permalink
Failed to load latest commit information.
astronomy Update julian.js Oct 20, 2015
build Build script Apr 29, 2016
.gitignore Build script Apr 29, 2016
README.md Update README.md May 17, 2017
common.js Bug fixes Aug 18, 2014
gruntfile.js Build script Apr 29, 2016
index.html Bug fixes Aug 18, 2014
index.js Initial version May 15, 2012
load.js Removed: dead code Aug 10, 2015
package.json Build script Apr 29, 2016
shortcut.js Initial version May 15, 2012
styles.css Added topocentric info Aug 18, 2014

README.md

Pure javascript implementation of ephemeris calculations for sun, planets, comets, asteroids and stars.

This implementation based on Steve Moshier (http://www.moshier.net).

Licensed under GPL version 2 (http://www.gnu.org/licenses/gpl-2.0.html).

Please contribute in this project.

Example

<script type='text/javascript' src='ephemeris-0.1.0.js' charset='utf-8'></script>
<script type='text/javascript'>

var date = {year: 1986, month: 1, day: 1, hours: 1, minutes: 52, seconds: 0};

$const.tlong = -71.10; // longitude
$const.glat = 42.37; // latitude

$processor.init ();

// sun, mercury, venus, moon, mars, jupiter, saturn, uranus, neptune, pluto, chiron, sirius
var body = $moshier.body.sun;

$processor.calc (date, body);

console.log(body.position);
</script>