What is the logic to show "Due" or "1 min" for arrivals

The arrival json is as follows:

I notice that the ‘timeToStation’ is the seconds due to arrival, what is the logic to show ‘Due’ please?

I am currently showing ‘Due’ when ‘timeToStation’ is less than 30,
and if ‘timeToStation’ is between 30 - 59, I am showing ‘1 min’, are they correct?

“$type”: “Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities”,
“id”: “-2098701796”,
“operationType”: 1,
“vehicleId”: “001”,
“naptanId”: “940GZZLULVT”,
“stationName”: “Liverpool Street Underground Station”,
“lineId”: “central”,
“lineName”: “Central”,
“platformName”: “Westbound - Platform 5”,
“direction”: “inbound”,
“bearing”: “”,
“destinationNaptanId”: “940GZZLUEBY”,
“destinationName”: “Ealing Broadway Underground Station”,
“timestamp”: “2022-01-24T21:35:56.755403Z”,
“timeToStation”: 1331,
“currentLocation”: “At Redbridge”,
“towards”: “Ealing Broadway”,
“expectedArrival”: “2022-01-24T21:58:07Z”,
“timeToLive”: “2022-01-24T21:58:07Z”,
“modeName”: “tube”,
“timing”: {
“$type”: “Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities”,
“countdownServerAdjustment”: “00:00:00”,
“source”: “0001-01-01T00:00:00”,
“insert”: “0001-01-01T00:00:00”,
“read”: “2022-01-24T21:36:41.616Z”,
“sent”: “2022-01-24T21:35:56Z”,
“received”: “0001-01-01T00:00:00”


This is because trains need time to stop at a stop/station and this is timetabled.

It usually referred to “dwell time”.

Dwell times are often made worse by passengers taking more time than timetabled to alight or get on. This can often be the major cause of system-wide timing problems.

1 Like

Isn;t the system just rounding to the nearest minute?