packages feed

gps 0.3.0 → 0.3.1

raw patch · 2 files changed

+19/−15 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.GPS: type Distance = Double

Files

Data/GPS.hs view
@@ -23,6 +23,7 @@ 	, DMS(..) 	, Latitude 	, Longitude+	, Distance 	, Heading 	, Speed 	, Vector@@ -166,11 +167,15 @@   diffLon = lon1 - lon2  -- |Given a vector and coordinate, computes a new DMS coordinate.--- within some epsilon it should hold that if--- 	dest = addVector (dist,heading) start+-- Within some epsilon it should hold that if+--+-- 	@dest = addVector (dist,heading) start@+-- -- then--- 	heading == dmsHeading start dest--- 	dist    == distance start dest+--+-- 	@heading == dmsHeading start dest@+-- 	+-- 	@dist    == distance start dest@ addVector :: Vector -> DMSCoordinate -> DMSCoordinate addVector (d,h) dms = degreePairToDMS (toDecimal  lat2, toDecimal lon2)   where@@ -198,9 +203,10 @@ degreePairToDMS :: (Double,Double) -> DMSCoordinate degreePairToDMS (lat,lon) = DMSCoord (DMS lat 0 0) (DMS lon 0 0) --- |Typically useful for printing, normalizes degrees/minutes/seconds+-- |Typically useful for printing, normalizes degrees, minutes, seconds -- into just degrees and decimal minutes:---     DMSCoord (DMS 45 36.938455 0) (DMS ...)+--+--   @DMSCoord (DMS 45 36.938455 0) (DMS ...)@ normalizeDMS :: DMSCoordinate -> DMSCoordinate normalizeDMS (DMSCoord lat lon) = 	DMSCoord lat' lon'@@ -216,7 +222,7 @@ fromTemp :: TempTrail a -> Trail a fromTemp (T ps p) = reverse (p:ps) --- |'smoothTrails speed trail' should separate points that would mandate a speed+-- |@smoothTrails speed trail@ should separate points that would mandate a speed -- in excess of the given rate into separate Trails.  No point are deleted; -- if there is only one 'correct' trail expected then the largest resulting -- trail will likely be the one your looking for.@@ -235,7 +241,7 @@ 		then (i + 1, T (l:ts) p) 		else (i, T ts l) --- |longestSmoothTrail is ust 'smoothTrails' returning only the longest smooth trail.+-- |Uses 'smoothTrails' but returns only the longest resulting trail longestSmoothTrail :: Location a b c => Speed -> Trail a -> Trail a longestSmoothTrail metersPerSec trail = maximumBy (comparing length) ([] : smoothTrails metersPerSec trail) @@ -247,13 +253,11 @@   go _ [] = []   go t (p:ps) = if getUTC p < t then go t ps else p : go (getUTC p) ps --- |'restLocation dist timeDiff' will create a list of trails, all of which are---  within 'distance' of each other spanning atleast the given amount of time.+-- |Creates a list of trails all of which are within the given distance of each+-- other spanning atleast the given amount of time. -----  For example:---  > restLocations 50 600--- --- Would return lists of all points that are within 50 meters of each other and+-- For example @restLocations 50 600@+-- would return lists of all points that are within 50 meters of each other and -- span at least 10 minutes (600 seconds). -- -- Note this gives points within fifty meters of the earliest point - wandering
gps.cabal view
@@ -1,5 +1,5 @@ name:		gps-version:	0.3.0+version:	0.3.1 license:	BSD3 license-file:	LICENSE author:		Thomas DuBuisson <thomas.dubuisson@gmail.com>