summaryrefslogtreecommitdiffstats
path: root/org/madore/ephem/Test.java
diff options
context:
space:
mode:
Diffstat (limited to 'org/madore/ephem/Test.java')
-rw-r--r--org/madore/ephem/Test.java7
1 files changed, 7 insertions, 0 deletions
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);
}
}