From 8be15afc02e4e82b30a4e8457098547ac4c062d2 Mon Sep 17 00:00:00 2001
From: "David A. Madore" <david+git@madore.org>
Date: Wed, 18 Apr 2012 00:20:17 +0200
Subject: Slight improvement to test proram.

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

diff --git a/org/madore/ephem/Test.java b/org/madore/ephem/Test.java
index 0551837..cb9dc82 100644
--- a/org/madore/ephem/Test.java
+++ b/org/madore/ephem/Test.java
@@ -5,7 +5,11 @@ import java.util.Date;
 public final class Test {
 
     public static void main(String[] args) {
-	Date now = new Date();
+	Date now;
+	if ( args.length >= 1 )
+	    now = new Date(Long.parseLong(args[0]));
+	else
+	    now = new Date();
 	long nowTime = now.getTime();
 	int nowUtcMjd = (int)(nowTime/86400000) + 40587;
 	double nowUtcSeconds = (nowTime%86400000)/1000.;
@@ -32,6 +36,10 @@ public final class Test {
 			  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);
 	sun = Precession.matrix(Ephem.fromJd(nowTtJd)).apply(sun0);
+	sun0 = Frames.Rotation.rotx(Precession.epsilon.v(Ephem.fromJd(nowTtJd))*Comput.arcsecond).apply(sun);
+	System.out.format("☉ ecliptic(mean) lat=%.6f° long=%.6f°\n",
+			  Math.atan(sun0.v[2]/Math.sqrt(sun0.v[0]*sun0.v[0]+sun0.v[1]*sun0.v[1]))/Comput.degree,
+			  Math.atan2(sun0.v[1], sun0.v[0])/Comput.degree);
 	System.out.format("☉ equatorial(mean) 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);
-- 
cgit v1.2.3