org.orekit.forces.atmospheres.solarActivity.specialized
Class MarshallSolarActivityFutureEstimation

java.lang.Object
  extended by org.orekit.forces.atmospheres.solarActivity.specialized.MarshallSolarActivityFutureEstimation
All Implemented Interfaces:
Serializable, DataLoader, DTM2000InputParameters

public class MarshallSolarActivityFutureEstimation
extends Object
implements DTM2000InputParameters, DataLoader

This class reads and provides solar activity data needed by atmospheric models: F107 solar flux and Kp indexes.

The data are retrieved through the NASA Marshall Solar Activity Future Estimation (MSAFE) as estimates of monthly F10.7 Mean solar flux and Ap geomagnetic parameter. The data can be retrieved at the NASA Marshall Solar Activity website. Here Kp indices are deduced from Ap indexes, which in turn are tabulated equivalent of retrieved Ap values.

If several MSAFE files are available, some dates may appear in several files (for example August 2007 is in all files from the first one published in March 1999 to the February 2008 file). In this case, the data from the most recent file is used and the older ones are discarded. The date of the file is assumed to be 6 months after its first entry (which explains why the file having August 2007 as its first entry is the February 2008 file). This implies that MSAFE files must not be edited to change their time span, otherwise this would break the old entries overriding mechanism.

With these data, the getInstantFlux(AbsoluteDate) and getMeanFlux(AbsoluteDate) methods return the same values and the get24HoursKp(AbsoluteDate) and getThreeHourlyKP(AbsoluteDate) methods return the same values.

Author:
Bruno Revelin, Luc Maisonobe
See Also:
Serialized Form

Nested Class Summary
static class MarshallSolarActivityFutureEstimation.StrengthLevel
          Strength level of activity.
 
Constructor Summary
MarshallSolarActivityFutureEstimation(String supportedNames, MarshallSolarActivityFutureEstimation.StrengthLevel strengthLevel)
          Simple constructor.
 
Method Summary
 double get24HoursKp(AbsoluteDate date)
          The Kp index is derived from the Ap index.
 DateComponents getFileDate(AbsoluteDate date)
          Get the date of the file from which data at the specified date comes from.
 double getInstantFlux(AbsoluteDate date)
          Get the value of the instantaneous solar flux.
 AbsoluteDate getMaxDate()
          Gets the available data range maximum date.
 double getMeanFlux(AbsoluteDate date)
          Get the value of the mean solar flux.
 AbsoluteDate getMinDate()
          Gets the available data range minimum date.
 MarshallSolarActivityFutureEstimation.StrengthLevel getStrengthLevel()
          Get the strength level for activity.
 String getSupportedNames()
          Get the supported names for data files.
 double getThreeHourlyKP(AbsoluteDate date)
          Get the value of the 3 hours geomagnetic index.
 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

MarshallSolarActivityFutureEstimation

public MarshallSolarActivityFutureEstimation(String supportedNames,
                                             MarshallSolarActivityFutureEstimation.StrengthLevel strengthLevel)
Simple constructor.

The original file names used by NASA Marshall space center are of the form: Dec2010F10.txt or Oct1999F10.TXT. So a recommended regular expression for the supported name that work with all published files is: "(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\p{Digit}\\p{Digit}\\p{Digit}\\p{Digit}F10\\.(?:txt|TXT)"

Parameters:
supportedNames - regular expression for supported files names
strengthLevel - selected strength level of activity
Method Detail

getStrengthLevel

public MarshallSolarActivityFutureEstimation.StrengthLevel getStrengthLevel()
Get the strength level for activity.

Returns:
strength level to set

getSupportedNames

public String getSupportedNames()
Get the supported names for data files.

Returns:
regular expression for the supported names for data files

getMinDate

public AbsoluteDate getMinDate()
Gets the available data range minimum date.

Specified by:
getMinDate in interface DTM2000InputParameters
Returns:
the minimum date.

getMaxDate

public AbsoluteDate getMaxDate()
Gets the available data range maximum date.

Specified by:
getMaxDate in interface DTM2000InputParameters
Returns:
the maximum date.

getInstantFlux

public double getInstantFlux(AbsoluteDate date)
                      throws OrekitException
Get the value of the instantaneous solar flux.

Specified by:
getInstantFlux in interface DTM2000InputParameters
Parameters:
date - the current date
Returns:
the instantaneous solar flux
Throws:
OrekitException - if the date is out of range of available data

getMeanFlux

public double getMeanFlux(AbsoluteDate date)
                   throws OrekitException
Get the value of the mean solar flux.

Specified by:
getMeanFlux in interface DTM2000InputParameters
Parameters:
date - the current date
Returns:
the mean solar flux
Throws:
OrekitException - if the date is out of range of available data

getThreeHourlyKP

public double getThreeHourlyKP(AbsoluteDate date)
                        throws OrekitException
Get the value of the 3 hours geomagnetic index. With a delay of 3 hours at pole to 6 hours at equator using: delay=6-abs(lat)*0.033 (lat in deg.)

Specified by:
getThreeHourlyKP in interface DTM2000InputParameters
Parameters:
date - the current date
Returns:
the 3H geomagnetic index
Throws:
OrekitException - if the date is out of range of available data

getFileDate

public DateComponents getFileDate(AbsoluteDate date)
                           throws OrekitException
Get the date of the file from which data at the specified date comes from.

If several MSAFE files are available, some dates may appear in several files (for example August 2007 is in all files from the first one published in March 1999 to the February 2008 file). In this case, the data from the most recent file is used and the older ones are discarded. The date of the file is assumed to be 6 months after its first entry (which explains why the file having August 2007 as its first entry is the February 2008 file). This implies that MSAFE files must not be edited to change their time span, otherwise this would break the old entries overriding mechanism.

Parameters:
date - date of the solar activity data
Returns:
date of the file
Throws:
OrekitException - if specified date is out of range

get24HoursKp

public double get24HoursKp(AbsoluteDate date)
                    throws OrekitException
The Kp index is derived from the Ap index.

The method used is explained on NOAA website. as follows:

The scale is 0 to 9 expressed in thirds of a unit, e.g. 5- is 4 2/3, 5 is 5 and 5+ is 5 1/3. The ap (equivalent range) index is derived from the Kp index as follows:

Kp0o0+1-1o1+2-2o2+3-3o3+4-4o4+
ap02345679121518222732
Kp5-5o5+6-6o6+7-7o7+8-8o8+9-9o
ap394856678094111132154179207236300400

Specified by:
get24HoursKp in interface DTM2000InputParameters
Parameters:
date - date of the Kp data
Returns:
the 24H geomagnetic index
Throws:
OrekitException - if the date is out of range of available 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

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


Copyright © 2016 CNES. All Rights Reserved.