úÎd^ÂS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR Safe-Inferred¶Track point is a full-fledged representation of all the data available in most GPS loggers. It is possible you don't want all this data and can just made do with coordinates (via Pnt) or a custom derivative. In meters*A GPX segments is just a bundle of points.       Safe-InferredEFAn arc is represented as a circle, starting heading and ending heading†Genearlly a circle indicates a known area in which we are searching (so a center point and maximum possible distance from that point)(Speed is hard coded as meters per secondxAngles 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)eGiven 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 metersCircumference 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).%Compute the points at which two circles intersect (assumes a flat plain). If the circles do not intersect or are identical then the result is Nothing.&¡Find the area in which all given circles intersect. The resulting area is described in terms of the bounding arcs. All cirlces must intersect at two points. !"#STU$%&'V !"#$%&' !"#STU$%&'VNoneE"(;When grouping points, lists of points are either marked as * or ).,‹Given a selection of coordinates, transform the selected coordinates in some way (while leaving the non-selected coordinates unaffected).-?A PointGrouping is a function that selects segments of a trail.KGrouping point _does not_ result in deleted points. It is always true that:Dforall g :: PointGrouping c --> concatMap unSelect (g ts) == ts¬The purpose of grouping is usually for later processing. Any desire to drop points that didn't meet a particular grouping criteria can be filled with a composition with W (or directly via H).05Take the minimum of the speeds from the given methods16Compute the speed considering only the given endpoints2*Obtain the median of the considered points3 Obtain the X4 Obtain the Y5 Obtain the Z of the considered points6avgSpeeds n points( Average speed using a window of up to n. seconds and averaging by taking the Median (2).7slidingAverageSpeed 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 value, which is associated with both the first and second point)=nA "rest point" means the coordinates remain within a given distance for at least a particular amount of time.>Fchunking points into groups spanning at most the given time interval.?intersects the given groupings@Union all the groupingsAIntersection binary operatorBUnion binary operatorC)Inverts the selected/nonselected segmentsDfirstGrouping f ps only the first segment remains *,ed, and only if it was already selected by f.EdOnly the last segment, if any, is selected (note: the current implementation is inefficient, using [)F'chunk the trail into groups of N pointsGeFor every selected group, refine the selection using the second grouping method. This differs from IntersectionOfk by restarting the second grouping algorithm at the beginning each group selected by the first algorithm.HRemove all points that remain )#ed by the given grouping algorithm.Iÿ>Construct a bezier curve using the provided trail. Construct a 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 seconds apart), the results will be poor if this is not the case!KðInterpolate selected points onto a bezier curve. Note this gets 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!L\Filters out any points that go backward in time (thus must not be valid if this is a trail)M‹Returns the closest distance between two trails (or Nothing if a trail is empty). Inefficient implementation: O( (n * m) * log (n * m) )N Find the total distance traveledPÌUses Grahams scan to compute the convex hull of the given points. This operation requires sorting of the points, so don't try it unless you have notably more memory than the list of points will consume.\Find the southmost pointQ2Smooth points with rest areas using a bezierCurve.cParameters: rest for 1 minute within 30 meters get smoothed in a bezier curve over every 8 points.R*Smooth every 7 points using a bezier curve]*Smooth every n points using a bezier curve8^_`a()*+,-./012345b6789:;c<=>?@ABdCDEFGHeIJKLMNOPfg\QR]h+()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR+^a`_(*)++,-.543210/b6789:;c<=>?@ABdCDEFGHeIJKLMNOPfg\QR]hNone2468<ES  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRI !"#$%&'.543210/(*)++-,89;:NO67MPIKLH<=>F?CDE@GABQRJi       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^\]_\]`YZabcdefghijklmnogps-1.2 Geo.TypesGeo.ComputationsGeo.Computations.BasicGeo.Computations.TrailPointpntLatpntLonpntElepntTime LongitudeLatitudeSegmentpointsTracktrkNametrkDescriptionsegmentspt zeroPointTrailArcCircleVectorSpeedHeadingDistancedistanceheading 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 smoothTrail toDegrees getRadianPair toRadianschoose2baseGHC.Listfilterstatistics-0.13.2.1Statistics.Sample geometricMean harmonicMeanmeanreverse southMost gSmoothSomeTurnStraight RightTurnLeftTurn takeWhileEnd dropExact selListDrop mkTimePaireastZeroHeadingturn$fFunctorSelected