Commit Graph

6 Commits

Author SHA1 Message Date
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
dd761773d5 Starting to work on calculating equinoxes and solstices.
Added new function Astronomy.SunPosition().
It is supposed to return ecliptic coordinates of date for the Sun
as seen from the center of the Earth.

The values look reasonable but I need to test them.
Will use the Sun's longitude in the return value from SunPosition()
to determine solstices and equinoxes.
2019-04-23 16:00:51 -04:00
Don Cross
d10f7e4bcb Can now search for time of object's highest/lowest altitude.
This will help me create a better algorithm for rise/set,
plus the culmination is one of the things I wanted for its own sake.
2019-04-19 22:03:55 -04:00
Don Cross
80267c39ec Getting closer to correct horizontal coordinates.
Not quite right yet for some reason, but this is closer.
JavaScript function Astronomy.SkyPos() now returns both
J2000 (RA,DEC) and (RA,DEC) using true equator and equinox of date.
Use the latter to calculate horizontal coordinates.
This matches my call to NOVAS place() function, but there
are still errors larger than 2 degrees compared with JPL Horizons
and Heavens Above.

For example:

2019-04-11 19:47:00
variable           test.html  JPL Horizons   error(arcmin)
Sun azimuth	        245.455     246.585         -67.80
Sun altitude         50.858      51.261         -24.17
Jupiter azimuth     277.309     275.287         121.33
Jupiter altitude    -63.751     -63.860           6.52
2019-04-11 17:21:03 -04:00
Don Cross
8c392a9cc8 Added HTML unit test of JavaScript code. 2019-04-11 12:30:06 -04:00