org.orekit.propagation.analytical.tle
Class TLESeries

java.lang.Object
  extended by org.orekit.propagation.analytical.tle.TLESeries
All Implemented Interfaces:
Serializable, DataLoader

public class TLESeries
extends Object
implements DataLoader, Serializable

This class reads and handles series of TLEs for one space object.

TLE data is read using the standard Orekit mechanism based on a configured DataProvidersManager. This means TLE data may be retrieved from many different storage media (local disk files, remote servers, database ...).

This class provides bounded ephemerides by finding the best initial TLE to propagate and then handling the propagation.

Author:
Fabien Maussion, Luc Maisonobe
See Also:
TLE, DataProvidersManager, Serialized Form

Constructor Summary
TLESeries(String supportedNames, boolean ignoreNonTLELines)
          Simple constructor with a TLE file.
 
Method Summary
 Set<Integer> getAvailableSatelliteNumbers()
          Get the available satellite numbers.
 TLE getClosestTLE(AbsoluteDate date)
          Get the closest TLE to the selected date.
 TLE getFirst()
          Get the first TLE.
 AbsoluteDate getFirstDate()
          Get the start date of the series.
 TLE getLast()
          Get the last TLE.
 AbsoluteDate getLastDate()
          Get the last date of the series.
 PVCoordinates getPVCoordinates(AbsoluteDate date)
          Get the extrapolated position and velocity from an initial date.
 void loadData(InputStream input, String name)
          Load data from a stream.
 void loadTLEData()
          Load TLE data for a specified object.
 void loadTLEData(int satelliteNumber)
          Load TLE data for a specified object.
 void loadTLEData(int launchYear, int launchNumber, String launchPiece)
          Load TLE data for a specified object.
 boolean stillAcceptsData()
          Check if the loader still accepts new data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLESeries

public TLESeries(String supportedNames,
                 boolean ignoreNonTLELines)
Simple constructor with a TLE file.

This constructor does not load any data by itself. Data must be loaded later on by calling one of the loadTLEData() method, the loadTLEData(filterSatelliteNumber) method or the loadTLEData(filterLaunchYear, filterLaunchNumber, filterLaunchPiece) method.

Parameters:
supportedNames - regular expression for supported files names (if null, a default pattern matching files with a ".tle" extension will be used)
ignoreNonTLELines - if true, extra non-TLE lines are silently ignored, if false an exception will be generated when such lines are encountered
See Also:
loadTLEData(), loadTLEData(int), loadTLEData(int, int, String)
Method Detail

loadTLEData

public void loadTLEData()
                 throws OrekitException
Load TLE data for a specified object.

The TLE data already loaded in the instance will be discarded and replaced by the newly loaded data.

The filtering values will be automatically set to the first loaded satellite. This feature is useful when the satellite selection is already set up by either the instance configuration (supported file names) or by the data providers manager configuration and the local filtering feature provided here can be ignored.

Throws:
OrekitException - if some data can't be read, some file content is corrupted or no TLE data is available
See Also:
loadTLEData(int), loadTLEData(int, int, String)

getAvailableSatelliteNumbers

public Set<Integer> getAvailableSatelliteNumbers()
                                          throws OrekitException
Get the available satellite numbers.

Returns:
available satellite numbers
Throws:
OrekitException - if some data can't be read, some file content is corrupted or no TLE data is available

loadTLEData

public void loadTLEData(int satelliteNumber)
                 throws OrekitException
Load TLE data for a specified object.

The TLE data already loaded in the instance will be discarded and replaced by the newly loaded data.

Calling this method with the satellite number set to a negative value, is equivalent to call loadTLEData().

Parameters:
satelliteNumber - satellite number
Throws:
OrekitException - if some data can't be read, some file content is corrupted or no TLE data is available for the selected object
See Also:
loadTLEData(), loadTLEData(int, int, String)

loadTLEData

public void loadTLEData(int launchYear,
                        int launchNumber,
                        String launchPiece)
                 throws OrekitException
Load TLE data for a specified object.

The TLE data already loaded in the instance will be discarded and replaced by the newly loaded data.

Calling this method with either the launch year or the launch number set to a negative value, or the launch piece set to null or an empty string are all equivalent to call loadTLEData().

Parameters:
launchYear - launch year (all digits)
launchNumber - launch number
launchPiece - launch piece
Throws:
OrekitException - if some data can't be read, some file content is corrupted or no TLE data is available for the selected object
See Also:
loadTLEData(), loadTLEData(int)

stillAcceptsData

public boolean stillAcceptsData()
Check if the loader still accepts new data.

This method is used to speed up data loading by interrupting crawling the data sets as soon as a loader has found the data it was waiting for. For loaders that can merge data from any number of sources (for example JPL ephemerides or Earth Orientation Parameters that are split among several files), this method should always return true to make sure no data is left over.

Specified by:
stillAcceptsData in interface DataLoader
Returns:
true while the loader still accepts new data

loadData

public void loadData(InputStream input,
                     String name)
              throws IOException,
                     OrekitException
Load data from a stream.

Specified by:
loadData in interface DataLoader
Parameters:
input - data input stream
name - name of the file (or zip entry)
Throws:
IOException - if data can't be read
OrekitException - if some data is missing or if some loader specific error occurs

getPVCoordinates

public PVCoordinates getPVCoordinates(AbsoluteDate date)
                               throws OrekitException
Get the extrapolated position and velocity from an initial date. For a good precision, this date should not be too far from the range : [first date ; last date].

Parameters:
date - the final date
Returns:
the final PVCoordinates
Throws:
OrekitException - if the underlying propagator cannot be initialized

getClosestTLE

public TLE getClosestTLE(AbsoluteDate date)
Get the closest TLE to the selected date.

Parameters:
date - the date
Returns:
the TLE that will suit the most for propagation.

getFirstDate

public AbsoluteDate getFirstDate()
Get the start date of the series.

Returns:
the first date

getLastDate

public AbsoluteDate getLastDate()
Get the last date of the series.

Returns:
the end date

getFirst

public TLE getFirst()
Get the first TLE.

Returns:
first TLE

getLast

public TLE getLast()
Get the last TLE.

Returns:
last TLE


Copyright © 2016 CNES. All Rights Reserved.