From 13a0fa9046fb85626ccd49f46fe4dec9f5e32e46 Mon Sep 17 00:00:00 2001
From: "David A. Madore" <david+git@madore.org>
Date: Tue, 17 Apr 2012 21:36:19 +0200
Subject: Test: Compute final solar coordinates.

---
 org/madore/ephem/Test.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/org/madore/ephem/Test.java b/org/madore/ephem/Test.java
index 70b6663..0551837 100644
--- a/org/madore/ephem/Test.java
+++ b/org/madore/ephem/Test.java
@@ -39,6 +39,13 @@ public final class Test {
 	System.out.format("☉ equatorial(true) lat=%.6f° long=%.6f°\n",
 			  Math.atan(sun.v[2]/Math.sqrt(sun.v[0]*sun.v[0]+sun.v[1]*sun.v[1]))/Comput.degree,
 			  Math.atan2(sun.v[1], sun.v[0])/Comput.degree);
+	double frac = nowUtcSeconds/86400 - 0.5;
+	double days = nowUtcMjd - 51544 + frac;
+	double θ = (0.7790572732640 + 0.00273781191135448*days + frac)*2*Math.PI;
+	Frames.Vector sunE = Frames.Rotation.rotz(θ + Nutation.eqorg(Ephem.fromJd(nowTtJd))*Comput.arcsecond).apply(sun);
+	System.out.format("☉ astronomical lat=%.6f° long=%.6f°\n",
+			  Math.atan(sunE.v[2]/Math.sqrt(sunE.v[0]*sunE.v[0]+sunE.v[1]*sunE.v[1]))/Comput.degree,
+			  Math.atan2(sunE.v[1], sunE.v[0])/Comput.degree);
     }
 
 }
-- 
cgit v1.2.3