72 lines
3.2 KiB
Elm
72 lines
3.2 KiB
Elm
module Fixtures exposing (threepoints, threepoints_expected)
|
|
import Track exposing (Track, Point)
|
|
import Time
|
|
import Maybe
|
|
|
|
|
|
threepoints = """
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<gpx
|
|
version="1.1"
|
|
creator="OpenTracks"
|
|
xmlns="http://www.topografix.com/GPX/1/1"
|
|
xmlns:topografix="http://www.topografix.com/GPX/Private/TopoGrafix/0/1"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns:opentracks="http://opentracksapp.com/xmlschemas/v1"
|
|
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"
|
|
xmlns:gpxtrkx="http://www.garmin.com/xmlschemas/TrackStatsExtension/v1"
|
|
xmlns:cluetrust="http://www.cluetrust.com/Schemas/"
|
|
xmlns:pwr="http://www.garmin.com/xmlschemas/PowerExtension/v1"
|
|
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.topografix.com/GPX/Private/TopoGrafix/0/1 http://www.topografix.com/GPX/Private/TopoGrafix/0/1/topografix.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v2 https://www8.garmin.com/xmlschemas/TrackPointExtensionv2.xsd http://www.garmin.com/xmlschemas/PowerExtension/v1 https://www8.garmin.com/xmlschemas/PowerExtensionv1.xsd http://www.garmin.com/xmlschemas/TrackStatsExtension/v1 http://www.cluetrust.com/Schemas http://www.cluetrust.com/Schemas/gpxdata10.xsd http://opentracksapp.com/xmlschemas/v1 http://opentracksapp.com/xmlschemas/OpenTracks_v1.xsd">
|
|
<trk>
|
|
<name><![CDATA[2024-10-23T08:34+01]]></name>
|
|
<desc><![CDATA[]]></desc>
|
|
<type><![CDATA[unknown]]></type>
|
|
<extensions>
|
|
</extensions>
|
|
<trkseg>
|
|
<trkpt lat="51.600643" lon="-0.01856">
|
|
<ele>64.8</ele>
|
|
<time>2024-10-23T08:40:52.256+01:00</time>
|
|
<extensions><gpxtpx:TrackPointExtension>
|
|
<gpxtpx:speed>8.49</gpxtpx:speed>
|
|
<gpxtpx:cad>110</gpxtpx:cad>
|
|
<pwr:PowerInWatts>89</pwr:PowerInWatts>
|
|
<opentracks:accuracy_horizontal>3.216</opentracks:accuracy_horizontal><opentracks:distance>17.08</opentracks:distance>
|
|
<cluetrust:distance>1,468.88</cluetrust:distance>
|
|
</gpxtpx:TrackPointExtension></extensions>
|
|
</trkpt>
|
|
<trkpt lat="51.600679" lon="-0.018179">
|
|
<ele>65.5</ele>
|
|
<time>2024-10-23T08:40:55.259+01:00</time>
|
|
<extensions><gpxtpx:TrackPointExtension>
|
|
<gpxtpx:speed>8.57</gpxtpx:speed>
|
|
<gpxtpx:cad>111</gpxtpx:cad>
|
|
<pwr:PowerInWatts>86</pwr:PowerInWatts>
|
|
<opentracks:accuracy_horizontal>3.216</opentracks:accuracy_horizontal><opentracks:distance>17.08</opentracks:distance>
|
|
<cluetrust:distance>1,485.96</cluetrust:distance>
|
|
</gpxtpx:TrackPointExtension></extensions>
|
|
</trkpt>
|
|
<!-- insert-segment -->
|
|
<trkpt lat="51.600697" lon="-0.018064">
|
|
<ele>66.2</ele>
|
|
<time>2024-10-23T08:40:56.231+01:00</time>
|
|
<extensions><gpxtpx:TrackPointExtension>
|
|
<gpxtpx:speed>8.62</gpxtpx:speed>
|
|
<gpxtpx:cad>111</gpxtpx:cad>
|
|
<pwr:PowerInWatts>86</pwr:PowerInWatts>
|
|
<opentracks:accuracy_horizontal>3.216</opentracks:accuracy_horizontal><opentracks:distance>10.675</opentracks:distance>
|
|
<cluetrust:distance>1,496.635</cluetrust:distance>
|
|
</gpxtpx:TrackPointExtension></extensions>
|
|
</trkpt>
|
|
</trkseg>
|
|
</trk>
|
|
</gpx>
|
|
"""
|
|
|
|
threepoints_expected =
|
|
[ (Point 51.600643 -0.01856 (Just 64.8) (Just (Time.millisToPosix 1729669252256)))
|
|
, (Point 51.600679 -0.018179 (Just 65.5) (Just (Time.millisToPosix 1729669255259)))
|
|
, (Point 51.600697 -0.018064 (Just 66.2) (Just (Time.millisToPosix 1729669256231)))
|
|
]
|