| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Geo.Geodetic.GreatCircle
Description
Great circle geodetic distance algorithm.
- sphericalLaw :: (AsCoordinate (->) (Const Coordinate) start, AsCoordinate (->) (Const Coordinate) end) => Sphere -> start -> end -> Double
- sphericalLawD :: (AsCoordinate (->) (Const Coordinate) start, AsCoordinate (->) (Const Coordinate) end) => start -> end -> Double
- sphericalLaw' :: Optional1 Sphere (Coordinate -> Coordinate -> Double) x => x
Documentation
Arguments
| :: (AsCoordinate (->) (Const Coordinate) start, AsCoordinate (->) (Const Coordinate) end) | |
| => Sphere | reference sphere |
| -> start | start coordinate |
| -> end | end coordinate |
| -> Double |
Great circle spherical law algorithm.
>>>fmap (printf "%0.4f") (do fr <- 27.812 <°> 154.295; to <- (-66.093) <°> 12.84; return (sphericalLaw earthMean fr to)) :: Maybe StringJust "15000950.5589"
>>>fmap (printf "%0.4f") (do fr <- (-16.7889) <°> 41.935; to <- 6.933 <°> (-162.55); return (sphericalLaw earthMean fr to)) :: Maybe StringJust "17128743.0669"
>>>fmap (printf "%0.4f") (do fr <- 27.812 <°> 154.295; to <- (-66.093) <°> 12.84; return (sphericalLaw ((6350000 :: Double) ^. _Sphere) fr to)) :: Maybe StringJust "14959840.4461"
>>>fmap (printf "%0.4f") (do fr <- (-16.7889) <°> 41.935; to <- 6.933 <°> (-162.55); return (sphericalLaw ((6350000 :: Double) ^. _Sphere) fr to)) :: Maybe StringJust "17081801.7377"
Arguments
| :: (AsCoordinate (->) (Const Coordinate) start, AsCoordinate (->) (Const Coordinate) end) | |
| => start | start coordinate |
| -> end | end coordinate |
| -> Double |
Great circle spherical law algorithm with a default sphere of the earth mean.
>>>fmap (printf "%0.4f") (do fr <- 27.812 <°> 154.295; to <- (-66.093) <°> 12.84; return (sphericalLawD fr to)) :: Maybe StringJust "15000950.5589"
>>>fmap (printf "%0.4f") (do fr <- (-16.7889) <°> 41.935; to <- 6.933 <°> (-162.55); return (sphericalLawD fr to)) :: Maybe StringJust "17128743.0669"
sphericalLaw' :: Optional1 Sphere (Coordinate -> Coordinate -> Double) x => x Source
Great circle spherical law algorithm with an optionally applied default sphere of the earth mean.
>>>fmap (printf "%0.4f") (do fr <- 27.812 <°> 154.295; to <- (-66.093) <°> 12.84; return (sphericalLaw' fr to :: Double)) :: Maybe StringJust "15000950.5589"
>>>fmap (printf "%0.4f") (do fr <- (-16.7889) <°> 41.935; to <- 6.933 <°> (-162.55); return (sphericalLaw' fr to :: Double)) :: Maybe StringJust "17128743.0669"