How,they're guided by sophisticated electronics.
Although I'm no expert on such matters (me: M-14-1969-qualified two points lower than "expert") this had gotta be chalked up to luck more than anything else.
He did the math and the parameters didn't change in the time he finished the math and the time of flight. Strong skills, only luck was the parameters held.