diff options
Diffstat (limited to 'org/madore/ephem')
-rw-r--r-- | org/madore/ephem/Test.java | 10 |
1 files changed, 9 insertions, 1 deletions
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); |