jat.spacetime
Class EarthRef

java.lang.Object
  extended by jat.spacetime.EarthRef
All Implemented Interfaces:
BodyRef

public class EarthRef
extends java.lang.Object
implements BodyRef

The EarthRef Class provides methods of converting between various types of Earth reference systems. Reference: Satellite Orbits by Montenbruck and Gill. This is basically their C++ code converted to Java. The interface to this class is an input Terrestrial time in MJD format, which is available from either the CalDate or GPSTimeFormat classes.

Version:
1.0
Author:
Dave Gaylor

Field Summary
static double f_Earth
          Flattening factor of earth from WGS-84
static double GM_Earth
          Earth gravity constant in m^3/s^2 from JGM3
static double omega_e
          Earth's rotation rate in rad/s.
static double R_Earth
          Equatorial radius of earth in m from WGS-84
 boolean use_moon
           
 boolean use_sun
           
 
Constructor Summary
EarthRef(double MJD_UT1, double MJD_TT)
          Construct an EarthRef object using UTC Time in Modified Julian Date format.
EarthRef(double MJD_UT1, double MJD_TT, boolean use_moon, boolean use_sun)
          Construct an EarthRef object using UTC Time in Modified Julian Date format.
EarthRef(Time t0)
          Construct an EarthRef object using UTC Time in Modified Julian Date format.
 
Method Summary
 Matrix body_to_inertial(Time t)
          Returns the (precalculated) eci2ecef transformation.
 Matrix ECI2ECEF()
          Returns the (precalculated) ECI to ECEF (ICRF to ITRF) Transformation Matrix.
 Matrix eci2ecef(double MJD_UT1, double MJD_TT)
          ECI to ECEF Transformation
 Matrix eci2ecef(Time t)
          ECI to ECEF Transformation
 RotationMatrix EclMatrix(double MJD_TT)
          Transformation of equatorial to ecliptical coordinates.
 double EqnEquinox(double MJD_TT)
          Computation of the equation of the equinoxes.
 double GAST(double MJD_UT1, double MJD_TT)
          Greenwich Apparent Sidereal Time.
 double get_grav_const()
          Returns the Earth's gravitational constant.
 VectorN get_JPL_Moon_Vector()
          Return the (precalculated) JPL Moon Vector
 VectorN get_JPL_Sun_Vector()
          Return the (precalculated) JPL Sun Vector
 double get_mean_radius()
          Returns the mean Earth Radius.
 double get_omega_e(double mjd_ut1)
          Return the dynamic rotation rate of the Earth at the given time.
 double get_omega_e(Time t)
          Return the dynamic rotation rate of the Earth at the given Time.
 double get_spin_rate(Time t)
          Returnts the dynamic Earth rotation rate.
 RotationMatrix GHAMatrix(double MJD_UT1, double MJD_TT)
          Transformation from true equator and equinox to Earth equator and Greenwich meridian system.
 double GMST(double MJD_UT1)
          Greenwich Mean Sidereal Time.
 Matrix inertial_to_body(Time t)
          Returns the transformation between inertial and body coordinates.
 void initializeMoonEphem(double MJD_TT)
          Initialize the JPL DE405 ephemerides and initialize the Moon vector.
 void initializeSunEphem(double MJD_TT)
          Initialize the JPL DE405 ephemerides and initialize the Sun vector.
static void main(java.lang.String[] args)
          Test method.
 double MeanObliquity(double MJD_TT)
          Computes the mean obliquity of the ecliptic.
 VectorN moonVector(double MJD_TT)
          Computes the Moon's geocentric position using a low precision analytical series.
 void NutAngles(double MJD_TT)
          Computes Nutation in longitude and obliquity using the IAU 1980 nutation theory.
 Matrix NutMatrix(double MJD_TT)
          Transformation from mean to true equator and equinox.
 Matrix NutMatrixSimple(double MJD_TT)
          Transformation from mean to true equator and equinox (low precision).
 Matrix PoleMatrix()
          Transformation from pseudo Earth-fixed to Earth-fixed coordinates for a given date.
 Matrix PrecMatrix(double MJD_TT)
          Precession transformation of equatorial coordinates.
 void set_use_moon(boolean b)
          Set the flag whether to calculate the Moon's position.
 void set_use_sun(boolean b)
          Set the flag whether to calculate the Sun's position.
 void setIERS(double x, double y)
          Set the IERS (Earth Rotation) Data
 VectorN sunVector(double MJD_TT)
          Computes the Sun's geocentric position using a low precision analytical series.
 Matrix TOD()
          Returns the (precalculated) J2000 to True of Date (ICRF to TOD) Transformation Matrix.
 Matrix trueOfDate(double MJD_TT)
          J2000 to TOD Transformation
 Matrix trueOfDate(Time t)
          Returns the trueOfDate trasformation.
 void update(double MJD_UT1, double MJD_TT)
          Updates the Earth model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

