“The trouble is that the farther the asteroid is, the harder it becomes to calculate its course.”
Only in movies. We have super computers for this sort of thing. It is not that hard.
That’s not from the movies. In “Lucifer’s hammer” the odds that the comet would hit earth kept going up the closer it got to Earth because it became easier to calculate. The asteroid Apophis may hit the earth in 2029, but we don’t know for sure. We only know that the odds are very small. The problem is gravitational perturbations due to all the debris in the solar system. It’s too much data to process, and although the unknowns are small by comparison to the knowns, even a tiny miscalculation means a lot when compounded over time.