t]D      !"#$%&'()*+,-./0123456789:;<=>?@ABC)Speed is hard coded as meters per second D,Angles are expressed in radians from North.  0 == North  pi/ 2 == West  pi == South  (32)pi == East == - (pi  2) "Distances are expressed in meters .Direction two points aim toward (0 = North, pi2 = West, pi = South, 3pi 2 = East)  :Given a vector and coordinate, computes a new coordinate. , Within some epsilon it should hold that if  %dest = addVector (dist,heading) startthen  heading == heading start dest dist == distance start dest &Speed in meters per second, only if a E! was recorded for each waypoint. radius of the earth in meters  Circumference of earht (meters) North is 0 radians ,South, being 180 degrees from North, is pi. East is 270 degrees (3 pi / 2) West is 90 degrees (pi/2) FProvides a lat/lon pair of doubles in radians GdivideArea vDist hDist nw se( divides an area into a grid of equally I spaced coordinates within the box drawn by the northwest point (nw) and J southeast point (se). Because this uses floating point there might be a O different number of points in some rows (the last might be too far east based " on a heading from the se point). IReads a GPX file (using the GPX library) by simply concatenating all the  tracks, segments, and points (H, I, J) into a single . KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~JIH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnEopqrstuvwxyz{|}~  9;When grouping points, lists of points are either marked as  or . 9Given a selection of coordinates, transform the selected 9 coordinates in some way (while leaving the non-selected  coordinates unaffected). @A PointGrouping is a function that selects segments of a trail. LGrouping point _does not_ result in deleted points. It is always true that:  forall g :: PointGrouping c --> % concatMap unSelect (g ts) == ts MThe purpose of grouping is usually for later processing. Any desire to drop  points that didn'9t meet a particular grouping criteria can be filled with  a composition with  (or directly via 8).  6Take the minimum of the speeds from the given methods !7Compute the speed considering only the given endpoints "+Obtain the median of the considered points # Obtain the  $ Obtain the  % Obtain the  of the considered points &avgSpeeds n points ' Average speed using a window of up to n% seconds and averaging by taking the  Median ("). 'slidingAverageSpeed m n. Average speed using a moving window of up to n seconds  and an  of m. ()*+,>Groups trail segments into contiguous points within the speed + and all others outside of the speed. The speed from point p(i) ? to p(i+1) is associated with p(i) (execpt for the first speed B value, which is associated with both the first and second point) -A  rest point6 means the coordinates remain within a given distance + for at least a particular amount of time. .<chunking points into groups spanning at most the given time  interval. /intersects the given groupings 0Union all the groupings 1Intersection binary operator 2Union binary operator 3Inverts the selected/nonselected segments 4firstGrouping f ps only the first segment remains  ed, and only  if it was already selected by f. 5>Only the last segment, if any, is selected (note: the current & implementation is inefficient, using ) 6(chunk the trail into groups of N points 7@For every selected group, refine the selection using the second % grouping method. This differs from IntersectionOf by restarting D the second grouping algorithm at the beginning each group selected  by the first algorithm. 8Remove all points that remain $ed by the given grouping algorithm. 9@Construct a bezier curve using the provided trail. Construct a B new trail by sampling the given bezier curve at the given times. ; The current implementation assumes the times of the input ? coordinates are available and all equal (Ex: all points are 5 C seconds apart), the results will be poor if this is not the case! :;AInterpolate selected points onto a bezier curve. Note this gets D exponentially more expensive with the length of the segement being @ transformed - it is not advisable to perform this operation on , trail segements with more than ten points! <BFilters out any points that go backward in time (thus must not be  valid if this is a trail) =AReturns the closest distance between two trails (or Nothing if a / trail is empty). Inefficient implementation:  O( (n * m) * log (n * m) ) >!Find the total distance traveled ?@BUses Grahams scan to compute the convex hull of the given points. 6 This operation requires sorting of the points, so don't try it unless D you have notably more memory than the list of points will consume. Find the southmost point ABC, !"#$%&'()*+,-./0123456789:;<=>?@ABC,%$#"!  !"#$%&'()*+,-./0123456789:;<=>?@ABCLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~JIH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnEopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCE    %$#"! ()+*>?&'=@9;<8,-.6/3450712ABC:      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMINOIPQIRSTUVWUVXUVYUVZUV[U\]U\^UV_UV`UV`UVaUVbUVcUVdUVeUVfUVgUVhUViUVjUVjUVkUVlUVmUVnUVoUVpUVqUVrUVsUVtUVuIvwIvxIvyIvzIv{I|}I|~I|I|I|I|I|I|I|I|I|I|IIIIIIIIRIRIRIRIRIIIPIPIPIPIPIIINININININIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII I  I  I I I I IIIIIIIIIII I!I"I#I$%I$&I$'I$(I)*I)+I,-I,.I,/I,0I,1I,2I34I35I67I68I9:I9;I9<I9=I9>I9?I@AI@BICDICEICFICGICHICIIJKIJLIJMIJNIJOIJPIQRIQSITUITVITWITXITYITZI[\I[]I^_I^`I^aI^bIcdIceIcfIcgIchIciIjkIjlIjmIjnIjoIjpIqrIqsIqtIquIvwIvxIvyIvzI{|I{}I{~I{IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJIJIJIJIJIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII    U U  gps-0.8.4Data.GPS Data.GPS.CoreData.GPS.TrailTrailVectorSpeedHeadingDistance getUTCTimedistanceheading getVector addVectorspeed radiusOfEarthcircumferenceOfEarthnorthsoutheastwest getDMSPair getRadianPair interpolate divideAreareadGPXwriteGPXreadGPXSegmentsSelected NotSelectSelectunSelectTransformGrouping PointGrouping AvgMethodAvgWithAvgMinOf AvgEndPoints AvgMedianAvgGeometricMeanAvgHarmonicMeanAvgMean avgSpeedsslidingAverageSpeed isSelected isNotSelected selLength onSelected betweenSpeeds restLocations spansTimeintersectionOfunionOf/\\/invertSelection firstGrouping lastGrouping everyNPointsrefineGrouping filterPoints bezierCurveAt bezierPoint bezierCurve linearTimeclosestDistance totalDistance totalTime convexHull smoothRests smoothSome smoothMoreAngleGPX-0.5Data.Geo.GPX.Accessor.TimeTimegetRadianPairD toRadiansData.Geo.GPX.Accessor.TrkptstrkptsData.Geo.GPX.Accessor.TrksegstrksegsData.Geo.GPX.Accessor.Trkstrks writeGpxFilebase Control.Arrowarrfirstapp|||loopControl.Category<<<>>> ArrowLoop ArrowMonad ArrowApply ArrowChoiceleftright+++ ArrowPlus<+> ArrowZero zeroArrowKleisli runKleisliArrowsecond***&&&returnA^>>>>^<<^^<<leftAppData.Geo.GPX.Util.ReversereverseConservingTime reverseWptsreverseTrksegs reverseTrks reverseRtesData.Geo.GPX.Gpx interactsGpx interactGpx interactsGpx' interactGpx'interactsGpxIO interactGpxIOinteractsGpxIO'interactGpxIO' readGpxFiles readGpxFilegpxGpxData.Geo.GPX.GpxTypegpxTypeGpxTypeData.Geo.GPX.Util.RemoveremoveExtensionsremoveMetadata removeRtes removeTrks removeWpts usingTrks' usingTrkssetTrks'setTrksTrksData.Geo.GPX.TrkTypetrkTypeTrkType usingTrksegs' usingTrksegs setTrksegs' setTrksegsTrksegsData.Geo.GPX.TrksegType trksegType TrksegType usingTrkpts' usingTrkpts setTrkpts' setTrkptsTrkptsData.Geo.GPX.Accessor.Rtes usingRtes' usingRtessetRtes'setRtesrtesRtesData.Geo.GPX.RteTyperteTypeRteTypeData.Geo.GPX.Accessor.Rtepts usingRtepts' usingRtepts setRtepts' setRteptsrteptsRteptsData.Geo.GPX.Accessor.Wpts usingWpts' usingWptssetWpts'setWptswptsWptsData.Geo.GPX.WptTypewptType'wptTypeWptTypeData.Geo.GPX.Accessor.Dgpsid usingDgpsid' usingDgpsid setDgpsid' setDgpsiddgpsidDgpsidData.Geo.GPX.DgpsStationTypedgpsStationTypeDgpsStationTypeData.Geo.GPX.Accessor.Fix usingFix'usingFixsetFix'setFixfixFixData.Geo.GPX.FixTypefixTypeppsdgpsthreedtwodnone foldFixTypeFixTypeData.Geo.GPX.Accessor.Magvar usingMagvar' usingMagvar setMagvar' setMagvarmagvarMagvarData.Geo.GPX.DegreesType degreesType DegreesTypeData.Geo.GPX.PtsegType ptsegType PtsegTypeData.Geo.GPX.Accessor.Pts usingPts'usingPtssetPts'setPtsptsPtsData.Geo.GPX.PtTypeptTypePtTypeData.Geo.GPX.Accessor.LonusingLonsetLonlonLonData.Geo.GPX.Accessor.MetadatausingMetadata' usingMetadata setMetadata' setMetadatametadataMetadataData.Geo.GPX.MetadataType metadataType MetadataTypeData.Geo.GPX.Accessor.Bounds usingBounds' usingBounds setBounds' setBoundsboundsBoundsData.Geo.GPX.BoundsType boundsType BoundsTypeData.Geo.GPX.Accessor.Maxlon usingMaxlon setMaxlonmaxlonMaxlonData.Geo.GPX.Accessor.Minlon usingMinlon setMinlonminlonMinlonData.Geo.GPX.LongitudeType longitudeType LongitudeTypeData.Geo.GPX.Accessor.LatusingLatsetLatlatLatData.Geo.GPX.Accessor.Maxlat usingMaxlat setMaxlatmaxlatMaxlatData.Geo.GPX.Accessor.Minlat usingMinlat setMinlatminlatMinlatData.Geo.GPX.LatitudeType latitudeType LatitudeType Data.Geo.GPX.Accessor.ExtensionsusingExtensions'usingExtensionssetExtensions' setExtensions extensions ExtensionsData.Geo.GPX.ExtensionsTypeextensionsTypeExtensionsTypeData.Geo.GPX.PersonType personType PersonTypeData.Geo.GPX.Accessor.Email usingEmail' usingEmail setEmail'setEmailemailEmailData.Geo.GPX.EmailType emailType EmailTypeData.Geo.GPX.Accessor.Link usingLink' usingLinksetLink'setLinklinkLinkData.Geo.GPX.Accessor.Links usingLinks' usingLinks setLinks'setLinkslinksLinksData.Geo.GPX.LinkTypelinkTypeLinkTypeData.Geo.GPX.Accessor.CopyrightusingCopyright'usingCopyright setCopyright' setCopyright copyright CopyrightData.Geo.GPX.CopyrightType copyrightType CopyrightTypeData.Geo.GPX.Accessor.Author usingAuthor setAuthorauthorAuthorData.Geo.GPX.Accessor.Year usingYear' usingYearsetYear'setYearyearYearData.Geo.GPX.Accessor.License usingLicense' usingLicense setLicense' setLicenselicenseLicenseData.Geo.GPX.Accessor.Value usingValuesetValuevalueValueData.Geo.GPX.Accessor.IdusingIdsetIdidIdData.Geo.GPX.Accessor.Domain usingDomain setDomaindomainDomainData.Geo.GPX.Accessor.Version usingVersion setVersionversionVersionData.Geo.GPX.Accessor.Creator usingCreator setCreatorcreatorCreatorData.Geo.GPX.Accessor.Href usingHrefsetHrefhrefHrefData.Geo.GPX.Accessor.Text usingText' usingTextsetText'setTexttextTextData.Geo.GPX.Accessor.Type usingType' usingTypesetType'setTypetype'TypeData.Geo.GPX.Accessor.Name usingName' usingNamesetName'setNamenameNameData.Geo.GPX.Accessor.Desc usingDesc' usingDescsetDesc'setDescdescDesc usingTime' usingTimesetTime'setTimetimeData.Geo.GPX.Accessor.KeywordsusingKeywords' usingKeywords setKeywords' setKeywordskeywordsKeywordsData.Geo.GPX.Accessor.Ele usingEle'usingElesetEle'setEleeleEle!Data.Geo.GPX.Accessor.GeoidheightusingGeoidheight'usingGeoidheightsetGeoidheight'setGeoidheight geoidheight GeoidheightData.Geo.GPX.Accessor.Cmt usingCmt'usingCmtsetCmt'setCmtcmtCmtData.Geo.GPX.Accessor.Src usingSrc'usingSrcsetSrc'setSrcsrcSrcData.Geo.GPX.Accessor.Sym usingSym'usingSymsetSym'setSymsymSymData.Geo.GPX.Accessor.Sat usingSat'usingSatsetSat'setSatsatSatData.Geo.GPX.Accessor.Hdop usingHdop' usingHdopsetHdop'setHdophdopHdopData.Geo.GPX.Accessor.Vdop usingVdop' usingVdopsetVdop'setVdopvdopVdopData.Geo.GPX.Accessor.Pdop usingPdop' usingPdopsetPdop'setPdoppdopPdop#Data.Geo.GPX.Accessor.AgeofdgpsdatausingAgeofdgpsdata'usingAgeofdgpsdatasetAgeofdgpsdata'setAgeofdgpsdata ageofdgpsdata AgeofdgpsdataData.Geo.GPX.Accessor.Number usingNumber' usingNumber setNumber' setNumbernumberNumberData.Geo.GPX.Accessor.Latlon usingLatlon setLatlonlatlonLatlonTurnStraight RightTurnLeftTurnGHC.Listfilterstatistics-0.10.1.0Statistics.Sample geometricMean harmonicMeanmean takeWhileEnd dropExact selListTake selListDropreverse mkTimePaireastZeroHeadingturn southMost slidingWindow