Terrenus HRPT v2.2

terrenus.orbit
Class ArchiveElementSource

java.lang.Object
  extended by terrenus.orbit.AbstractOrbitalElementSource
      extended by terrenus.orbit.ArchiveElementSource
All Implemented Interfaces:
OrbitalElementSource

public class ArchiveElementSource
extends AbstractOrbitalElementSource

The ArchiveElementSource class provides access to two-line elements in an archive-style format. The data contains elements from various different dates in the "historical archives" format provided by the CelesTrak website:

   ELEMENT LINE 1
   ELEMENT LINE 2
   ELEMENT LINE 1
   ELEMENT LINE 2
   ...
 
Elements are assumed to be all from the same satellite. The two-line element set with the closest matching date is used by getElements(int, java.util.Date, double).


Constructor Summary
ArchiveElementSource(java.net.URL url)
          Creates a new local source.
 
Method Summary
 java.lang.String[] getElements(int satid, java.util.Date date, double maxDays)
          Gets the orbital elements for the specified satellite and date.
static void main(java.lang.String[] argv)
          Tests this class.
 
Methods inherited from class terrenus.orbit.AbstractOrbitalElementSource
getEpoch, getEpochOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchiveElementSource

public ArchiveElementSource(java.net.URL url)
Creates a new local source.

Parameters:
url - the URL to use for element data.
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.

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.

main

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

Throws:
java.lang.Exception

Terrenus HRPT v2.2