Class KlobucharIonoCoefficientsLoader
- java.lang.Object
-
- org.orekit.data.AbstractSelfFeedingLoader
-
- org.orekit.models.earth.ionosphere.KlobucharIonoCoefficientsLoader
-
- All Implemented Interfaces:
DataLoader
public class KlobucharIonoCoefficientsLoader extends AbstractSelfFeedingLoader implements DataLoader
Loads Klobuchar-Style ionospheric coefficients a given input stream. A stream contains the alphas and betas coefficient for a given day.They are obtained from University of Bern Astronomical Institute ftp. Find more on the files at the Astronomical Institute site.
The files are UNIX-style compressed (.Z) files. They have to be extracted to UTF-8 text files before being read by this loader.
After extraction, it is assumed they are named CGIMDDD0.YYN where DDD and YY substitute day of year and 2-digits year.
The format is always the same, with and example shown below. Only the last 2 lines contains the Klobuchar coefficients.
Example:
2 NAVIGATION DATA GPS RINEX VERSION / TYPE INXFIT V5.3 AIUB 06-JAN-17 09:12 PGM / RUN BY / DATE CODE'S KLOBUCHAR-STYLE IONOSPHERE MODEL FOR DAY 001, 2017 COMMENT Contact address: code(at)aiub.unibe.ch COMMENT Data archive: ftp.unibe.ch/aiub/CODE/ COMMENT www.aiub.unibe.ch/download/CODE/ COMMENT WARNING: USE DATA AT SOUTHERN POLAR REGION WITH CARE COMMENT 1.2821D-08 -9.6222D-09 -3.5982D-07 -6.0901D-07 ION ALPHA 1.0840D+05 -1.3197D+05 -2.6331D+05 4.0570D+05 ION BETA END OF HEADER
It is not safe for multiple threads to share a single instance of this class.
- Author:
- Maxime Journot
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SUPPORTED_NAMES
Default supported files name pattern.
-
Constructor Summary
Constructors Constructor Description KlobucharIonoCoefficientsLoader()
Constructor with default supported names.KlobucharIonoCoefficientsLoader(String supportedNames)
Constructor with supported names given by user.KlobucharIonoCoefficientsLoader(String supportedNames, DataProvidersManager dataProvidersManager)
Constructor that uses user defined supported names and data context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getAlpha()
Returns the alpha coefficients array.double[]
getBeta()
Returns the beta coefficients array.String
getSupportedNames()
Get the supported names regular expression.void
loadData(InputStream input, String name)
Load Klobuchar-Style ionospheric coefficients read from some file.void
loadKlobucharIonosphericCoefficients()
Load the data using supported names .void
loadKlobucharIonosphericCoefficients(DateComponents dateComponents)
Load the data for a given day.boolean
stillAcceptsData()
Check if the loader still accepts new data.-
Methods inherited from class org.orekit.data.AbstractSelfFeedingLoader
feed, getDataProvidersManager, setSupportedNames
-
-
-
-
Field Detail
-
DEFAULT_SUPPORTED_NAMES
public static final String DEFAULT_SUPPORTED_NAMES
Default supported files name pattern.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KlobucharIonoCoefficientsLoader
@DefaultDataContext public KlobucharIonoCoefficientsLoader(String supportedNames)
Constructor with supported names given by user. This constructor uses thedefault data context
.- Parameters:
supportedNames
- regular expression that matches the names of the RINEX files with Klobuchar coefficients.- See Also:
KlobucharIonoCoefficientsLoader(String, DataProvidersManager)
-
KlobucharIonoCoefficientsLoader
public KlobucharIonoCoefficientsLoader(String supportedNames, DataProvidersManager dataProvidersManager)
Constructor that uses user defined supported names and data context.- Parameters:
supportedNames
- regular expression that matches the names of the RINEX files with Klobuchar coefficients.dataProvidersManager
- provides access to auxiliary data files.
-
KlobucharIonoCoefficientsLoader
@DefaultDataContext public KlobucharIonoCoefficientsLoader()
Constructor with default supported names. This constructor uses thedefault data context
.
-
-
Method Detail
-
getAlpha
public double[] getAlpha()
Returns the alpha coefficients array.- Returns:
- the alpha coefficients array
-
getBeta
public double[] getBeta()
Returns the beta coefficients array.- Returns:
- the beta coefficients array
-
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)
-
loadKlobucharIonosphericCoefficients
public void loadKlobucharIonosphericCoefficients()
Load the data using supported names .
-
loadKlobucharIonosphericCoefficients
public void loadKlobucharIonosphericCoefficients(DateComponents dateComponents)
Load the data for a given day.- Parameters:
dateComponents
- day given but its DateComponents
-
stillAcceptsData
public boolean stillAcceptsData()
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
-
loadData
public void loadData(InputStream input, String name) throws IOException, ParseException
Load Klobuchar-Style ionospheric coefficients read from some file.- 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
-
-