webdial

Incomplete JS port of moondial.
git clone https://code.literati.org/webdial.git
Log | Files | Refs

commit d19b4a6053df92f1a7e7428bcb5e4b85ab3fe954
parent 96fdcf1f12b898db19520bd3cd621c65205463c8
Author: Sean Lynch <seanl@literati.org>
Date:   Thu,  8 Sep 2011 12:35:05 -0700

Fix bug in calculation

Diffstat:
Msun.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sun.js b/sun.js @@ -61,7 +61,7 @@ function Sun() { var sinl = Math.sin(lon); var ra = modpi2(Math.atan2(sinl * cose - Math.tan(lat) * sine, Math.cos(lon))); - var dec = Math.asin(Math.sin(lon) * cose + Math.cos(lat) * sine * sinl); + var dec = Math.asin(Math.sin(lat) * cose + Math.cos(lat) * sine * sinl); return {"ra": ra, "dec": dec}; };