public final class GpsDataFile extends Object
The GPSData.txt file is available from: https://ftp.agi.com/pub/Catalog/Almanacs/SEM/GPSData.txt. This file is updated daily.
Modifier and Type | Method and Description |
---|---|
static ArrayList<GpsSatelliteInformation> |
downloadActive()
Downloads and reads data for only the active GPS satellites from an AGI server.
|
static ArrayList<GpsSatelliteInformation> |
downloadActive(Proxy proxy)
Downloads and reads data for only the active GPS satellites from an AGI server.
|
static ArrayList<GpsSatelliteInformation> |
downloadAll()
Downloads and reads data for all GPS satellites from an AGI server.
|
static ArrayList<GpsSatelliteInformation> |
downloadAll(Proxy proxy)
Downloads and reads data for all GPS satellites from an AGI server.
|
static String |
downloadRawFile()
Downloads the GPS data file from an AGI server and returns the contents of the file as a string.
|
static String |
downloadRawFile(Proxy proxy)
Downloads the GPS data file from an AGI server and returns the contents of the file as a string.
|
static ArrayList<GpsSatelliteInformation> |
readActive(BufferedReader source)
Reads data for only the active GPS satellites from the specified reader.
|
static ArrayList<GpsSatelliteInformation> |
readActive(String fileName)
Reads data for only the active GPS satellites from the specified file.
|
static ArrayList<GpsSatelliteInformation> |
readAll(BufferedReader source)
Reads data for all GPS satellites from the specified reader.
|
static ArrayList<GpsSatelliteInformation> |
readAll(String fileName)
Reads data for all GPS satellites from the specified file.
|
@Nonnull public static ArrayList<GpsSatelliteInformation> readActive(@Nonnull String fileName)
fileName
- Location of GPSData.txt file.GpsSatelliteInformation
for only the active satellites in the file.ArgumentNullException
- Thrown when fileName
is null
.@Nonnull public static ArrayList<GpsSatelliteInformation> readActive(@Nonnull BufferedReader source)
source
- The reader from which to read.GpsSatelliteInformation
for only active satellites in the file.ArgumentNullException
- Thrown when source
is null
.@Nonnull public static ArrayList<GpsSatelliteInformation> readAll(@Nonnull String fileName)
fileName
- File location of GPSData.txtGpsSatelliteInformation
for all satellites in the file.ArgumentNullException
- Thrown when fileName
is null
.@Nonnull public static ArrayList<GpsSatelliteInformation> readAll(@Nonnull BufferedReader source)
source
- The reader from which to read.GpsSatelliteInformation
for all satellites in the file.ArgumentNullException
- Thrown when source
is null
.@Nonnull public static ArrayList<GpsSatelliteInformation> downloadAll()
Note that an internet connection is required to use this method successfully.
GpsSatelliteInformation
for all satellites in the file.InvalidDataException
- Thrown when there is an error parsing data from the file.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static ArrayList<GpsSatelliteInformation> downloadAll(@Nullable Proxy proxy)
Note that an internet connection is required to use this method successfully.
proxy
- Proxy to use when connecting.GpsSatelliteInformation
for all satellites in the file.InvalidDataException
- Thrown when there is an error parsing data from the file.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static ArrayList<GpsSatelliteInformation> downloadActive()
Note that an internet connection is required to use this method successfully.
GpsSatelliteInformation
for only the active satellites in the file.InvalidDataException
- Thrown when there is an error parsing data from the file.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static ArrayList<GpsSatelliteInformation> downloadActive(@Nullable Proxy proxy)
Note that an internet connection is required to use this method successfully.
proxy
- Proxy to use when connecting.GpsSatelliteInformation
for only the active satellites in the file.InvalidDataException
- Thrown when there is an error parsing data from the file.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static String downloadRawFile()
Note that an internet connection is required to use this method successfully.
DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static String downloadRawFile(@Nullable Proxy proxy)
Note that an internet connection is required to use this method successfully.
proxy
- Proxy to use when connecting.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.