public class SatelliteOutageFile extends BaseCollection<SatelliteOutage>
Constructor and Description |
---|
SatelliteOutageFile()
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
static String |
downloadLatestRawSatelliteOutageFile()
Downloads the latest Satellite Outage File from an AGI server and returns the contents of the file as a string.
|
static String |
downloadLatestRawSatelliteOutageFile(Proxy proxy)
Downloads the latest Satellite Outage File from an AGI server and returns the contents of the file as a string.
|
static SatelliteOutageFile |
downloadLatestSatelliteOutageFile()
Downloads the latest Satellite Outage File from an AGI server and returns the contents of the file as a
SatelliteOutageFile . |
static SatelliteOutageFile |
downloadLatestSatelliteOutageFile(Proxy proxy)
Downloads the latest Satellite Outage File from an AGI server and returns the contents of the file as a
SatelliteOutageFile . |
SatelliteOutageCollection |
findOutages(int prn)
Finds all satellite outages for a given Pseudo Random Number.
|
SatelliteOutageCollection |
findOutages(int prn,
TimeInterval date)
Finds satellite outages with a given Pseudo Random Number and within a specified
TimeInterval . |
SatelliteOutageCollection |
findOutages(TimeInterval date)
Finds all outages within a given
TimeInterval . |
ZonedDateTime |
getCreationDate()
Gets the creation date of the SOF file.
|
JulianDate |
getCreationJulianDate()
Gets the creation date of the SOF file expressed as a
JulianDate . |
String |
getFileId()
Gets the FILEID of the SOF file.
|
ZonedDateTime |
getReferenceDate()
Gets the reference date of the SOF file.
|
JulianDate |
getReferenceJulianDate()
Gets the reference date of the SOF file expressed as a
JulianDate . |
String |
getSystemId()
Gets the SYSID of the SOF file.
|
void |
populateConstellationOutageData(PlatformCollection gpsConstellation)
Populates a GPS constellation with the information about satellite outages contained
in this outage file.
|
static SatelliteOutageFile |
readFrom(BufferedReader reader)
Reads a
SatelliteOutageFile from a reader. |
static SatelliteOutageFile |
readFrom(InputStream stream)
Reads a
SatelliteOutageFile from a stream. |
static SatelliteOutageFile |
readFrom(String fileName)
Reads a
SatelliteOutageFile from a file. |
void |
setCreationDate(ZonedDateTime value)
Sets the creation date of the SOF file.
|
void |
setFileId(String value)
Sets the FILEID of the SOF file.
|
void |
setReferenceDate(ZonedDateTime value)
Sets the reference date of the SOF file.
|
void |
setSystemId(String value)
Sets the SYSID of the SOF file.
|
add, add, addAll, addAll, clear, clearItems, contains, containsAll, get, getItems, indexOf, insertItem, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeItem, retainAll, set, setItem, size, subList, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
@Nonnull public static SatelliteOutageFile readFrom(@Nonnull String fileName)
SatelliteOutageFile
from a file.fileName
- The name of the SatelliteOutageFile
from which to read.SatelliteOutageFile
instance containing the data read from the file.ArgumentNullException
- Thrown when fileName
is null
.@Nonnull public static SatelliteOutageFile readFrom(@Nonnull InputStream stream)
SatelliteOutageFile
from a stream.stream
- A stream from which to read the SatelliteOutageFile
.SatelliteOutageFile
instance containing the data read from the stream.ArgumentNullException
- Thrown when stream
is null
.@Nonnull public static SatelliteOutageFile readFrom(@Nonnull BufferedReader reader)
SatelliteOutageFile
from a reader.reader
- The reader from which to read the SatelliteOutageFile
.SatelliteOutageFile
instance containing the data read from the reader.ArgumentNullException
- Thrown when reader
is null
.@Nonnull public static SatelliteOutageFile downloadLatestSatelliteOutageFile()
SatelliteOutageFile
.
This method connects via HTTPS to ftp.agi.com.
Note that an internet connection is required to use this method successfully.
SatelliteOutageFile
populated with the data returned from the server.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static SatelliteOutageFile downloadLatestSatelliteOutageFile(@Nullable Proxy proxy)
SatelliteOutageFile
.
This method connects via HTTPS to ftp.agi.com.
Note that an internet connection is required to use this method successfully.
proxy
- Proxy to use when connecting.SatelliteOutageFile
populated with the data returned from the server.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static String downloadLatestRawSatelliteOutageFile()
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 downloadLatestRawSatelliteOutageFile(@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.public final String getFileId()
public final void setFileId(String value)
public final String getSystemId()
public final void setSystemId(String value)
@Nonnull public final ZonedDateTime getReferenceDate()
public final void setReferenceDate(@Nonnull ZonedDateTime value)
@Nonnull public final JulianDate getReferenceJulianDate()
JulianDate
.@Nonnull public final ZonedDateTime getCreationDate()
public final void setCreationDate(@Nonnull ZonedDateTime value)
@Nonnull public final JulianDate getCreationJulianDate()
JulianDate
.public final void populateConstellationOutageData(@Nonnull PlatformCollection gpsConstellation)
OutageIntervals
(get
/ set
) for each
satellite is replaced with all of the outages in this file.
Each platform in the collection must have a GpsSatelliteExtension
attached to
it. The PseudoRandomNumber
(get
/ set
) property of the extension is used
to determine which outage information to associate with which Platform
.
gpsConstellation
- The GPS constellation to populate.ArgumentException
- Thrown when one or more of the platforms in the gpsConstellation
does not
have a pseudo-random number (PRN) associated with it.@Nonnull public final SatelliteOutageCollection findOutages(int prn)
prn
- The Pseudo Random Number (PRN) of the navigation satellite.SatelliteOutageCollection
containing the outages for this PRN.@Nonnull public final SatelliteOutageCollection findOutages(TimeInterval date)
TimeInterval
.date
- The TimeInterval
to consider when looking for outages.SatelliteOutageCollection
containing the outages for this TimeInterval
.@Nonnull public final SatelliteOutageCollection findOutages(int prn, TimeInterval date)
TimeInterval
.prn
- The Pseudo Random Number (PRN) of the navigation satellite.date
- The TimeInterval
to consider when looking for outages.SatelliteOutageCollection
containing the outages for this PRN, during the specified time.