| Copyright | (c) 2020 Cedric Liegeois |
|---|---|
| License | BSD3 |
| Maintainer | Cedric Liegeois <ofmooseandmen@yahoo.fr> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Geo.Jord.Angle
Description
Types and functions for working with angles representing latitudes, longitude and bearings.
Synopsis
- data Angle
- decimalDegrees :: Double -> Angle
- dms :: Int -> Int -> Double -> Either String Angle
- radians :: Double -> Angle
- arcLength :: Angle -> Length -> Length
- central :: Length -> Length -> Angle
- isNegative :: Angle -> Bool
- isWithin :: Angle -> Angle -> Angle -> Bool
- negate' :: Angle -> Angle
- normalise :: Angle -> Angle -> Angle
- asin' :: Double -> Angle
- atan2' :: Double -> Double -> Angle
- cos' :: Angle -> Double
- sin' :: Angle -> Double
- getDegrees :: Angle -> Int
- getArcminutes :: Angle -> Int
- getArcseconds :: Angle -> Int
- getArcmilliseconds :: Angle -> Int
- toDecimalDegrees :: Angle -> Double
- toRadians :: Angle -> Double
- angleP :: ReadP Angle
- readAngle :: String -> Maybe Angle
The Angle type
An angle with a resolution of a microarcsecond. When used as a latitude/longitude this roughly translate to a precision of 0.03 millimetres at the equator.
Smart constructors
decimalDegrees :: Double -> Angle Source #
Calculations
arcLength :: Angle -> Length -> Length Source #
arcLength a r computes the Length of the arc that subtends the angle a for radius r.
central :: Length -> Length -> Angle Source #
central l r computes the central Angle from the arc length l and radius r.
isWithin :: Angle -> Angle -> Angle -> Bool Source #
Is given Angle within range [low..high] inclusive?
Trigonometric functions
atan2' :: Double -> Double -> Angle Source #
atan2' y x computes the Angle (from the positive x-axis) of the vector from the origin to the point (x,y).
Accessors
getDegrees :: Angle -> Int Source #
getDegrees a returns the degree component of a.
getArcminutes :: Angle -> Int Source #
getArcminutes a returns the arcminute component of a.
getArcseconds :: Angle -> Int Source #
getArcseconds a returns the arcsecond component of a.
getArcmilliseconds :: Angle -> Int Source #
getArcmilliseconds a returns the arcmilliseconds component of a.