In the situation of a spacecraft or comet approaching a planet, the impact parameter and excess velocity will be known accurately. If the central body is known the trajectory can now be found, including how close the approaching body will be at periapsis. If this is less than planet's radius an impact should be expected.