public class YUMAParser extends AbstractSelfFeedingLoader implements DataLoader
GPS almanacs
.
The definition of a Yuma almanac comes from the U.S. COAST GUARD NAVIGATION CENTER.
The format of the files holding Yuma almanacs is not precisely specified, so the parsing rules have been deduced from the downloadable files at NAVCEN and at CelesTrak.
Constructor and Description |
---|
YUMAParser(String supportedNames)
Simple constructor.
|
YUMAParser(String supportedNames,
DataProvidersManager dataProvidersManager,
TimeScales timeScales)
Create a YUMA loader/parser with the given source for YUMA auxiliary data files.
|
Modifier and Type | Method and Description |
---|---|
List<GPSAlmanac> |
getAlmanacs()
Gets all the
GPS almanacs read from the file. |
List<Integer> |
getPRNNumbers()
Gets the PRN numbers of all the
GPS almanacs read from the file. |
String |
getSupportedNames()
Get the supported names regular expression.
|
void |
loadData()
Loads almanacs.
|
void |
loadData(InputStream input,
String name)
Load data from a stream.
|
boolean |
stillAcceptsData()
Check if the loader still accepts new data.
|
feed, getDataProvidersManager, setSupportedNames
@DefaultDataContext public YUMAParser(String supportedNames)
This constructor does not load any data by itself. Data must be loaded
later on by calling one of the loadData()
method or
the loadData(inputStream, fileName)
method.
The supported files names are used when getting data from the
loadData()
method that relies on the
default data context
. They are useless when
getting data from the loadData(input, name)
method.
supportedNames
- regular expression for supported files names
(if null, a default pattern matching files with a ".alm" extension will be used)loadData()
,
YUMAParser(String, DataProvidersManager, TimeScales)
public YUMAParser(String supportedNames, DataProvidersManager dataProvidersManager, TimeScales timeScales)
This constructor does not load any data by itself. Data must be loaded
later on by calling one of the loadData()
method or
the loadData(inputStream, fileName)
method.
The supported files names are used when getting data from the
loadData()
method that relies on the
dataProvidersManager
. They are useless when
getting data from the loadData(input, name)
method.
supportedNames
- regular expression for supported files names
(if null, a default pattern matching files with a ".alm" extension will be used)dataProvidersManager
- provides access to auxiliary data.timeScales
- to use when parsing the GPS dates.loadData()
public void loadData()
The almanacs already loaded in the instance will be discarded and replaced by the newly loaded data.
This feature is useful when the file selection is already set up by
the data providers manager
configuration.
public void loadData(InputStream input, String name) throws IOException, ParseException, OrekitException
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 parsed
or if some loader specific error occursOrekitException
public 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 String getSupportedNames()
AbstractSelfFeedingLoader
getSupportedNames
in class AbstractSelfFeedingLoader
DataProvidersManager.feed(String, DataLoader)
public List<GPSAlmanac> getAlmanacs()
GPS almanacs
read from the file.GPSAlmanac
from the filepublic List<Integer> getPRNNumbers()
GPS almanacs
read from the file.GPS almanacs
read from the fileCopyright © 2002-2021 CS GROUP. All rights reserved.