use_moon

public boolean use_moon

use_sun

public boolean use_sun

omega_e

public static final double omega_e
Earth's rotation rate in rad/s.

See Also:
Constant Field Values

R_Earth

public static final double R_Earth
Equatorial radius of earth in m from WGS-84

See Also:
Constant Field Values

f_Earth

public static final double f_Earth
Flattening factor of earth from WGS-84

See Also:
Constant Field Values

GM_Earth

public static final double GM_Earth
Earth gravity constant in m^3/s^2 from JGM3

See Also:
Constant Field Values
Constructor Detail

EarthRef

public EarthRef(Time t0)
Construct an EarthRef object using UTC Time in Modified Julian Date format.

Parameters:
mjd_UTC - UTC time in MJD format.

EarthRef

public EarthRef(double MJD_UT1,
                double MJD_TT)
Construct an EarthRef object using UTC Time in Modified Julian Date format.

Parameters:
mjd_UTC - UTC time in MJD format.

EarthRef

public EarthRef(double MJD_UT1,
                double MJD_TT,
                boolean use_moon,
                boolean use_sun)
Construct an EarthRef object using UTC Time in Modified Julian Date format.

Parameters:
mjd_UTC - UTC time in MJD format.
Method Detail

setIERS

public void setIERS(double x,
                    double y)
Set the IERS (Earth Rotation) Data

Parameters:
x - x_pole coordinate (rad)
y - y_pole coordinate (rad)

initializeMoonEphem

public void initializeMoonEphem(double MJD_TT)
Initialize the JPL DE405 ephemerides and initialize the Moon vector.


initializeSunEphem

public void initializeSunEphem(double MJD_TT)
Initialize the JPL DE405 ephemerides and initialize the Sun vector.


ECI2ECEF

public Matrix ECI2ECEF()
Returns the (precalculated) ECI to ECEF (ICRF to ITRF) Transformation Matrix.

Returns:
ECI to ECEF Transformation Matrix.

TOD

public Matrix TOD()
Returns the (precalculated) J2000 to True of Date (ICRF to TOD) Transformation Matrix.

Returns:
J2000 to TOD Transformation Matrix.

MeanObliquity

public double MeanObliquity(double MJD_TT)
Computes the mean obliquity of the ecliptic. Uses Mjd_TT (Terrestrial Time).

Returns:
Mean obliquity of the ecliptic

EclMatrix

public RotationMatrix EclMatrix(double MJD_TT)
Transformation of equatorial to ecliptical coordinates. Uses Mjd_TT (Terrestrial Time).

Returns:
Transformation matrix

PrecMatrix

public Matrix PrecMatrix(double MJD_TT)
Precession transformation of equatorial coordinates. Uses Mjd_TT (Terrestrial Time).

Returns:
Precession transformation matrix

NutAngles

public void NutAngles(double MJD_TT)
Computes Nutation in longitude and obliquity using the IAU 1980 nutation theory. Uses Mjd_TT (Terrestrial Time).


NutMatrix

public Matrix NutMatrix(double MJD_TT)
Transformation from mean to true equator and equinox. Uses Mjd_TT (Terrestrial Time).

Returns:
Nutation matrix

NutMatrixSimple

public Matrix NutMatrixSimple(double MJD_TT)
Transformation from mean to true equator and equinox (low precision). Uses Mjd_TT (Terrestrial Time).

Returns:
Nutation matrix

EqnEquinox

public double EqnEquinox(double MJD_TT)
Computation of the equation of the equinoxes. Uses Mjd_TT (Terrestrial Time). Notes: The equation of the equinoxes dpsi*Math.cos(eps) is the right ascension of the mean equinox referred to the true equator and equinox and is equal to the difference between apparent and mean sidereal time.

Returns:
Equation of the equinoxes

GMST

public double GMST(double MJD_UT1)
Greenwich Mean Sidereal Time. Uses Mjd_UT1.

Returns:
GMST in [rad]

GAST

public double GAST(double MJD_UT1,
                   double MJD_TT)
Greenwich Apparent Sidereal Time.

Returns:
GAST in [rad]

GHAMatrix

public RotationMatrix GHAMatrix(double MJD_UT1,
                                double MJD_TT)
