Comets do not stay on course (if you mean a straight line). The course bends depending on the distance from heavy bodies, like stars. So calculating the new location when needed will be a complex set of interactions between stars, planets, and possible collisions in between due to stations.
I...