Skip to content

Commit

Permalink
Check each tracklog for being sorted, Scott's is not, #249.
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Mar 16, 2019
1 parent 42d8a3c commit 7836f09
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions igc/library/Flight/Igc/Fix.hs
Expand Up @@ -98,7 +98,18 @@ stamp (Year yy, Month mm, Day dd) (HMS (Hour hr) (MinuteOfTime minute) (Second s
`addUTCTime`
(UTCTime (fromGregorian y mm dd) 0)

-- TODO: Why is Scott's tracklog not sorted when marked for time or ticks?

-- |
-- >>> let xs = markTimes markSasha fixesSasha in xs == sort xs
-- True
--
-- >>> let xs = markTimes markBrad fixesBrad in xs == sort xs
-- True
--
-- >>> let xs = markTimes markScott fixesScott in xs == sort xs
-- False
--
-- >>> let xs = markTimes markGordon fixesGordon in xs == sort xs
-- True
--
Expand All @@ -117,6 +128,15 @@ markTimes :: IgcRecord -> [IgcRecord] -> [UTCTime]
markTimes = mark unStampTime

-- |
-- >>> let xs = markTicks markSasha fixesSasha in xs == sort xs
-- True
--
-- >>> let xs = markTicks markBrad fixesBrad in xs == sort xs
-- True
--
-- >>> let xs = markTicks markScott fixesScott in xs == sort xs
-- False
--
-- >>> let xs = markTicks markGordon fixesGordon in xs == sort xs
-- True
--
Expand Down

0 comments on commit 7836f09

Please sign in to comment.