aboutsummaryrefslogtreecommitdiff
path: root/lib/Server/GTFS_RT.hs
diff options
context:
space:
mode:
authorstuebinm2022-09-14 21:49:45 +0200
committerstuebinm2022-09-14 21:49:45 +0200
commit34f22db88c12f4f4298e5cd5c53f009c44ec568f (patch)
tree6e8937b64b0525a3773127853aa4432660de6617 /lib/Server/GTFS_RT.hs
parent46a24c8a90d4e6e794a2c6ed79da94e02e2c7eab (diff)
remove some extrapolation bugs
Diffstat (limited to 'lib/Server/GTFS_RT.hs')
-rw-r--r--lib/Server/GTFS_RT.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Server/GTFS_RT.hs b/lib/Server/GTFS_RT.hs
index e0bbeda..1641131 100644
--- a/lib/Server/GTFS_RT.hs
+++ b/lib/Server/GTFS_RT.hs
@@ -77,7 +77,7 @@ import Data.UUID (toASCIIBytes,
toLazyASCIIBytes)
import qualified Data.Vector as V
import Extrapolation (Extrapolator (extrapolateAtPosition, extrapolateAtSeconds),
- LinearExtrapolator)
+ LinearExtrapolator (..))
import GTFS (Depth (..))
import GTFS.Realtime.TripUpdate (TripUpdate (TripUpdate))
import Server.Util (Service,
@@ -149,9 +149,9 @@ gtfsRealtimeServer gtfs@GTFS{..} dbpool = handleServiceAlerts :<|> handleTripUpd
dFeedMessage $ Seq.fromList $ mkTripUpdate nowSeconds <$> anchors
where mkTripUpdate nowSeconds (Entity (RunningKey (Token uuid)) Running{..}, Trip{..} :: Trip Deep Deep, anchors) =
- let lastCall = extrapolateAtSeconds @LinearExtrapolator anchors nowSeconds
+ let lastCall = extrapolateAtSeconds LinearExtrapolator anchors nowSeconds
stations = tripStops
- <&> (\stop@Stop{..} -> fmap (, stop) $ extrapolateAtPosition @LinearExtrapolator anchors (int2Double stopSequence))
+ <&> (\stop@Stop{..} -> fmap (, stop) $ extrapolateAtPosition LinearExtrapolator anchors (int2Double stopSequence))
in (dFeedEntity (Utf8 $ toLazyASCIIBytes uuid))
{ FE.trip_update = Just $ TripUpdate
{ TU.trip = dTripDescriptor runningTrip (Just runningDay)