summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2012-04-17 17:15:56 (GMT)
committerDavid A. Madore <david+git@madore.org>2012-04-17 17:15:56 (GMT)
commit5f00eb3230d89f98d93c6e5bc8ecfa72e4e89b07 (patch)
treed5baba050542f345d68de244d4c8228d1781379c
parentb5dd88803374c586e165c77ac1dbf96c0d0f6ee7 (diff)
downloadephem-5f00eb3230d89f98d93c6e5bc8ecfa72e4e89b07.zip
ephem-5f00eb3230d89f98d93c6e5bc8ecfa72e4e89b07.tar.gz
ephem-5f00eb3230d89f98d93c6e5bc8ecfa72e4e89b07.tar.bz2
Use J2000 ecliptic (rather than equatorial) coordinates as starting point for precession.
We will assume that these are the coordinates returned by VSOP87.
-rw-r--r--org/madore/ephem/Nutation.java1
-rw-r--r--org/madore/ephem/Precession.java6
2 files changed, 5 insertions, 2 deletions
diff --git a/org/madore/ephem/Nutation.java b/org/madore/ephem/Nutation.java
index bc6e721..8c37fd2 100644
--- a/org/madore/ephem/Nutation.java
+++ b/org/madore/ephem/Nutation.java
@@ -64,6 +64,7 @@ public final class Nutation {
}
public static Frames.Rotation matrix(double t) {
+ // Transform mean equatorial coordinates of date to true equatorial coordinates of date.
Frames.Rotation mat1 = Frames.Rotation.rotx(Precession.epsilon.v(t)*Comput.arcsecond);
Frames.Rotation mat2 = Frames.Rotation.rotz(-getFunc(Variable.PSI).v(t)*Comput.arcsecond).apply(mat1);
Frames.Rotation mat3 = Frames.Rotation.rotx(-(Precession.epsilon.v(t)+getFunc(Variable.EPSILON).v(t))*Comput.arcsecond).apply(mat2);
diff --git a/org/madore/ephem/Precession.java b/org/madore/ephem/Precession.java
index af8a1dc..33453c5 100644
--- a/org/madore/ephem/Precession.java
+++ b/org/madore/ephem/Precession.java
@@ -3,6 +3,7 @@ package org.madore.ephem;
public final class Precession {
// The following angles are in arcseconds, argument is in Julian centuries since J2000.
+ // Source: IERS Conventions 2010, ยง5.6.4
public static final double epsilon0 = 84381.406;
public static Comput.Polynomial psi
= new Comput.Polynomial(0, 5038.481507, -1.0790069, -0.00114045, 0.000132851, -0.0000000951);
@@ -16,8 +17,9 @@ public final class Precession {
= new Comput.Polynomial(0.014506, 4612.156534, 1.3915817, -0.00000044, -0.000029956, -0.0000000368);
public static Frames.Rotation matrix(double t) {
- Frames.Rotation mat1 = Frames.Rotation.rotx(epsilon0*Comput.arcsecond);
- Frames.Rotation mat2 = Frames.Rotation.rotz(-psi.v(t)*Comput.arcsecond).apply(mat1);
+ // Transform J2000 ecliptic coordinates to mean equatorial coordinates of date.
+ // Frames.Rotation mat1 = Frames.Rotation.rotx(epsilon0*Comput.arcsecond);
+ Frames.Rotation mat2 = Frames.Rotation.rotz(-psi.v(t)*Comput.arcsecond);
Frames.Rotation mat3 = Frames.Rotation.rotx(-omega.v(t)*Comput.arcsecond).apply(mat2);
Frames.Rotation mat4 = Frames.Rotation.rotz(chi.v(t)*Comput.arcsecond).apply(mat3);
return mat4;