public class ASTTLE
extends java.lang.Object
This class provides the ability to load TLEs from a data file and to store them in an accessible structure. Only one TLE data file can be loaded at a time. A TLE data file **MUST** be in the format specifically designed for this book. The format can be gleaned by opening the sample TLEs.dat data file and examining its contents. The format is straightforward and is documented in comments within the data file itself.
Copyright (c) 2018
Constructor and Description |
---|
ASTTLE(ASTPrt prtInstance)
Constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
areTLEsLoaded()
Check to see if a TLE database has been loaded.
|
static void |
clearTLEData()
Clear all the currently loaded TLE data
|
static void |
decodeTLE(int idx,
java.lang.String txt)
Decode a TLE data set to show what its elements are
|
static void |
displayTLEHeader()
Display a header for the TLE data
|
static void |
displayTLEItem(int idx)
Display a single TLE data set
|
static int |
findTLECatID(java.lang.String catID,
int iStart)
Search the currently loaded TLE database and return an index into the
database for the requested catalog ID.
|
static int |
findTLEName(java.lang.String name,
int iStart)
Search the currently loaded TLE database and return an index into the
database for the requested object.
|
static javax.swing.filechooser.FileNameExtensionFilter |
getFileExtFilter()
Gets a filter for filtering TLE data files by extension.
|
static boolean |
getKeplerianElementsFromTLE(int idx)
Validate the Keplerian elements and epoch from a TLE data set.
|
static int |
getNumTLEDBObjs()
Gets the number of TLEs in the currently loaded TLE database.
|
static ASTReal |
getTLEArgofPeri(int idx)
Gets the argument of perigee from data line 2
|
static java.lang.String |
getTLECatID(int idx)
Gets the catalog ID from data line 1
|
static ASTReal |
getTLEEccentricity(int idx)
Gets the orbital eccentricity from data line 2
|
static ASTDate |
getTLEEpochDate(int idx)
Gets the epoch date from the TLE.
|
static ASTReal |
getTLEEpochDay(int idx)
Gets the Epoch day from data line 1
|
static ASTReal |
getTLEEpochUT(int idx)
Gets the epoch UT from the TLE.
|
static ASTInt |
getTLEEpochYear(int idx)
Gets the Epoch year from data line 1
|
static java.lang.String |
getTLEFilename()
Gets the filename for the currently loaded TLE database.
|
static java.lang.String |
getTLEFileToOpen()
Puts up a browser window and gets a TLE data filename.
|
static ASTReal |
getTLEInclination(int idx)
Gets the orbital inclination from data line 2
|
static java.lang.String |
getTLELine1(int idx)
Returns 1st TLE data line
|
static java.lang.String |
getTLELine2(int idx)
Returns 2nd TLE data line
|
static ASTReal |
getTLEMeanAnomaly(int idx)
Gets the Mean Anomaly from data line 2
|
static ASTReal |
getTLEMeanMotion(int idx)
Gets the Mean Motion from data line 2
|
static ASTReal |
getTLERAAN(int idx)
Gets the orbital RAAN from data line 2
|
static boolean |
loadTLEDB(java.lang.String filename)
Loads TLEs database from disk.
|
public ASTTLE(ASTPrt prtInstance)
prtInstance
- instance to savepublic static ASTReal getTLEArgofPeri(int idx)
idx
- index into the TLE databasepublic static java.lang.String getTLECatID(int idx)
idx
- index into the TLE databasepublic static ASTReal getTLEEccentricity(int idx)
idx
- index into the TLE databasepublic static ASTDate getTLEEpochDate(int idx)
idx
- index into the TLE databasepublic static ASTReal getTLEEpochDay(int idx)
idx
- index into the TLE databasepublic static ASTReal getTLEEpochUT(int idx)
idx
- index into the TLE databasepublic static ASTInt getTLEEpochYear(int idx)
idx
- index into the TLE databasepublic static ASTReal getTLEInclination(int idx)
idx
- index into the TLE databasepublic static java.lang.String getTLEFilename()
public static javax.swing.filechooser.FileNameExtensionFilter getFileExtFilter()
public static java.lang.String getTLELine1(int idx)
idx
- index into TLE databasepublic static java.lang.String getTLELine2(int idx)
idx
- index into TLE databasepublic static ASTReal getTLEMeanAnomaly(int idx)
idx
- index into the TLE databasepublic static ASTReal getTLEMeanMotion(int idx)
idx
- index into the TLE databasepublic static int getNumTLEDBObjs()
public static ASTReal getTLERAAN(int idx)
idx
- index into the TLE databasepublic static boolean areTLEsLoaded()
public static void clearTLEData()
public static void decodeTLE(int idx, java.lang.String txt)
idx
- index into TLE db for set to display,
assuming 0-based indexing!txt
- text to display as printout headingpublic static void displayTLEHeader()
public static void displayTLEItem(int idx)
idx
- which data set to displaypublic static int findTLECatID(java.lang.String catID, int iStart)
catID
- catalog ID of the object to findiStart
- where to start searching in the dbpublic static int findTLEName(java.lang.String name, int iStart)
name
- name of the object to findiStart
- where to start searching in the dbpublic static boolean getKeplerianElementsFromTLE(int idx)
idx
- index into the TLE databasepublic static java.lang.String getTLEFileToOpen()
public static boolean loadTLEDB(java.lang.String filename)
filename
- Full filename (including path) to load