Class ViennaModelCoefficientsLoader
- java.lang.Object
-
- org.orekit.data.AbstractSelfFeedingLoader
-
- org.orekit.models.earth.troposphere.ViennaModelCoefficientsLoader
-
- All Implemented Interfaces:
DataLoader
public class ViennaModelCoefficientsLoader extends AbstractSelfFeedingLoader implements DataLoader
Loads Vienna tropospheric coefficients a given input stream. A stream contains, for a given day and a given hour, the hydrostatic and wet zenith delays and the ah and aw coefficients used for the computation of the mapping function. The coefficients are given with a time interval of 6 hours.A bilinear interpolation is performed the case of the user initialize the latitude and the longitude with values that are not contained in the stream.
The coefficients are obtained from Vienna Mapping Functions Open Access Data. Find more on the files at the VMF Model Documentation.
The files have to be extracted to UTF-8 text files before being read by this loader.
After extraction, it is assumed they are named VMFG_YYYYMMDD.Hhh for
ViennaOneModel
and VMF3_YYYYMMDD.HhhViennaThreeModel
. Where YYYY is the 4-digits year, MM the month, DD the day and hh the 2-digits hour.The format is always the same, with and example shown below for VMF1 model.
Example:
! Version: 1.0 ! Source: J. Boehm, TU Vienna (created: 2018-11-20) ! Data_types: VMF1 (lat lon ah aw zhd zwd) ! Epoch: 2018 11 19 18 00 0.0 ! Scale_factor: 1.e+00 ! Range/resolution: -90 90 0 360 2 2.5 ! Comment: http://vmf.geo.tuwien.ac.at/trop_products/GRID/2.5x2/VMF1/VMF1_OP/ 90.0 0.0 0.00116059 0.00055318 2.3043 0.0096 90.0 2.5 0.00116059 0.00055318 2.3043 0.0096 90.0 5.0 0.00116059 0.00055318 2.3043 0.0096 90.0 7.5 0.00116059 0.00055318 2.3043 0.0096 90.0 10.0 0.00116059 0.00055318 2.3043 0.0096 90.0 12.5 0.00116059 0.00055318 2.3043 0.0096 90.0 15.0 0.00116059 0.00055318 2.3043 0.0096 90.0 17.5 0.00116059 0.00055318 2.3043 0.0096 90.0 20.0 0.00116059 0.00055318 2.3043 0.0096 90.0 22.5 0.00116059 0.00055318 2.3043 0.0096 90.0 25.0 0.00116059 0.00055318 2.3043 0.0096 90.0 27.5 0.00116059 0.00055318 2.3043 0.0096
It is not safe for multiple threads to share a single instance of this class.
- Author:
- Bryan Cazabonne
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SUPPORTED_NAMES
Default supported files name pattern.
-
Constructor Summary
Constructors Constructor Description ViennaModelCoefficientsLoader(double latitude, double longitude, ViennaModelType type)
Constructor with default supported names.ViennaModelCoefficientsLoader(String supportedNames, double latitude, double longitude, ViennaModelType type)
Constructor with supported names given by user.ViennaModelCoefficientsLoader(String supportedNames, double latitude, double longitude, ViennaModelType type, DataProvidersManager dataProvidersManager)
Constructor with supported names and source of mapping function files given by the user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getA()
Returns the a coefficients array.String
getSupportedNames()
Get the supported names regular expression.double[]
getZenithDelay()
Returns the zenith delay array.void
loadData(InputStream input, String name)
Load data from a stream.void
loadViennaCoefficients()
Load the data using supported names .void
loadViennaCoefficients(DateTimeComponents dateTimeComponents)
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
-
ViennaModelCoefficientsLoader
@DefaultDataContext public ViennaModelCoefficientsLoader(String supportedNames, double latitude, double longitude, ViennaModelType type)
Constructor with supported names given by user. This constructor uses thedefault data context
.- Parameters:
supportedNames
- Supported nameslatitude
- geodetic latitude of the station, in radianslongitude
- geodetic latitude of the station, in radianstype
- the type of Vienna tropospheric model (one or three)- See Also:
ViennaModelCoefficientsLoader(String, double, double, ViennaModelType, DataProvidersManager)
-
ViennaModelCoefficientsLoader
public ViennaModelCoefficientsLoader(String supportedNames, double latitude, double longitude, ViennaModelType type, DataProvidersManager dataProvidersManager)
Constructor with supported names and source of mapping function files given by the user.- Parameters:
supportedNames
- Supported nameslatitude
- geodetic latitude of the station, in radianslongitude
- geodetic latitude of the station, in radianstype
- the type of Vienna tropospheric model (one or three)dataProvidersManager
- provides access to auxiliary files.- Since:
- 10.1
-
ViennaModelCoefficientsLoader
@DefaultDataContext public ViennaModelCoefficientsLoader(double latitude, double longitude, ViennaModelType type)
Constructor with default supported names. This constructor uses thedefault data context
.- Parameters:
latitude
- geodetic latitude of the station, in radianslongitude
- geodetic latitude of the station, in radianstype
- the type of Vienna tropospheric model (one or three)- See Also:
ViennaModelCoefficientsLoader(String, double, double, ViennaModelType, DataProvidersManager)
-
-
Method Detail
-
getA
public double[] getA()
Returns the a coefficients array.- double[0] = ah
- double[1] = aw
- Returns:
- the a coefficients array
-
getZenithDelay
public double[] getZenithDelay()
Returns the zenith delay array.- double[0] = Dhz → zenith hydrostatic delay
- double[1] = Dwz → zenith wet delay
- Returns:
- the zenith delay 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)
-
loadViennaCoefficients
public void loadViennaCoefficients()
Load the data using supported names .
-
loadViennaCoefficients
public void loadViennaCoefficients(DateTimeComponents dateTimeComponents)
Load the data for a given day.- Parameters:
dateTimeComponents
- date and time component.
-
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 interfaceDataLoader
- Returns:
- true while the loader still accepts new data
-
loadData
public void loadData(InputStream input, String name) throws IOException, ParseException
Description copied from interface:DataLoader
Load data from a stream.- 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 or if some loader specific error occurs
-
-