úÎ[™WŽI      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH Safe-Infered GAn arc is represented as a circle, starting heading and ending heading DGenearlly a circle indicates a known area in which we are searching C (so a center point and maximum possible distance from that point) )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 .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 Time! was recorded for each waypoint. radius of the earth in meters  Circumference of earth (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) interpolate c1 c2 w where 0 <= w <= 1 Gives a point on the line $ between c1 and c2 equal to c1 when w == 0 (weighted linearly  toward c2). NCompute the points at which two circles intersect (assumes a flat plain). If B the circles do not intersect or are identical then the result is Nothing. CFind the area in which all given circles intersect. The resulting E area is described in terms of the bounding arcs. All cirlces must  intersect at two points.     Safe-Infered ;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 I (or directly via >). &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 J * Obtain the K + Obtain the L 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. 2>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) 3A  rest point6 means the coordinates remain within a given distance + for at least a particular amount of time. 4<chunking points into groups spanning at most the given time  interval. 5intersects the given groupings 6Union all the groupings 7Intersection binary operator 8Union binary operator 9Inverts the selected/nonselected segments :firstGrouping f ps only the first segment remains   ed, and only  if it was already selected by f. ;>Only the last segment, if any, is selected (note: the current & implementation is inefficient, using M) <(chunk the trail into groups of N points =@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. >Remove all points that remain $ed by the given grouping algorithm. ?@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! AAInterpolate 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! BBFilters out any points that go backward in time (thus must not be  valid if this is a trail) CAReturns the closest distance between two trails (or Nothing if a / trail is empty). Inefficient implementation:  O( (n * m) * log (n * m) ) D!Find the total distance traveled FBUses 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. G3Smooth points with rest areas using a bezierCurve. <Parameters: rest for 1 minute within 30 meters get smoothed ( in a bezier curve over every 8 points. H+Smooth every 7 points using a bezier curve , !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHN+ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH" !!"#$+*)('&%,-./0123456789:;<=>?@ABCDEFGHN Safe-InferedI  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHJ  $+*)('&% !!#"./10DE,-CF?AB>234<59:;6=78GH@O       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSQRTQRUNOVWXgps-1.1Geo.ComputationsGeo.Computations.BasicGeo.Computations.Trailgpx-conduit-0.1Geo.GPX.Conduit readGPXFileptpntTimepntElepntLonpntLatPointTrailArcCircleVectorSpeedHeadingDistancedistanceheading getVector addVectorspeed radiusOfEarthcircumferenceOfEarthnorthsoutheastwest interpolatecircleIntersectionPointsintersectionArcsOfmaximumDistanceOfArcSelected 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 smoothTrailbaseGHC.Listfilterstatistics-0.10.1.0Statistics.Sample geometricMean harmonicMeanmeanreverse$fFunctorSelected