Commit Graph

2227 Commits

Author SHA1 Message Date
Don Cross
41c07135d9 Set theme jekyll-theme-slate 2019-05-05 20:54:10 -04:00
Don Cross
5da57eea16 Rolled back experiment to embed JavaScript in README.md. 2019-05-05 20:37:14 -04:00
Don Cross
e837c7812d Experiment to see if I can get live code running inside GitHub README.md. 2019-05-05 20:35:08 -04:00
Don Cross
d2e2569fe2 Gave up trying to display MathJax in Markdown.
Instead of documenting how to calculate phase fraction, just calculate it.
Show 'number' instead of 'Number' for numeric types.
2019-05-05 19:54:06 -04:00
Don Cross
44ae81ed7f Fixed documentation typos. Trying to use MathJax in my Markdown. 2019-05-05 17:49:19 -04:00
Don Cross
ccd4925cd4 Hack to prevent Travis CI from trying to invoke jsdoc.
This broken the Travis CI build, and we don't ship html documentation
anyway, so there is no need to unit test it.

Skip local html doc generation if html directory does not exist.
2019-05-05 17:27:25 -04:00
Don Cross
cc3fc97505 More documentation work in progress. 2019-05-05 17:21:51 -04:00
Don Cross
a684aa424d More documentation work. 2019-05-05 15:27:08 -04:00
Don Cross
578bb49492 More documentation work. 2019-05-05 14:14:27 -04:00
Don Cross
dac7d67ddb Renamed makedocs.bat to makedoc.bat, to match bash script makedoc. 2019-05-05 13:25:18 -04:00
Don Cross
819e08ce0d Generate local HTML documentation for previewing.
Instead of reading Markdown files locally, I generate HTML documentation.
I tell Git to ignore the html directory because it is only for local use.
2019-05-05 13:23:23 -04:00
Don Cross
e7ca3fe227 Script to unit test, then push to GitHub if successful. 2019-05-05 11:12:51 -04:00
Don Cross
486aab5039 Script to confirm build is clean. 2019-05-05 11:10:52 -04:00
Don Cross
58994838bf Fix line endings in the JS documentation README.md. 2019-05-05 11:07:08 -04:00
Don Cross
20f67e063f Install jsdoc2md tool in Travis CI environment. 2019-05-05 11:01:24 -04:00
Don Cross
aec126bd3e Generate documentation in Windows. Fix line ending problems. 2019-05-05 10:58:34 -04:00
Don Cross
40ade08067 Starting to generate documentation in Markdown format.
Using jsdoc-to-markdown to directly update source/js/README.md.
Added a little more documentation to astronomy.js.
2019-05-05 09:19:03 -04:00
Don Cross
8011f0d09a JSDoc: Figured out how to document enclosed functions. 2019-05-05 06:18:24 -04:00
Don Cross
d6bbba3ed1 Starting to add JSDoc comments. 2019-05-04 23:10:12 -04:00
Don Cross
e38a3487a1 Fixed #28 - Find times when Venus is at its brightest. 2019-05-04 19:03:10 -04:00
Don Cross
02ffc86084 Script to help finding Venus max magnitude events. 2019-05-04 13:56:12 -04:00
Don Cross
a08895cf34 Fixed #27 - Calculating max elong of Mercury, Venus.
Figured out that JPL Horizons and other sources define elongation
as the full angle between bodies, not just the ecliptic projection
of the angle. This brings my predictions within 0.6 hours of JPL.
2019-05-02 22:01:01 -04:00
Don Cross
926e92462d Added tests, fixed problems in max elongation search.
Still not happy with some of the hour errors, up to 14 hours.
Maybe I need to search for actual angle between planet and Sun,
not just along ecliptic longitude.
Also should try generating JPL Horizons data to verify the
test data I have here.
2019-05-02 16:20:33 -04:00
Don Cross
995c24bdc3 Added Astronomy.SearchMaxElongation().
This function finds the times when Mercury or Venus is furthest
east or west along the ecliptic from the Sun.
Needs more testing!
2019-05-02 15:22:29 -04:00
Don Cross
9d80b33e66 Added a minimal test of Saturn visual magnitude formula.
I don't have authoritative test data for Saturn, so I'm
just comparing against its own calculations, after having
visually inspected some test cases against my old code and
Heavens Above. This is not really adequate but it's the best
I can do right now.
2019-04-30 21:21:56 -04:00
Don Cross
d379ab3114 Fixed error in SaturnMagnitude().
Now this matches the output from my old astronomy code.
I still don't have good test data for Saturn.
2019-04-30 20:11:17 -04:00
Don Cross
a5bba7d2a2 mag_test.js now prints the RMS error for each planet. 2019-04-30 17:44:16 -04:00
Don Cross
8746a9fa95 First attempt at SaturnMagnitude(). Not sure how to get test data yet. 2019-04-30 15:59:21 -04:00
Don Cross
b0dcd70e91 Added magnitude test to Windows run.bat. 2019-04-29 22:36:37 -04:00
Don Cross
f3669a3190 Added magnitude test to unit_test. Reordered tests a little bit.
Now that the magnitude test is passing (Saturn not yet implemented),
I added it to the unit test suite.

