public abstract class SolarActivityDataReader extends Object implements DataLoader, SolarActivityDataProvider
Modifier and Type | Field and Description |
---|---|
protected boolean |
readCompleted
Indicator for completed read.
|
Modifier | Constructor and Description |
---|---|
protected |
SolarActivityDataReader(String supportedNames,
TimeScale timescaleIn)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addApKp(AbsoluteDate date,
Double[][] apkp)
Add a flux value
|
protected void |
addF107(AbsoluteDate date,
double f107)
Add a flux value
|
double |
getAp(AbsoluteDate date)
Get Ap value at given user date
|
AbsoluteDate |
getApKpMaxDate()
Get maximum date of ap / kp values
|
AbsoluteDate |
getApKpMinDate()
Get minimum date of ap / kp values
|
SortedMap<AbsoluteDate,Double[]> |
getApKpValues(AbsoluteDate date1,
AbsoluteDate date2)
Get ap / kp values between the given dates
|
AbsoluteDate |
getFluxMaxDate()
Get maximum date of flux values
|
AbsoluteDate |
getFluxMinDate()
Get minimum date of flux values
|
double |
getInstantFluxValue(AbsoluteDate date)
Get instant flux values at the given dates (possibly interpolated)
|
SortedMap<AbsoluteDate,Double> |
getInstantFluxValues(AbsoluteDate date1,
AbsoluteDate date2)
Get raw instant flux values between the given dates
|
double |
getKp(AbsoluteDate date)
Get Kp value at given user date
|
AbsoluteDate |
getMaxDate()
Get maximum date at which both flux and ap values are available
|
AbsoluteDate |
getMinDate()
Get minimum date at which both flux and ap values are available
|
String |
getSupportedNames()
Get the regular expression for supported files names.
|
protected boolean |
isEmpty()
Chech if data map is empty
|
abstract void |
loadData(InputStream input,
String name)
Load data from a stream.
|
boolean |
stillAcceptsData()
Check if the loader still accepts new data.
|
protected SolarActivityDataReader(String supportedNames, TimeScale timescaleIn)
Build an uninitialized reader.
supportedNames
- regular expression for supported files namestimescaleIn
- timescale used to compute time span between solar data. It should match
time scale used in solar data definitionpublic SortedMap<AbsoluteDate,Double[]> getApKpValues(AbsoluteDate date1, AbsoluteDate date2)
getApKpValues
in interface SolarActivityDataProvider
date1
- first datedate2
- second datepublic SortedMap<AbsoluteDate,Double> getInstantFluxValues(AbsoluteDate date1, AbsoluteDate date2)
getInstantFluxValues
in interface SolarActivityDataProvider
date1
- first datedate2
- second datepublic double getInstantFluxValue(AbsoluteDate date)
getInstantFluxValue
in interface SolarActivityDataProvider
date
- user datepublic double getAp(AbsoluteDate date)
getAp
in interface SolarActivityDataProvider
date
- user datepublic double getKp(AbsoluteDate date)
getKp
in interface SolarActivityDataProvider
date
- user datepublic AbsoluteDate getMinDate()
getMinDate
in interface SolarActivityDataProvider
public AbsoluteDate getMaxDate()
getMaxDate
in interface SolarActivityDataProvider
public AbsoluteDate getFluxMinDate()
getFluxMinDate
in interface SolarActivityDataProvider
public AbsoluteDate getFluxMaxDate()
getFluxMaxDate
in interface SolarActivityDataProvider
public AbsoluteDate getApKpMinDate()
getApKpMinDate
in interface SolarActivityDataProvider
public AbsoluteDate getApKpMaxDate()
getApKpMaxDate
in interface SolarActivityDataProvider
public boolean stillAcceptsData()
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 abstract void loadData(InputStream input, String name) throws IOException, ParseException, PatriusException
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 parsedPatriusException
- if some data is missing
or if some loader specific error occurspublic String getSupportedNames()
protected void addF107(AbsoluteDate date, double f107)
date
- date of flux valuef107
- value of flux at dateprotected void addApKp(AbsoluteDate date, Double[][] apkp)
date
- date of flux valueapkp
- coefficients at date : double[2][8]protected boolean isEmpty()
Copyright © 2019 CNES. All rights reserved.