igrf-0.2.0.0: International Geomagnetic Reference Field

Safe HaskellNone
LanguageHaskell2010

Math.SphericalHarmonics

Description

Provides spherical harmonic models of scalar-valued functions.

Synopsis

Documentation

data SphericalHarmonicModel a Source

Represents a spherical harmonic model of a scalar-valued function.

Constructors

SphericalHarmonicModel 

Fields

modelDegree :: Int

The maximum degree of the model. Must be >= 0.

referenceRadius :: a

The reference radius used to define the model.

coefficients :: [(a, a)]

G and H coefficients of the model and their secular variations. These coefficients are stored in the order [(g_0_0, h_0_0), (g_1_0, h1_0_), 1_1, 2_0, 2_1, 2_2, 3_0, 3_1, 3_2, 3_3, ...] There must be Triangle(modelDegree + 1) coefficients.

combine :: (Num a, Eq a) => SphericalHarmonicModel a -> SphericalHarmonicModel a -> SphericalHarmonicModel a Source

Adds two compatible spherical harmonic models.

scale :: Num a => a -> SphericalHarmonicModel a -> SphericalHarmonicModel a Source

Linearly scales a spherical harmonic model.

evaluateModel Source

Arguments

:: (Floating a, Ord a) 
=> SphericalHarmonicModel a

Spherical harmonic model

-> a

Spherical radius

-> a

Spherical colatitude (radian)

-> a

Spherical longitude (radian)

-> a

Model value

Computes the scalar value of the spherical harmonic model at a specified spherical position.

evaluateModelGradient Source

Arguments

:: (Floating a, Ord a) 
=> SphericalHarmonicModel a

Spherical harmonic model

-> a

Spherical radius

-> a

Spherical colatitude (radian)

-> a

Spherical longitude (radian)

-> (a, a, a)

Radial, colatitudinal, and longitudinal components of gradient

Computes the gradient of the scalar value of the spherical harmonic model, in spherical coordinates, at a specified location.

evaluateModelGradientInLocalTangentPlane Source

Arguments

:: (Floating a, Ord a) 
=> SphericalHarmonicModel a

Spherical harmonic model

-> a

Spherical radius

-> a

Spherical colatitude (radian)

-> a

Spherical longitude (radian)

-> (a, a, a)

East, North, and up components of gradient

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 specified location.