I changed the order the test are run to thoroughly exercise lower
level calculations before the tests that are based on them.
That way, in case of breakage, it will hopefully be quicker
to find the culprit.
2019-04-29 22:18:21 -04:00
Don Cross
67d328cac2 Got Moon magnitude calculation matching JPL Horizons data.
Did this by retrofitting my calculations to match phase
curve extracted from JPL Horizons output.
2019-04-29 22:14:14 -04:00
Don Cross
4081fbefce Fixed visual magnitude calculation for Uranus.
Now Uranus calculations match output of JPL Horizons closely.
I figured this out by graphing JPL Horizons data and tweaking
my phase curve formula to match.
2019-04-29 21:46:15 -04:00
Don Cross
f64b804869 Made Pluto visual magnitude calculation match JPL Horizons.
I was able to eyeball the slope from a graph of deduced
phase curve by analyzing JPL Horizons output.
Now my Pluto magnitude values are well within agreement.
2019-04-29 21:41:10 -04:00
Don Cross
c280c9334e Found Venus, Mercury magnitude formulas that match JPL Horizons.
I found a paper by James L Hilton (USNO) that provides
formulas for the phase curves of Mercury and Venus that match
the JPL Horizons tool within 0.012 mag.
https://iopscience.iop.org/article/10.1086/430212
2019-04-29 17:22:23 -04:00
Don Cross
cc7e27efef Removed Saturn from Jupyter Notebook plots.
JPL Horizons data does not include ring aspect for Saturn,
so don't bother plotting the Saturn data.
I already deleted the Saturn data so it's not there anymore.
2019-04-28 22:44:10 -04:00
Don Cross
bf415dc358 Removing Saturn data because it does not handle ring aspect.
The JPL Horizons data for Saturn says at the bottom of the file
that it does not include variations due to ring aspect.
Therefore, it is not suitable for my needs.
2019-04-28 17:16:15 -04:00
Don Cross
2e582789e1 Graphing all phase/mag in Jupyter notebook. 2019-04-28 15:28:34 -04:00
Don Cross
30e178b1a4 Starting Jupyter Notebook for analyzing magnitude data.
Now it can load JPL Horizons data files I created.
2019-04-28 15:01:49 -04:00
Don Cross
d542445deb Updated JPL Horizons magnitude test data to include helio distance.
I realized if I'm going to create regression models of planets,
it will be helpful to have known correct values of heliocentric
distance of the planet also. Will need to figure out what to do
for Saturn's rings.
2019-04-28 14:38:29 -04:00
Don Cross
f7a3e4bc09 Made mag_test output easier to read. 2019-04-28 14:19:11 -04:00
Don Cross
9d0a4a0e2f Starting to implement Moon magnitude, but not quite right yet. 2019-04-28 14:11:17 -04:00
Don Cross
979450106e Reworking mag_test.js so it can do regression of JPL Horizons data. 2019-04-28 13:25:05 -04:00
Don Cross
3c04c3165b mag_test.js exits with correct return status. 2019-04-28 13:19:29 -04:00
Don Cross
584a52deb6 More work in progress: magnitude test. 2019-04-28 08:32:34 -04:00
Don Cross
fd43ef9a21 Starting to create magnitude unit test: mag_test.js 2019-04-28 08:20:19 -04:00
Don Cross
eeb1482d37 Starting to implement visual magnitude calculations.
Not fully validated, but I did tweak Montenbruck/Pfleger
formulas to match JPL Horizons output for 2018-04-27 02:00 UTC.
Still need to implement formulas for Moon and Saturn.
2019-04-27 22:10:02 -04:00
Don Cross
28f95e8bee Calculating phase angle and distance of Moon and planets.
This is a first step toward calculating visual mangitudes of these bodies.
2019-04-26 21:59:31 -04:00
Don Cross
252f551622 Updated comments and error message text. 2019-04-26 20:37:37 -04:00
Don Cross
417b30a176 Renamed PhaseAngle function to LongitudeFromSun.
"Phase angle" means the angle between the Sun and the Earth
as seen by a third body.

This function calculates the angle between the Sun and a body
as seen by the Earth, with a range that goes all the way to
360 degrees, allowing finding all 4 quarters of the Moon's cycle.
2019-04-26 20:33:48 -04:00
Don Cross
d25bd3fe38 Fixed #31 - Greatly improved convergence for Mercury, Mars.
When searching for oppositions and conjunctions of Mercury and Mars,
dynamically adjust to their eccentric orbits by tweaking the
effective synodic period based on how far we missed the mark
on each iteration.

This brings the average for Mercury from 19 down to 6.4.
All the other planets got at least a little better.
2019-04-25 21:42:29 -04:00