When it comes to avoiding asteroid-inflicted apocalypse, we'll take all the help we can get, and NASA's next-generation asteroid impact monitoring system, which has just been activated, has us sleeping a little bit easier in our beds.

Called Sentry-II, the new system can take data collected from telescopes and work out the path of an asteroid across the next century. The updated system is particularly good at predicting special and unusual cases not covered by the original Sentry system it succeeds.

In other words, if an asteroid strike is likely, we could get a considerable amount of warning about it ahead of time – or at least, that's the theory. While there's always some uncertainty involved in the predictions, our advanced alert setup is now more sophisticated than ever.

"The first version of Sentry was a very capable system that was in operation for almost 20 years," says automation engineer Javier Roa Vicens, now with SpaceX's Starlink, who led the development of Sentry-II at NASA's Jet Propulsion Laboratory (JPL).

"It was based on some very smart mathematics. In under an hour, you could reliably get the impact probability for a newly discovered asteroid over the next 100 years – an incredible feat."

Whenever a new near-Earth asteroid (NEA) is detected, astronomers get to work on figuring out its most likely orbit around the Sun, based on its position and velocity, as well as the gravitational effects of other objects in the Solar System. These orbits are cleverly calculated and can generally be relied upon, but can't include every single tiny influence.

One such example is called the Yarkovsky effect: a small force, but one that can make a big enough difference over time.

When these special cases came up – as with the asteroids Apophis and Bennu – lots of extra, time-consuming manual calculations are required to make predictions. Sentry II now includes this important detail in its calculations.

Another difference is in how the two programs determine the likelihood of a chance encounter with our planet. Crossing paths is one thing – crossing paths while we're in the way is another.

Whereas the original Sentry would look at evenly spaced points along the region of uncertainty and then analyze each one in more depth based on certain trajectory assumptions, Sentry-II uses thousands of random points along the region of uncertainty, without any assumptions about which are more likely to be hit than others.

While the astrophysics is quite complex, it essentially means Sentry-II has less of a bias about which points in the potential orbit the asteroid might pass – potentially catching edge case scenarios that Sentry might miss. The researchers liken it to looking for a needle in a haystack, and Sentry-II is able to shrink the size of the haystack.

"In terms of numbers, the special cases we'd find were a very tiny fraction of all the NEAs that we'd calculate impact probabilities for," says Roa Vicens.

"But we are going to discover many more of these special cases when NASA's planned NEO Surveyor mission and the Vera C. Rubin Observatory in Chile go online, so we need to be prepared."

Even without the new and more powerful space observation equipment mentioned by Vicens, we're already detecting around 3,000 NEAs every year, with a running total in the region of 28,000. That's a lot of asteroids to try and keep track of.

Another improvement in the new system is a better method for tracking asteroids that pass very close to Earth. Our planet's gravitational pull can cause a lot of uncertainty in terms of asteroid trajectories, but Sentry-II is better set up to factor in this gravity.

Exactly what would happen if we were on a collision course with an asteroid is another story – one that might involve deflecting the asteroid or blasting it to bits – but with Sentry-II on the look-out, we should know if an NEA might strike Earth, even if the odds are as low as a few chances in 10 million.

"Sentry-II is a fantastic advancement in finding tiny impact probabilities for a huge range of scenarios," says senior research scientist and astrodynamicist Steve Chesley from JPL.

"When the consequences of a future asteroid impact are so big, it pays to find even the smallest impact risk hiding in the data."

A study outlining the capabilities of Sentry-II has been published in the Astronomical Journal. You can also see the data collected by Sentry and Sentry-II here.