Terrenus HRPT v2.2

terrenus.telemetry
Class QuorumFile

java.lang.Object
  extended by terrenus.telemetry.QuorumFile
All Implemented Interfaces:
OrbitalElementSource

public class QuorumFile
extends java.lang.Object
implements OrbitalElementSource

The QuorumFile class reads Quorum QTrack data files and reports various information such as the ephermeris data and pseudoframe positions.


Constructor Summary
QuorumFile(java.lang.String fileName, int frameWords)
          Creates a new Quorum file.
 
Method Summary
 java.lang.String[] getElements(int satid, java.util.Date date, double maxDays)
          Gets the orbital elements for the specified satellite and date.
 java.lang.String[] getEphemeris()
          Gets the ephemeris strings.
 int getFrameCount()
          Gets the number of frames in the file.
 int getFramePosition(int frame)
          Gets the frame position of the specified frame.
 long getStartTime()
          Gets the data start time according to the QTrack start pseudoframe.
static void main(java.lang.String[] argv)
          Tests this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuorumFile

public QuorumFile(java.lang.String fileName,
                  int frameWords)
           throws java.io.IOException
Creates a new Quorum file.

Parameters:
fileName - the name of the data file.
frameWords - the number of 16-bit words in each frame.
Throws:
java.io.IOException
Method Detail

getElements

public java.lang.String[] getElements(int satid,
                                      java.util.Date date,
                                      double maxDays)
Description copied from interface: OrbitalElementSource
Gets the orbital elements for the specified satellite and date.

Specified by:
getElements in interface OrbitalElementSource
Parameters:
satid - the NORAD orbital element ID for the satellite.
date - the date for orbital element retrieval.
maxDays - the maximum allowed difference between date and orbital element epoch in days.
Returns:
the orbital elements as two strings, or null if none could be found within the specified tolerance.

getEphemeris

public java.lang.String[] getEphemeris()
Gets the ephemeris strings.

Returns:
the aray of two ephemeris strings.

getFrameCount

public int getFrameCount()
Gets the number of frames in the file.

Returns:
the number of normal data frames, excluding any pseudoframes.

getFramePosition

public int getFramePosition(int frame)
Gets the frame position of the specified frame.

Parameters:
frame - the frame in the range [0..N-1].
Returns:
the file position in 16-bit words of the specified frame. Pseudoframes are not counted as "normal" frames, so the position will skip over any pseudoframes found.
See Also:
getFrameCount()

getStartTime

public long getStartTime()
Gets the data start time according to the QTrack start pseudoframe.

Returns:
the data start time in milliseconds since the Unix epoch (Jan 1, 1970, 00:00:00 UTC).

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Tests this class.

Throws:
java.lang.Exception

Terrenus HRPT v2.2