jord-0.6.0.0: Geographical Position Calculations

Copyright(c) 2018 Cedric Liegeois
LicenseBSD3
MaintainerCedric Liegeois <ofmooseandmen@yahoo.fr>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Geo.Jord.Duration

Contents

Description

Types and functions for working with (signed) durations.

Synopsis

The Duration type

data Duration Source #

A durartion with a resolution of 1 millisecond.

Instances
Eq Duration Source # 
Instance details

Defined in Data.Geo.Jord.Duration

Read Duration Source #

See readDuration.

Instance details

Defined in Data.Geo.Jord.Duration

Show Duration Source #

show Duration as (-)nHnMn.nS.

Instance details

Defined in Data.Geo.Jord.Duration

Quantity Duration Source #

Add/Subtract Durations.

Instance details

Defined in Data.Geo.Jord.Duration

NTransform a => IsGreatArc (Track a, Duration) Source #

GreatArc from track and duration using the mean radius of the WGS84 reference ellipsoid.

Instance details

Defined in Data.Geo.Jord.Kinematics

NTransform a => IsGreatArc (Track a, Duration, Length) Source #

GreatArc from track, duration and earth mean radius.

Instance details

Defined in Data.Geo.Jord.Kinematics

toMilliseconds :: Duration -> Int Source #

the number of milliseconds in duration.

Smart constructors

milliseconds :: Double -> Duration Source #

Duration from given amount of milliseconds.

hours :: Double -> Duration Source #

Duration from given amount of hours.

minutes :: Double -> Duration Source #

Duration from given amount of minutes.

seconds :: Double -> Duration Source #

Duration from given amount of seconds.

hms :: Int -> Int -> Double -> Duration Source #

Duration from hours minutes and decimal seconds.

Conversions

toHours :: Duration -> Double Source #

toHours d gets the number of hours in d.

toMinutes :: Duration -> Double Source #

toMinutes d gets the number of minutes in d.

toSeconds :: Duration -> Double Source #

toSeconds d gets the number of seconds in d.

Read

readDuration :: String -> Duration Source #

Obtains a Duration from the given string formatted (-)nHnMn.nS.

This simply calls read s :: Duration so error should be handled at the call site.