aboutsummaryrefslogtreecommitdiff
path: root/lib/Server
diff options
context:
space:
mode:
authorstuebinm2022-09-14 21:49:45 +0200
committerstuebinm2022-09-14 21:49:45 +0200
commit34f22db88c12f4f4298e5cd5c53f009c44ec568f (patch)
tree6e8937b64b0525a3773127853aa4432660de6617 /lib/Server
parent46a24c8a90d4e6e794a2c6ed79da94e02e2c7eab (diff)
remove some extrapolation bugs
Diffstat (limited to 'lib/Server')
-rw-r--r--lib/Server/ControlRoom.hs6
-rw-r--r--lib/Server/GTFS_RT.hs6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Server/ControlRoom.hs b/lib/Server/ControlRoom.hs
index e5e9b7c..b1948f2 100644
--- a/lib/Server/ControlRoom.hs
+++ b/lib/Server/ControlRoom.hs
@@ -53,7 +53,7 @@ import Yesod
import Yesod.Form
import Extrapolation (Extrapolator (..),
- LinearExtrapolator)
+ LinearExtrapolator (..))
import GTFS
import Numeric (showFFloat)
import Persist
@@ -234,8 +234,8 @@ getTrainViewR trip day = do
$else
<td title="_{MsgBlockToken}"><a href="@{TokenBlock key}">_{MsgBlockToken}</a>
|]
- where guessDelay history = fmap trainAnchorDelay . extrapolateAtPosition @LinearExtrapolator history
- guessAtSeconds = extrapolateAtSeconds @LinearExtrapolator
+ where guessDelay history = fmap trainAnchorDelay . extrapolateAtPosition LinearExtrapolator history
+ guessAtSeconds = extrapolateAtSeconds LinearExtrapolator
getTripsViewR :: Handler Html
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)