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 Details

    • DEFAULT_SUPPORTED_NAMES

      public static final String DEFAULT_SUPPORTED_NAMES
      Default supported files name pattern.
      See Also:
  • Constructor Details

  • Method Details

    • 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 class AbstractSelfFeedingLoader
      Returns:
      the supported names.
      See Also:
    • 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 interface DataLoader
      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 interface DataLoader
      Parameters:
      input - data input stream
      name - name of the file (or zip entry)
      Throws:
      IOException - if data can't be read
      ParseException - if data can't be parsed