Class ViennaModelCoefficientsLoader
- java.lang.Object
-
- org.orekit.models.earth.ViennaModelCoefficientsLoader
-
- All Implemented Interfaces:
DataLoader
public class ViennaModelCoefficientsLoader extends Object 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
- 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getA()
Returns the a coefficients array.String
getSupportedNames()
Returns the supported names of the loader.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.
-
-
-
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
public ViennaModelCoefficientsLoader(String supportedNames, double latitude, double longitude, ViennaModelType type)
Constructor with supported names given by 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)
-
ViennaModelCoefficientsLoader
public ViennaModelCoefficientsLoader(double latitude, double longitude, ViennaModelType type)
Constructor with default supported names.- 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)
-
-
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()
Returns the supported names of the loader.- Returns:
- the supported names
-
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.- Throws:
OrekitException
- if the coefficients could not be loaded
-
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
-
-