Package org.orekit.models.earth
Class GeoMagneticModelLoader
java.lang.Object
org.orekit.models.earth.GeoMagneticModelLoader
- All Implemented Interfaces:
DataLoader
Loads geomagnetic field models from a given input stream. A stream may contain multiple
models, the loader reads all available models in consecutive order.
The format of the expected model file is either:
- combined format as used by the geomag software, available from the IGRF model site; supports multiple epochs per file
- original format as used by the WMM model site.
Combined Format
{model name} {epoch} {nMax} {nMaxSec} {nMax3} {validity start} {validity end} {minAlt} {maxAlt} {model name} {line number}
{n} {m} {gnm} {hnm} {dgnm} {dhnm} {model name} {line number}
Example:
WMM2010 2010.00 12 12 0 2010.00 2015.00 -1.0 600.0 WMM2010 0
1 0 -29496.6 0.0 11.6 0.0 WMM2010 1
1 1 -1586.3 4944.4 16.5 -25.9 WMM2010 2
Original WMM Format
{epoch} {model name} {validity start}
{n} {m} {gnm} {hnm} {dgnm} {dhnm}
Example:
2015.0 WMM-2015 12/15/2014
1 0 -29438.5 0.0 10.7 0.0
1 1 -1501.1 4796.2 17.9 -26.8
- Author:
- Thomas Neidhart
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aCollectionof theGeoMagneticFieldmodels that have been successfully loaded.voidloadData(InputStream input, String name) Load data from a stream.booleanCheck if the loader still accepts new data.
-
Constructor Details
-
GeoMagneticModelLoader
public GeoMagneticModelLoader()Empty constructor.- Since:
- 12.0
-
-
Method Details
-
getModels
Returns aCollectionof theGeoMagneticFieldmodels that have been successfully loaded. TheCollectionis in insertion-order, thus it may not be sorted in order of the model epoch.- Returns:
- a
CollectionofGeoMagneticFieldmodels
-
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:
stillAcceptsDatain interfaceDataLoader- Returns:
- true while the loader still accepts new data
-
loadData
Load data from a stream.- Specified by:
loadDatain interfaceDataLoader- Parameters:
input- data input streamname- name of the file (or zip entry)- Throws:
IOException- if data can't be read
-