James,
Since I have checked that all waiting times are calculated and stored correctly, I think most cases of unknown waiting time are just cases where the average happens to be smaller than 10. How about this :
(1) if there are entries in the waiting times list, any average less than 10 will be reset to 10 and be shown as 1min (no additional processing) in the halt details window
(2) if there are no entries in the waiting times list, or if no such waiting times list exists, set the average waiting time to 9, and display "unknown waiting time" in halt details window by checking explicitly for occurences of 9
In this way, it will be less misleading to players (because waiting times are in fact known in some cases where "unknown waiting time" is shown), and it is easier for us to detect any problem (because we will know if there are entries in waiting times list).
If you agree to this, I can push a new commit for you to review the changes.