Class WMMLoader
java.lang.Object
com.irurueta.navigation.inertial.wmm.WMMLoader
Loads a WWM from a file of coefficients.
The file of coefficients is updated every 5 years and can be obtained
at: https://www.ngdc.noaa.gov/geomag/WMM/
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WorldMagneticModelLoads World Magnetic Model from provided file.static WorldMagneticModelload(InputStream stream) Loads World Magnetic Model from provided stream of data.static WorldMagneticModelLoads World Magnetic Model from provided URL.static WorldMagneticModelloadFromFile(String filePath) Loads World Magnetic Model from provided file path.static WorldMagneticModelloadFromResource(String resource) Loads World Magnetic Model from provided resource name.static WorldMagneticModelloadFromUrl(String url) Loads World Magnetic Model from provided URL.
-
Field Details
-
MAX_VAL
private static final double MAX_VALMaximum allowed value within file of coefficients.- See Also:
-
N
private static final int NNumber of coefficients.- See Also:
-
-
Constructor Details
-
WMMLoader
private WMMLoader()Constructor. Prevents instantiation of helper class.
-
-
Method Details
-
loadFromResource
Loads World Magnetic Model from provided resource name. Resource will be resolved an loaded using current class loader.- Parameters:
resource- a resource name.- Returns:
- a World Magnetic Model containing all required coefficients.
- Throws:
IOException- if an I/O error occurs.
-
loadFromUrl
Loads World Magnetic Model from provided URL. Data will be requested with a "GET" method without additional headers.- Parameters:
url- URL to request data from.- Returns:
- a World Magnetic Model containing all required coefficients.
- Throws:
IOException- if an I/O error occurs.
-
loadFromFile
Loads World Magnetic Model from provided file path.- Parameters:
filePath- a file path.- Returns:
- a World Magnetic Model containing all required coefficients.
- Throws:
IOException- if an I/O error occurs.
-
load
Loads World Magnetic Model from provided URL. Data will be requested with a "GET" method without additional headers.- Parameters:
url- URL to request data from.- Returns:
- a World Magnetic Model containing all required coefficients.
- Throws:
IOException- if an I/O error occurs.
-
load
Loads World Magnetic Model from provided file.- Parameters:
file- a file.- Returns:
- a World Magnetic Model containing all required coefficients.
- Throws:
IOException- if an I/O error occurs.
-
load
Loads World Magnetic Model from provided stream of data.- Parameters:
stream- a stream of data.- Returns:
- a World Magnetic Model containing all required coefficients.
- Throws:
IOException- if an I/O error occurs.
-