Calculate time to contact and k

It is not guaranteed that the shortest time to contact is calculated.
Another source could reach the first target earlier!
This has to be fixed.