public class PVEphemerisLoader extends Object implements DataLoader
Step by step ephemeris data loader.
This class is a PV ephemeris loader. The ephemeris file contains 8 columns. The date must be written in the two first columns: the first column is the offset with respect to the fifties reference epoch, the second column is the second number within the day. The position is stored in the third, forth and fifth columns. The velocity is stored in the sixth, seventh and eighth columns. The allowed characters are : space, numbers, point, minus sign, plus sign and E.
Step by step, this loader read one line of the file, extracts the information and saves it in two tables. The list 'dates' contains the absolute dates in the specified time scale (by default, TAI scale). Use 'setTScale' to modify the time scale. The list 'ephemeris' contains the PV coordinates.
Constructor and Description |
---|
PVEphemerisLoader()
Build an ephemeris data loader.
|
Modifier and Type | Method and Description |
---|---|
List<AbsoluteDate> |
getDates()
Give the list of dates which have been read.
|
List<PVCoordinates> |
getEphemeris()
Give the list of PV coordinates which have been read.
|
void |
loadData(InputStream input,
String name)
Load data from a stream.
|
void |
setTScale(TimeScale inTScale)
Set the TimeScale for AbsoluteDate management.
|
boolean |
stillAcceptsData()
Check if the loader still accepts new data.
|
public final boolean stillAcceptsData()
DataLoader
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.
stillAcceptsData
in interface DataLoader
public final void loadData(InputStream input, String name) throws IOException, ParseException, PatriusException
DataLoader
loadData
in interface DataLoader
input
- data input streamname
- name of the file (or zip entry)IOException
- if data can't be readParseException
- if data can't be parsedPatriusException
- if some data is missing
or if some loader specific error occurspublic final List<PVCoordinates> getEphemeris()
public final List<AbsoluteDate> getDates()
public final void setTScale(TimeScale inTScale)
inTScale
- the TimeScale to setCopyright © 2019 CNES. All Rights Reserved.