B.     &)Speed is hard coded as meters per second ,Angles are expressed in radians from North.  0 == North  pi/ 2 == West  pi == South  (32)pi == East == - (pi  2) "Distances are expressed in meters !Find the total distance traveled .Direction two points aim toward (0 = North, pi2 = West, pi = South, 3pi 2 = East)  0 = North, pi/ 2 = West... &Speed in meters per second, only if a ! was recorded for each waypoint. HFilter out all points that result in a speed greater than a given value  (the second point is dropped) radius of the earth in meters North is 0 radians ,South, being 180 degrees from North, is pi. East is 270 degrees from North West is 90 degrees (pi/2) :Given a vector and coordinate, computes a new coordinate. , Within some epsilon it should hold that if  %dest = addVector (dist,heading) startthen   heading == dmsHeading start dest dist == distance start dest Provides a lat/lon pair of doubles in radians !"\Filters out any points that go backward in time (thus must not be valid if this is a trail) LCreates a list of trails all of which are within the given distance of each 2 other spanning atleast the given amount of time.  For example restLocations 50 600 N would return lists of all points that are within 50 meters of each other and ) span at least 10 minutes (600 seconds). MNote this gives points within fifty meters of the earliest point - wandering K in a rest area with a 50 meter radius could result in several rest points  ([a,b..]F) or even none if the distance between individual points exceeds 50m. #QReturns the closest distance between two trails (or Nothing if a trail is empty)  O( (n * m) * log (n * m) ) divideArea 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 ($, %, &) into a single . 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 *+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde&fghijkl%mnopqrs$tuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~           !"#$%&'!()!*+!,-./012312412512612718918:12;12<12<12=12>12?12@12A12B12C12D12E12F12F12G12H12I12J12K12L12M12N12O12P12Q!RS!RT!RU!RV!RW!XY!XZ!X[!X\!X]!X^!X_!X`!Xa!Xb!Xc!Xd!ef!eg!hi!hj!hk!hl!hm!,n!,o!,p!,q!,r!st!su!*v!*w!*x!*y!*z!{|!{}!(~!(!(!(!(!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ! !!!!!!!!!!!!!! !!!"!#!$!%&!%'!%(!%)!%*!%+!,-!,.!/0!/1!/2!/3!/4!/5!67!68!9:!9;!9<!9=!>?!>@!>A!>B!>C!>D!EF!EG!EH!EI!EJ!EK!LM!LN!LO!LP!QR!QS!QT!QU!VW!VX!VY!VZ![\![]![^![_!`a!`b!`c!`d!ef!eg!eh!ei!jk!jl!jm!jn!jo!jp!qr!qs!qt!qu!qv!qw!xy!xz!x{!x|!x}!x~!!!!!!!"!"!"!"!"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!gps-0.6Data.GPSTrailVectorSpeedHeadingDistancedistance totalDistanceheadingspeedfilterByMaxSpeed radiusOfEarthnorthsoutheastwest addVector getDMSPair getRadianPair restLocationsclosestDistance divideAreareadGPX convexHullTurnStraight RightTurnLeftTurn TempTrailT getUTCTime getVector GPX-0.4.8Data.Geo.GPX.Accessor.TimeTimegetRadianPairD toRadians linearTime takeWhileLastData.Geo.GPX.Accessor.TrkptstrkptsData.Geo.GPX.Accessor.TrksegstrksegsData.Geo.GPX.Accessor.TrkstrkseastZeroHeadingturn southMostbase 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.FixTypefixTypeppsdgpsthreedtwod 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'setCmtCmtData.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 setLatlonlatlonLatlon