Safe Haskell | None |
---|
An implementation of Thaddeus Vincenty's direct and inverse geodetic algorithms. http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf
- type Convergence = Double
- convergence :: Convergence
- direct :: Ellipsoid -> Convergence -> Coordinate -> Bearing -> Double -> VincentyDirectResult
- directD :: Coordinate -> Bearing -> Double -> VincentyDirectResult
- direct' :: Optional2 Ellipsoid Convergence (Coordinate -> Bearing -> Double -> VincentyDirectResult) x => x
- data VincentyDirectResult
- inverse :: Ellipsoid -> Convergence -> Coordinate -> Coordinate -> Curve
- inverseD :: Coordinate -> Coordinate -> Curve
- inverse' :: Optional2 Ellipsoid Convergence (Coordinate -> Coordinate -> Curve) x => x
Documentation
type Convergence = DoubleSource
convergence :: ConvergenceSource
A typically acceptable convergence value.
direct :: Ellipsoid -> Convergence -> Coordinate -> Bearing -> Double -> VincentyDirectResultSource
Vincenty direct algorithm.
>>>
fmap (\c' -> direct wgs84 convergence c' (modBearing 165.34) 4235) (27.812 ..#.. 154.295)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude 27) (Minutes 46) (Seconds 30.0981)) (Longitude (DegreesLongitude 154) (Minutes 18) (Seconds 21.1466))) (Bearing 165.3451))
>>>
fmap (\c' -> direct wgs84 convergence c' (modBearing 165.34) 4235) ((-66.093) ..#.. 12.84)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude (-66)) (Minutes 7) (Seconds 47.0667)) (Longitude (DegreesLongitude 12) (Minutes 51) (Seconds 49.4142))) (Bearing 165.3183))
>>>
fmap (\c' -> direct ans convergence c' (modBearing 165.34) 4235) (27.812 ..#.. 154.295)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude 27) (Minutes 46) (Seconds 30.0986)) (Longitude (DegreesLongitude 154) (Minutes 18) (Seconds 21.1464))) (Bearing 165.3451))
>>>
fmap (\c' -> direct ans convergence c' (modBearing 165.34) 4235) ((-66.093) ..#.. 12.84)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude (-66)) (Minutes 7) (Seconds 47.0662)) (Longitude (DegreesLongitude 12) (Minutes 51) (Seconds 49.4139))) (Bearing 165.3183))
directD :: Coordinate -> Bearing -> Double -> VincentyDirectResultSource
Vincenty direct algorithm with a default ellipsoid of WGS84 and standard convergence.
>>>
fmap (\c' -> directD c' (modBearing 165.34) 4235) (27.812 ..#.. 154.295)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude 27) (Minutes 46) (Seconds 30.0981)) (Longitude (DegreesLongitude 154) (Minutes 18) (Seconds 21.1466))) (Bearing 165.3451))
>>>
fmap (\c' -> directD c' (modBearing 165.34) 4235) ((-66.093) ..#.. 12.84)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude (-66)) (Minutes 7) (Seconds 47.0667)) (Longitude (DegreesLongitude 12) (Minutes 51) (Seconds 49.4142))) (Bearing 165.3183))
direct' :: Optional2 Ellipsoid Convergence (Coordinate -> Bearing -> Double -> VincentyDirectResult) x => xSource
Vincenty direct algorithm with an optionally applied default ellipsoid of WGS84 and standard convergence.
>>>
fmap (\c' -> direct' c' (modBearing 165.34) (4235 :: Double) :: VincentyDirectResult) (27.812 ..#.. 154.295)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude 27) (Minutes 46) (Seconds 30.0981)) (Longitude (DegreesLongitude 154) (Minutes 18) (Seconds 21.1466))) (Bearing 165.3451))
>>>
fmap (\c' -> direct' c' (modBearing 165.34) (4235 :: Double) :: VincentyDirectResult) ((-66.093) ..#.. 12.84)
Just (VincentyDirectResult (Coordinate (Latitude (DegreesLatitude (-66)) (Minutes 7) (Seconds 47.0667)) (Longitude (DegreesLongitude 12) (Minutes 51) (Seconds 49.4142))) (Bearing 165.3183))
inverse :: Ellipsoid -> Convergence -> Coordinate -> Coordinate -> CurveSource
Vincenty inverse algorithm.
>>>
do fr <- 27.812 ..#.. 154.295; to <- (-66.093) ..#.. 12.84; return (inverse wgs84 convergence fr to)
Just (GeodeticCurve 14998576.9860 Azimuth 180.0000 Azimuth 0.0000)
>>>
do fr <- 27.812 ..#.. 154.295; to <- 87.7769 ..#.. 19.944; return (inverse wgs84 convergence fr to)
Just (GeodeticCurve 7099204.2589 Azimuth 0.0000 Azimuth 180.0000)
>>>
do fr <- 27.812 ..#.. 154.295; to <- (-66.093) ..#.. 12.84; return (inverse ans convergence fr to)
Just (GeodeticCurve 14998630.4056 Azimuth 180.0000 Azimuth 0.0000)
>>>
do fr <- 27.812 ..#.. 154.295; to <- 87.7769 ..#.. 19.944; return (inverse ans convergence fr to)
Just (GeodeticCurve 7099229.9126 Azimuth 0.0000 Azimuth 180.0000)
inverseD :: Coordinate -> Coordinate -> CurveSource
Vincenty inverse algorithm with a default ellipsoid of WGS84 and standard convergence.
>>>
do fr <- 27.812 ..#.. 154.295; to <- (-66.093) ..#.. 12.84; return (inverseD fr to)
Just (GeodeticCurve 14998576.9860 Azimuth 180.0000 Azimuth 0.0000)
>>>
do fr <- 27.812 ..#.. 154.295; to <- 87.7769 ..#.. 19.944; return (inverseD fr to)
Just (GeodeticCurve 7099204.2589 Azimuth 0.0000 Azimuth 180.0000)
inverse' :: Optional2 Ellipsoid Convergence (Coordinate -> Coordinate -> Curve) x => xSource
Vincenty inverse algorithm with an optionally applied default ellipsoid of WGS84 and standard convergence.
>>>
do fr <- 27.812 ..#.. 154.295; to <- (-66.093) ..#.. 12.84; return (inverse' fr to :: Curve)
Just (GeodeticCurve 14998576.9860 Azimuth 180.0000 Azimuth 0.0000)
>>>
do fr <- 27.812 ..#.. 154.295; to <- 87.7769 ..#.. 19.944; return (inverse' fr to :: Curve)
Just (GeodeticCurve 7099204.2589 Azimuth 0.0000 Azimuth 180.0000)