The directory named
dist contains the built app. The html file is an example of jsOrrery placed in a page. Basically, you link jsOrrery's js and css files in your HTML file and call the app.
As soon as jsOrrery is loaded, it calls a function
window.onJsOrreryLoaded if it exists, with JSOrrery class as param. JSOrrery is also accessible through the global
window.jsOrrery variable. To init the app, you just create a new instance.
const jsOrrery = new JSOrrery();
If you want to customize how jsOrrery behaves, you can pass a config object to its init method.
Building the app
You can also use webpack to display the app in a local environment with
npm start, which will then make the orrery available at http://localhost:2018. To build the js, you can run webpack directly in the terminal, for example
env NODE_ENV=production webpack.
- Planets orbital elements were taken from Nasa's Jet Propulsion Laboratory.
- I learned about calculating positions from orbital elements by reading these documents by Keith Burnett, Paul Schlyter and E M Standish (JPL).
- Planet texture maps are a courtesy of James Hastings-Trew.
- Stars coordinates from AstroNexus and Nasa.
- David Eagle for basic orbital calculations of the Moon, based on "Lunar Tables and Programs From 4000 B.C. TO A.D. 8000" by Michelle Chapront-Touze and Jean Chapront (Bureau des Longitudes). See mathworks.com.
- Earth precise position from VSOP87, Bretagnon P., Francou G., (Bureau des Longitudes), from examples found at https://www.caglow.com
- Nasa/JPL's HORIZONS was used extensively to test my results. https://ssd.jpl.nasa.gov/horizons.cgi
- Delta T computations from Nasa's eclipse website https://eclipse.gsfc.nasa.gov/SEcat5/deltatpoly.html
- Bob Braeunig for calculations of Apollo missions free return trajectories.
- Quadratic integrations from http://orbit.medphys.ucl.ac.uk/'s documentaion by Martin Schweiger.
- Some techniques are inspired by Michael Chang's tutorial of 100,000 stars
- And of course, many thanks to Mr Doob for the excellent three.js
More details on La Grange's blog at http://lab.la-grange.ca/en/jsorrery