-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | International Geomagnetic Reference Field
--
-- An implemetation of the International Geomagnetic Reference Field, a
-- model of the Earth's magnetic field.
--
-- Includes model coefficients from the 11th Edition of the IGRF.
@package igrf
@version 0.4.0.0
-- | Provides definitions of associated Legendre functions used in
-- spherical harmonic models.
module Math.SphericalHarmonics.AssociatedLegendre
-- | Computes the associated Legendre function of degree n and
-- order m. Note that the resulting function may not be a
-- polynomial, as when m is odd it involves a fractional power
-- of x. As used in the geodesy and magnetics literature, these
-- functions do not include the Condon-Shortley phase.
associatedLegendreFunction :: (Floating a, Ord a) => Int -> Int -> a -> a
-- | Computes the Schmidt semi-normalized associated Legendre function of
-- degree n and order m. As used in the geodesy and
-- magnetics literature, these functions do not include the
-- Condon-Shortley phase.
schmidtSemiNormalizedAssociatedLegendreFunction :: (Floating a, Ord a) => Int -> Int -> a -> a
-- | Provides spherical harmonic models of scalar-valued functions.
module Math.SphericalHarmonics
-- | Represents a spherical harmonic model of a scalar-valued function.
data SphericalHarmonicModel a
-- | Creates a spherical harmonic model. Result in an error if the length
-- of the list is not a triangular number.
sphericalHarmonicModel :: Fractional a => [[(a, a)]] -> SphericalHarmonicModel a
-- | Creates a spherical harmonic model, scaling coefficients for the
-- supplied reference radius. Result in an error if the length of the
-- list is not a triangular number.
scaledSphericalHarmonicModel :: Fractional a => a -> [[(a, a)]] -> SphericalHarmonicModel a
-- | Computes the scalar value of the spherical harmonic model at a
-- specified spherical position.
evaluateModel :: (RealFloat a, Ord a) => SphericalHarmonicModel a -> a -> a -> a -> a
-- | Computes the scalar value of the spherical harmonic model at a
-- specified Cartesian position.
evaluateModelCartesian :: (RealFloat a, Ord a) => SphericalHarmonicModel a -> a -> a -> a -> a
-- | Computes the gradient of the scalar value of the spherical harmonic
-- model, in spherical coordinates, at a specified location.
evaluateModelGradient :: (RealFloat a, Ord a) => SphericalHarmonicModel a -> a -> a -> a -> (a, a, a)
-- | Computes the gradient of the scalar value of the spherical harmonic
-- model at a specified location, in Cartesian coordinates. The result is
-- expressed in right-handed coordinates centered at the origin of the
-- sphere, with the positive Z-axis piercing the north pole and the
-- positive x-axis piercing the reference meridian.
evaluateModelGradientCartesian :: (RealFloat a, Ord a) => SphericalHarmonicModel a -> a -> a -> a -> (a, a, a)
-- | Computes the gradient of the scalar value of the spherical harmonic
-- model at a specified location, in Cartesian coordinates. The result is
-- expressed in a reference frame locally tangent to the sphere at the
-- specified location.
evaluateModelGradientInLocalTangentPlane :: (RealFloat a, Ord a) => SphericalHarmonicModel a -> a -> a -> a -> (a, a, a)
instance GHC.Base.Functor Math.SphericalHarmonics.SphericalHarmonicModel
instance (GHC.Real.Fractional a, GHC.Classes.Eq a) => Data.AdditiveGroup.AdditiveGroup (Math.SphericalHarmonics.SphericalHarmonicModel a)
instance (GHC.Real.Fractional a, GHC.Classes.Eq a) => Data.VectorSpace.VectorSpace (Math.SphericalHarmonics.SphericalHarmonicModel a)
-- | Parse
-- https://www.ngdc.noaa.gov/IAGA/vmod/coeffs/igrf13coeffs.txt
module IGRF.Parser
-- | Parse
-- https://www.ngdc.noaa.gov/IAGA/vmod/coeffs/igrf13coeffs.txt and
-- return a list of models.
parseModels :: Text -> [(Text, Text, SphericalHarmonicModel Double)]
-- | An implementation of the International Geomagnetic Reference Field, as
-- defined at http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html.
module IGRF
-- | Represents a spherical harmonic model of a magnetic field.
data MagneticModel a
MagneticModel :: SphericalHarmonicModel a -> SphericalHarmonicModel a -> MagneticModel a
-- | Field at model epoch in nT, reference radius in km
[fieldAtEpoch] :: MagneticModel a -> SphericalHarmonicModel a
-- | Secular variation in nT / yr, reference radius in km
[secularVariation] :: MagneticModel a -> SphericalHarmonicModel a
-- | The International Geomagnetic Reference Field model, 11th edition.
-- Model epoch is January 1st, 2010.
igrf11 :: Fractional a => MagneticModel a
-- | The International Geomagnetic Reference Field model, 12th edition.
-- Model epoch is January 1st, 2015.
igrf12 :: Fractional a => MagneticModel a
-- | The International Geomagnetic Reference Field model, 13th edition.
-- Model epoch is January 1st, 2020.
igrf13 :: Fractional a => MagneticModel a
-- | Gets a spherical harmonic model of a magnetic field at a specified
-- time offset from the model epoch.
fieldAtTime :: (Fractional a, Eq a) => MagneticModel a -> a -> SphericalHarmonicModel a
-- | Computes the gradient of the scalar value of the spherical harmonic
-- model at a specified location, in Cartesian coordinates. The result is
-- expressed in a reference frame locally tangent to the sphere at the
-- specified location.
evaluateModelGradientInLocalTangentPlane :: (RealFloat a, Ord a) => SphericalHarmonicModel a -> a -> a -> a -> (a, a, a)