Estimated Delay: Todo! +
_{MsgEstimatedDelay}:
+ $maybe history <- anchors
+ $maybe TrainAnchor{..} <- guessAtSeconds history nowSeconds
+ \ #{trainAnchorDelay} (_{MsgOnStationSequence (showFFloat (Just 3) trainAnchorSequence "")})
+ $nothing
+ (_{MsgNone})
_{MsgStops}
$forall Stop{..} <- tripStops
-
_{MsgAnnouncements}
@@ -223,7 +232,8 @@ getTrainViewR trip day = do
$else
_{MsgBlockToken}
|]
- where guessDelay history = join . fmap trainAnchorDelay . extrapolateAtSeconds @LinearExtrapolator history
+ where guessDelay history = fmap trainAnchorDelay . extrapolateAtPosition @LinearExtrapolator history
+ guessAtSeconds = extrapolateAtSeconds @LinearExtrapolator
getTripsViewR :: Handler Html
diff --git a/messages/de.msg b/messages/de.msg
index 26f67ee..213337d 100644
--- a/messages/de.msg
+++ b/messages/de.msg
@@ -17,3 +17,5 @@ LastPing: Letzte Meldung
TrainPing lat long time: #{lat},#{long}, um #{time}
NoTrainPing: keine empfangen
raw: roh
+EstimatedDelay: Geschätzte Verspätung
+OnStationSequence idx: an Stationsindex #{idx}
diff --git a/messages/en.msg b/messages/en.msg
index cc953ac..47bb66d 100644
--- a/messages/en.msg
+++ b/messages/en.msg
@@ -22,3 +22,5 @@ LastPing: Last Ping
TrainPing lat@Double long@Double time@UTCTime: #{lat},#{long}, at #{time}
NoTrainPing: none received
raw: raw
+EstimatedDelay: Estimated Delay
+OnStationSequence idx@String: on station index #{idx}
--
cgit v1.2.3