Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Earthlings, always trust a Scout to have your back.

NASA's new asteroid detector, a computer program aptly named Scout, is the celestial equivalent of the person who yells "heads up" as a baseball comes barreling toward the stands.

Scout is a computer program designed to detect Near Earth Objects that could be on track for impact with Earth in a matter of days or weeks.

Scout works by scanning data from NASA's network of telescopes and assessing the likelihood of a Near Earth Object's slamming into Earth. It's then able to have other telescopes around the world confirm its findings.

"We can get a heads-up immediately, within an hour of the data being reported," Paul Chodas, manager of NASA's Center for Near-Earth Object (NEO) Studies at the Jet Propulsion Laboratory in Pasadena, California, told NBC News. Cholas has been part of the team working on refining Scout over the past year.

A Near Earth Object is a comet or asteroid with an orbit that brings it within 30 million miles of Earth's orbit. NASA and its partners have a catalogue of around 15,000 Near Earth Objects that don't appear to pose threats to Earth any time soon.

Related: Elon Musk Makes His Case for Colonizing Mars

Scout has already proven to be useful spotting the smaller objects as they near Earth. Chodas compared them to "a dot moving in the sky."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A Scout report issued Tuesday shows that a tiny rock will whiz by Earth on Wednesday at a distance of 58,500 miles. When it looked like an asteroid would make a close pass with Earth last weekend, Scout was able to determine that it would pass 310,000 miles away, giving Earth a roomy buffer zone.

Finding Threats Early

Scout also has a big brother, Sentry, which is designed to keep track of objects over the course of the century.

Kelly Fast, program manager for Near Earth Objects Observations at NASA, told NBC News that tools like Sentry and Scout are part of the first line of defense, allowing the space agency and its partners to "find them and keep track of them."

"The goal would be to have decades of lead time if there is something that could be a problem in the future," she said.

Related: Month in Space Pictures: Jupiter's Sunny Side and More

Anything larger than 30 to 50 meters could survive entering Earth's atmosphere and have the potential to inflict damage around its impact site, according to NASA.

Rob Landis, program executive for the Planetary Defense Coordination Office, told NBC News there's a mantra that sums up the work they do detecting Near Earth Objects: "Find them early."

"There is probably no greater gift that the space agencies of the world can provide humanity than to know the time and place of an impact event and to plan a response to it," he said.

Managing the Risk of an Impact

Whether it's decades or days, NASA has conducted a few simulations with the Federal Emergency Management Agency, Landis said, allowing them to outline how they would respond to a potential close call.

Asteroid 2015 TB145 safely flew by the Earth on Oct. 31, 2015. Jet Propulsion Laboratory

NASA has never needed to mitigate a threat from a Near Earth Object. However, the agency has a number of concepts in the works so it's ready if the need ever arises.

One of those is set to be demonstrated as part of the Asteroid Redirect Mission, which is slated for 2021. While the scope of the project is intended to test tech to be used on a future Mars mission, it will also demonstrate a key planetary defense method call the "gravity tractor."

After capturing a boulder from the surface of an asteroid, NASA hopes to use the spacecraft's gravitational force to slowly alter the rock's trajectory.

Another possibility is the kinetic impactor method, which would work by sending one or more large, high-speed spacecraft into the path of a Near Earth Object, with the goal of changing its path.

Still, NASA says decades or more may be needed to successfully deflect a potential thread from a large asteroid using the kinetic impactor method.

"It's like having a reasonable insurance policy," Landis said. "God forbid you ever have to use it, but you can plan ahead as best as one can."