fr.cnes.sirius.patrius.signalpropagation.iono
Class USKLoader

java.lang.Object
  extended by fr.cnes.sirius.patrius.signalpropagation.iono.USKLoader
All Implemented Interfaces:
USKProvider, DataLoader

public final class USKLoader
extends Object
implements USKProvider, DataLoader

Reader for the USK data file (file of the "NEWUSK" type). Note : the code is ported from Fortran and not optimized. Since the file is not big, and its format is not meant to change often, it was decided an optimization pass was not needed.

Since:
1.3
Version:
$Id: USKLoader.java 17584 2017-05-10 13:26:39Z bignon $
Author:
Thomas Trapier
Concurrency :
conditionally thread-safe
Concurrency comment :
the instance is mutable, but no longer changes after the first call to getData() (the first call triggers the DataProvidersManager on the instance). This means : an instance can be shared and used in several threads, if getData() is called once in a single thread context first.

Constructor Summary
USKLoader(String fileName)
          Creates a USK data file reader and load the file.
 
Method Summary
 fr.cnes.sirius.patrius.signalpropagation.iono.USKData getData(AbsoluteDate date, double r12)
          Returns the USK data for the Bent model.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

USKLoader

public USKLoader(String fileName)
          throws OrekitException
Creates a USK data file reader and load the file.

Parameters:
fileName - name of the file
Throws:
OrekitException - if a problem occurs during the file loading.
Method Detail

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 interface DataLoader
Returns:
true while the loader still accepts new data

loadData

public void loadData(InputStream input,
                     String name)
              throws IOException,
                     ParseException,
                     OrekitException
Load data from a stream.

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
OrekitException - if some data is missing or if some loader specific error occurs

getData

public fr.cnes.sirius.patrius.signalpropagation.iono.USKData getData(AbsoluteDate date,
                                                                     double r12)
                                                              throws OrekitException
Returns the USK data for the Bent model.

Specified by:
getData in interface USKProvider
Parameters:
date - the date
r12 - R12 constant value
Returns:
the USK data for the Bent model
Throws:
OrekitException - if a problem occurs in time scales management


Copyright © 2017 CNES. All Rights Reserved.