driver.ted.utilities
Class T_ReadSP3

java.lang.Object
  extended by driver.ted.utilities.T_ReadSP3

public class T_ReadSP3
extends java.lang.Object

This utility reads a SP3 formatted ephemeris file - typically from the NGA.

Author:
Ted Driver

Constructor Summary
T_ReadSP3()
          Creates a new instance of T_ReadSP3 No File is initialized
T_ReadSP3(java.lang.String filename)
          Creates a new instance of T_ReadSP3 with a SP3 file initialized using the filename.
 
Method Summary
 double[] getData(int PRN, double J)
          This function returns an array of position and velocity and clock parameters for a given PRN for a given time.
 double[][] getDataForPRN(int PRN)
          This function returns an 2-D array of position and velocity and clock parameters for a given PRN If the PRN does not exist, a full size array of zeros is returned.
 double[][] getDataForTime(double J)
          This function returns an 2-D array of position and velocity and clock parameters for a given time If the time does not exist, a full size array of zeros is returned.
 int[] getSVIDs()
          This function returns an array of SVIDs as defined by the SP3 ephemeris file.
 double[] getTimes()
          This function returns an array of times as defined by the NGA ephemeris file.
static void main(java.lang.String[] args)
          Test program
 void setFile(java.lang.String filename)
          Use to set the filename if none was initialized by the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

T_ReadSP3

public T_ReadSP3()
Creates a new instance of T_ReadSP3 No File is initialized


T_ReadSP3

public T_ReadSP3(java.lang.String filename)
Creates a new instance of T_ReadSP3 with a SP3 file initialized using the filename.

Parameters:
filename - The name of the SP3 file to open
Method Detail

setFile

public void setFile(java.lang.String filename)
Use to set the filename if none was initialized by the constructor.

Parameters:
filename - The path to the file to open.

getTimes

public double[] getTimes()
This function returns an array of times as defined by the NGA ephemeris file.

Returns:
a double array of times in Julian Date format

getSVIDs

public int[] getSVIDs()
This function returns an array of SVIDs as defined by the SP3 ephemeris file.

Returns:
an int array of SVIDs

getData

public double[] getData(int PRN,
                        double J)
This function returns an array of position and velocity and clock parameters for a given PRN for a given time. If either the PRN or the time do not exist, an full size array of zeros is returned. The array is arranged as x, y, z, xdot, ydot, zdot, clockcorr, clockcorrdot, SVID and the units are m, m, m, m/s, m/s, m/s, microseconds, 0.0001 microseconds/sec, unitless respectively.

Parameters:
PRN - The PRN for which you want to obtain data
J - The Julian Date for which you want to obtain Data
Returns:
a double array of position, velocity and clock data for that PRN and Time

getDataForPRN

public double[][] getDataForPRN(int PRN)
This function returns an 2-D array of position and velocity and clock parameters for a given PRN If the PRN does not exist, a full size array of zeros is returned. The array is arranged as array[numberOfEpochs][x, y, z, xdot, ydot, zdot, clockcorr, clockcorrdot, time] and the units are m, m, m, m/s, m/s, m/s, microseconds, 0.0001 microseconds/sec, Julian Date respectively

Parameters:
PRN - The PRN of the vehicle you want to get data for
Returns:
double array of data for that PRN

getDataForTime

public double[][] getDataForTime(double J)
This function returns an 2-D array of position and velocity and clock parameters for a given time If the time does not exist, a full size array of zeros is returned. The array is arranged as array[numberOfSats][x, y, z, xdot, ydot, zdot, clockcorr, clockcorrdot, time] and the units are m, m, m, m/s, m/s, m/s, microseconds, 0.0001 microseconds/sec, unitless respectively

Parameters:
J - The Julian Date you want to obtain data for
Returns:
double array of data for that time

main

public static void main(java.lang.String[] args)
Test program

Parameters:
args - Arguments