keps
Class Transforms

java.lang.Object
  extended by keps.Transforms

public class Transforms
extends java.lang.Object

The Transforms class contains methods that involve transforming vectors in the Earth Centered Inertial (ECI) coordinate frame in various ways. This encompasses a rather large range of functionality. Typically, ECI vectors serve as input while a derived set of information is returned.

Much of this code was adapted from Predict ( http://www.qsl.net/kd2bd/predict.html) written by John A. Magliacane KD2BD. Assistance was also provided by Dr. TS Kelso ( http://www.celestrak.com/) and Ciprian Sufitchi N2YO ( http://www.n2yo.com/)

Version:
31st of December, 2007
Author:
Phelps Williams

Constructor Summary
Transforms()
          This constructor is merely for appearances
 
Method Summary
 void Calculate_LatLonAlt(double time, Vector3 pos, Geodetic coords)
          This method provides geodetic (lat, lon, alt) coordinates of an object provided its ECI position and time.
 void Calculate_Obs(double time, Vector3 pos, Vector3 vel, Geodetic coords, ObservationSet obs_set)
          This method generates topocentric coordinates (az, el, range, range rate) when provided the ECI position, velocity of the object along with the Geodetic coordinates of the observation location at a particular time.
 void Calculate_Solar_Position(double time, Vector3 solar_vector)
          This method generates a solar position vector in ECI coordinates based only on time
 void Calculate_SolarObs(double time, Geodetic obs_coords, Vector3 solar_pos, ObservationSet solar_set, Geodetic solar_latlonalt)
          This method finds the position of the sun in Geodetic coordinates and as an observation set (az, el, range).
 void Calculate_User_PosVel(double time, Geodetic coords, Vector3 obs_pos, Vector3 obs_vel)
          This method uses the geodetic position and time of interest and returns the ECI position and velocity of the observer.
 double Sat_Eclipsed(Vector3 pos, Vector3 sol)
          This method returns the illumination level of an object based on the current position of the sun and earth.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transforms

public Transforms()
This constructor is merely for appearances

Method Detail

Calculate_LatLonAlt

public void Calculate_LatLonAlt(double time,
                                Vector3 pos,
                                Geodetic coords)
This method provides geodetic (lat, lon, alt) coordinates of an object provided its ECI position and time. This is commonly used in calculating the ground track of a satellite. The calculations assume the earth to be an oblate spheroid as defined in WGS '72.

This method was derived from Predict

Reference: The 1992 Astronomical Almanac, page K12.

Parameters:
time - double The time at which the following ECI pos Vector is relevant
pos - Vector3 ECI position vector describing the current position of object being tracked.
coords - Geodetic This is populated with the Latitude, Longitude, and Altitude of the object being tracked. This is the output of this method.

Calculate_User_PosVel

public void Calculate_User_PosVel(double time,
                                  Geodetic coords,
                                  Vector3 obs_pos,
                                  Vector3 obs_vel)
This method uses the geodetic position and time of interest and returns the ECI position and velocity of the observer. The velocity calculation assumes the geodetic position is stationary relative to the earth's surface. This means the velocity vector will not reflect movement other than the rotation of the earth. This is likely acceptable for stationary ground locations or slow moving objects such as a person walking or a automobile possibly.

Using this to translate GPS coordinates from an orbiting satellite or airplane would likely be a bad choice.

This method was derived from Predict

Reference: The 1992 Astronomical Almanac, page K11.

Parameters:
time - double The time at which the following locations are valid
coords - Geodetic The geodetic position to be translated
obs_pos - Vector3 The ECI position vector of the object populated by this method.
obs_vel - Vector3 The ECI velocity vector of the object populated by this method.

Calculate_Obs

public void Calculate_Obs(double time,
                          Vector3 pos,
                          Vector3 vel,
                          Geodetic coords,
                          ObservationSet obs_set)
This method generates topocentric coordinates (az, el, range, range rate) when provided the ECI position, velocity of the object along with the Geodetic coordinates of the observation location at a particular time. The resulting observation set in units convenient for tracking of the object from a ground based position in the following units:

Azimuth - radians

Elevation - radians

Range - kilometers

Range Rate - kilometers / second

Calculations are based on topocentric position using the WGS '72 geoid

This method was derived from Predict

Parameters:
time - double The time at which the following locations are valid
pos - Vector3 The ECI position vector of the object.
vel - Vector3 The ECI velocity vector of the object.
coords - Geodetic The Geodetic coordinates of the observer.
obs_set - ObservationSet This is populated with the az, el, range, and range rate of the object from the observation location.

Calculate_Solar_Position

public void Calculate_Solar_Position(double time,
                                     Vector3 solar_vector)
This method generates a solar position vector in ECI coordinates based only on time

This method was derived from Predict

Parameters:
time - double The time at which the solar position vector is valid

Calculate_SolarObs

public void Calculate_SolarObs(double time,
                               Geodetic obs_coords,
                               Vector3 solar_pos,
                               ObservationSet solar_set,
                               Geodetic solar_latlonalt)
This method finds the position of the sun in Geodetic coordinates and as an observation set (az, el, range). With a time, coordinates of observation and an ECI solar position vector an observation set and the Geodetic coordinates of the sun are returned.

This method was derived from Predict

Parameters:
time - double The time at which the following locations are valid
obs_coords - Geodetic This is the Latitude, Longitude, and Altitude of the observer.
solar_pos - Vector3 Solar ECI position vector.
solar_set - ObservationSet This is populated with the az, el, range, and range rate of the sun from the observation location.
solar_latlonalt - Geodetic This is populated with the Geodetic coordinates corresponding to the sun.

Sat_Eclipsed

public double Sat_Eclipsed(Vector3 pos,
                           Vector3 sol)
This method returns the illumination level of an object based on the current position of the sun and earth. This is helpful in generating estimations of visual magnitude of an object.

Reference: http://celestrak.com/columns/v03n01/

Parameters:
pos - Vector3 The current position of the object in the ECI reference frame.
sol - Vector3 The current position of the sun in the ECI reference frame.
Returns:
frac_illuminated double The fraction of the sun visible from the object specified by pos.