Class SEMParser
- java.lang.Object
-
- org.orekit.data.AbstractSelfFeedingLoader
-
- org.orekit.gnss.SEMParser
-
- All Implemented Interfaces:
DataLoader
public class SEMParser extends AbstractSelfFeedingLoader implements DataLoader
This class reads SEM almanac files and providesGPS almanacs
.The definition of a SEM almanac comes from the U.S. COAST GUARD NAVIGATION CENTER.
The format of the files holding SEM almanacs is not precisely specified, so the parsing rules have been deduced from the downloadable files at NAVCEN and at CelesTrak.
- Since:
- 8.0
- Author:
- Pascal Parraud
-
-
Constructor Summary
Constructors Constructor Description SEMParser(String supportedNames)
Simple constructor.SEMParser(String supportedNames, DataProvidersManager dataProvidersManager, TimeScales timeScales)
Create a SEM loader/parser with the given source of SEM auxiliary data files.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<GPSAlmanac>
getAlmanacs()
Gets all theGPS almanacs
read from the file.List<Integer>
getPRNNumbers()
Gets the PRN numbers of all theGPS 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.-
Methods inherited from class org.orekit.data.AbstractSelfFeedingLoader
feed, getDataProvidersManager, setSupportedNames
-
-
-
-
Constructor Detail
-
SEMParser
@DefaultDataContext public SEMParser(String supportedNames)
Simple constructor.This constructor does not load any data by itself. Data must be loaded later on by calling one of the
loadData()
method or theloadData(inputStream, fileName)
method.The supported files names are used when getting data from the
loadData()
method that relies on thedefault data context
. They are useless when getting data from theloadData(input, name)
method.- Parameters:
supportedNames
- regular expression for supported files names (if null, a default pattern matching files with a ".al3" extension will be used)- See Also:
loadData()
,SEMParser(String, DataProvidersManager, TimeScales)
-
SEMParser
public SEMParser(String supportedNames, DataProvidersManager dataProvidersManager, TimeScales timeScales)
Create a SEM loader/parser with the given source of SEM auxiliary data files.This constructor does not load any data by itself. Data must be loaded later on by calling one of the
loadData()
method or theloadData(inputStream, fileName)
method.The supported files names are used when getting data from the
loadData()
method that relies on thedataProvidersManager
. They are useless when getting data from theloadData(input, name)
method.- Parameters:
supportedNames
- regular expression for supported files names (if null, a default pattern matching files with a ".al3" extension will be used)dataProvidersManager
- provides access to auxiliary data.timeScales
- to use when parsing the GPS dates.- Since:
- 10.1
- See Also:
loadData()
-
-
Method Detail
-
loadData
public void loadData()
Loads almanacs.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.
-
loadData
public void loadData(InputStream input, String name) throws IOException, ParseException, OrekitException
Description copied from interface:DataLoader
Load data from a stream.- Specified by:
loadData
in interfaceDataLoader
- Parameters:
input
- data input streamname
- name of the file (or zip entry)- Throws:
IOException
- if data can't be readParseException
- if data can't be parsed or if some loader specific error occursOrekitException
-
stillAcceptsData
public boolean stillAcceptsData()
Description copied from interface:DataLoader
Check if the loader still accepts new data.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.
- Specified by:
stillAcceptsData
in interfaceDataLoader
- Returns:
- true while the loader still accepts new data
-
getAlmanacs
public List<GPSAlmanac> getAlmanacs()
Gets all theGPS almanacs
read from the file.- Returns:
- the list of
GPSAlmanac
from the file
-
getPRNNumbers
public List<Integer> getPRNNumbers()
Gets the PRN numbers of all theGPS almanacs
read from the file.- Returns:
- the PRN numbers of all the
GPS almanacs
read from the file
-
getSupportedNames
public String getSupportedNames()
Description copied from class:AbstractSelfFeedingLoader
Get the supported names regular expression.- Overrides:
getSupportedNames
in classAbstractSelfFeedingLoader
- Returns:
- the supported names.
- See Also:
DataProvidersManager.feed(String, DataLoader)
-
-