Transformation from true equator and equinox to Earth equator and Greenwich meridian system.

Returns:
Greenwich Hour Angle matrix

PoleMatrix

public Matrix PoleMatrix()
Transformation from pseudo Earth-fixed to Earth-fixed coordinates for a given date. Uses Mjd_UTC if poles are a function of UTC.

Returns:
Pole matrix

trueOfDate

public Matrix trueOfDate(double MJD_TT)
J2000 to TOD Transformation

Returns:
J2000 to ECEF transformation matrix

eci2ecef

public Matrix eci2ecef(double MJD_UT1,
                       double MJD_TT)
ECI to ECEF Transformation

Returns:
ECI to ECEF transformation matrix

eci2ecef

public Matrix eci2ecef(Time t)
ECI to ECEF Transformation

Returns:
ECI to ECEF transformation matrix

update

public void update(double MJD_UT1,
                   double MJD_TT)
Updates the Earth model.

Parameters:
MJD_UT1. - Universal Time in modified julian date
MJD_TT. - Terrestrial Dynamical Time in modified julian date

sunVector

public VectorN sunVector(double MJD_TT)
Computes the Sun's geocentric position using a low precision analytical series.

Returns:
Solar position vector [m] with respect to the mean equator and equinox of J2000 (EME2000, ICRF)

get_JPL_Sun_Vector

public VectorN get_JPL_Sun_Vector()
Return the (precalculated) JPL Sun Vector

Specified by:
get_JPL_Sun_Vector in interface BodyRef
Returns:
Vector from the center of the Earth to the Sun [km].

get_JPL_Moon_Vector

public VectorN get_JPL_Moon_Vector()
Return the (precalculated) JPL Moon Vector

Specified by:
get_JPL_Moon_Vector in interface BodyRef
Returns:
Vector from the center of the Earth to the Moon [km].

get_omega_e

public double get_omega_e(Time t)
Return the dynamic rotation rate of the Earth at the given Time.

Parameters:
t - Time.
Returns:
Omega [rad/s]

get_omega_e

public double get_omega_e(double mjd_ut1)
Return the dynamic rotation rate of the Earth at the given time.

Parameters:
mjd_ut1 - time.
Returns:
Omega [rad/s]

set_use_sun

public void set_use_sun(boolean b)
Set the flag whether to calculate the Sun's position.

Parameters:
b -

set_use_moon

public void set_use_moon(boolean b)
Set the flag whether to calculate the Moon's position.

Parameters:
b -

moonVector

public VectorN moonVector(double MJD_TT)
Computes the Moon's geocentric position using a low precision analytical series.

Returns:
Lunar position vector [m] with respect to the mean equator and equinox of J2000 (EME2000, ICRF).

inertial_to_body

public Matrix inertial_to_body(Time t)
Returns the transformation between inertial and body coordinates.

Specified by:
inertial_to_body in interface BodyRef
Parameters:
mjd_body - Earth referenced time (Universal Time UT1)
mjd_inertial - Dynamical time (Terrestrial Time)
Returns:
Transformation matrix

body_to_inertial

public Matrix body_to_inertial(Time t)
Returns the (precalculated) eci2ecef transformation.

Specified by:
body_to_inertial in interface BodyRef
Parameters:
t - Time object
Returns:
Transformation matrix
See Also:
BodyRef.body_to_inertial(Time)

get_spin_rate

public double get_spin_rate(Time t)
Returnts the dynamic Earth rotation rate.

Specified by:
get_spin_rate in interface BodyRef
Parameters:
t - Time object
Returns:
scalar spin rate [rad/s]
See Also:
jat.spacetime.BodyRef#get_spin_rate()

get_mean_radius

public double get_mean_radius()
Returns the mean Earth Radius.

Specified by:
get_mean_radius in interface BodyRef
Returns:
radius [m]
See Also:
BodyRef.get_mean_radius()

get_grav_const

public double get_grav_const()
Returns the Earth's gravitational constant.

Specified by:
get_grav_const in interface BodyRef
Returns:
grav_constant [m^3/s^2]
See Also:
BodyRef.get_grav_const()

trueOfDate

public Matrix trueOfDate(Time t)
Returns the trueOfDate trasformation.

Specified by:
trueOfDate in interface BodyRef
Parameters:
t - Time object
Returns:
Transformation matrix
See Also:
BodyRef.trueOfDate(jat.spacetime.Time)

main

public static void main(java.lang.String[] args)
Test method. See Vallado example 3-14.

Parameters:
args -