public class ViennaModelCoefficientsLoader extends AbstractSelfFeedingLoader implements DataLoader
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.Hhh ViennaThreeModel
.
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.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SUPPORTED_NAMES
Default supported files name pattern.
|
Constructor and 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.
|
Modifier and Type | Method and 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.
|
feed, getDataProvidersManager, setSupportedNames
public static final String DEFAULT_SUPPORTED_NAMES
@DefaultDataContext public ViennaModelCoefficientsLoader(String supportedNames, double latitude, double longitude, ViennaModelType type)
default data context
.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(String, double, double, ViennaModelType, DataProvidersManager)
public ViennaModelCoefficientsLoader(String supportedNames, double latitude, double longitude, ViennaModelType type, DataProvidersManager dataProvidersManager)
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.@DefaultDataContext public ViennaModelCoefficientsLoader(double latitude, double longitude, ViennaModelType type)
default data context
.latitude
- geodetic latitude of the station, in radianslongitude
- geodetic latitude of the station, in radianstype
- the type of Vienna tropospheric model (one or three)ViennaModelCoefficientsLoader(String, double, double, ViennaModelType, DataProvidersManager)
public double[] getA()
public double[] getZenithDelay()
public String getSupportedNames()
AbstractSelfFeedingLoader
getSupportedNames
in class AbstractSelfFeedingLoader
DataProvidersManager.feed(String, DataLoader)
public void loadViennaCoefficients()
public void loadViennaCoefficients(DateTimeComponents dateTimeComponents)
dateTimeComponents
- date and time component.public boolean stillAcceptsData()
DataLoader
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 void loadData(InputStream input, String name) throws IOException, ParseException
DataLoader
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 parsed
or if some loader specific error occursCopyright © 2002-2022 CS GROUP. All rights reserved.