Class FileDataLoader
java.lang.Object
gaiasky.data.orbit.FileDataLoader
Loads orbit data from an ASCII text file.
This loader parses files where each line represents a single data point in an orbit.
The loader ignores blank lines and lines starting with the comment character #.
Data Format
Each data line must contain at least 4 tokens separated by whitespace:- Time: The time of the observation. This can be in two formats:
- A timestamp string compatible with
Timestamp.valueOf(String), where underscores_are treated as spaces (e.g.,2023-10-27_12:00:00). - A Julian Date as a double-precision floating-point number.
- A timestamp string compatible with
- X coordinate: The X position in kilometers.
- Y coordinate: The Y position in kilometers.
- Z coordinate: The Z position in kilometers.
Coordinates are automatically converted from kilometers to Gaia Sky's internal units
using Constants.KM_TO_U.
If multiple consecutive lines have the same timestamp, only the first one is processed, and subsequent ones are ignored to prevent duplicate data points at the same time. Any additional tokens beyond the first four in a line are ignored.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionload(InputStream data) Loads the data in the input stream into an OrbitData object.protected doubleprotected floatprotected intlongParse a time string with the formatFORMATin UTC.
-
Constructor Details
-
FileDataLoader
public FileDataLoader()
-
-
Method Details
-
parseTime
-
load
Loads the data in the input stream into an OrbitData object.- Throws:
Exception
-
parsef
-
parsed
-
parsei
-