extract function for gpxtpx extensions
This commit is contained in:
parent
63f54a9355
commit
10c7d68f31
21
lib/Track.hs
21
lib/Track.hs
@ -74,21 +74,12 @@ elToPoint c =
|
||||
>>= child
|
||||
>>= element (tpxNS "TrackPointExtension")
|
||||
>>= child
|
||||
cadence =
|
||||
gpxtpx
|
||||
>>= element (tpxNS "cad")
|
||||
>>= child
|
||||
>>= content
|
||||
hr =
|
||||
gpxtpx
|
||||
>>= element (tpxNS "hr")
|
||||
>>= child
|
||||
>>= content
|
||||
power =
|
||||
gpxtpx
|
||||
>>= element (Name "PowerInWatts" (Just "http://www.garmin.com/xmlschemas/PowerExtension/v1") Nothing)
|
||||
>>= child
|
||||
>>= content
|
||||
extn n =
|
||||
gpxtpx >>= element n >>= child >>= content
|
||||
|
||||
cadence = extn (tpxNS "cad")
|
||||
hr = extn (tpxNS "hr")
|
||||
power = extn "{http://www.garmin.com/xmlschemas/PowerExtension/v1}PowerInWatts"
|
||||
parsedTime =
|
||||
listToMaybe ts
|
||||
>>= (Data.Time.ISO8601.parseISO8601 . Data.Text.unpack)
|
||||
|
Loading…
Reference in New Issue
Block a user