summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2012-04-17 21:36:19 +0200
committerDavid A. Madore <david+git@madore.org>2012-04-17 21:36:19 +0200
commit13a0fa9046fb85626ccd49f46fe4dec9f5e32e46 (patch)
tree66ee770dcf75918ca3291580a846ac683b293fd8
parent12ab2221611336f6d209d643574fdc2d2b1fac16 (diff)
downloadephem-13a0fa9046fb85626ccd49f46fe4dec9f5e32e46.tar.gz
ephem-13a0fa9046fb85626ccd49f46fe4dec9f5e32e46.tar.bz2
ephem-13a0fa9046fb85626ccd49f46fe4dec9f5e32e46.zip
Test: Compute final solar coordinates.
-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);
}
}