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.
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.
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