If the idea of an asteroid slamming into Earth keeps you up at night, spare a thought for a mission called NEOWISE, which reincarnated a former astrophysics spacecraft to hunt for near-Earth space rocks.

The spacecraft has just posted its fifth full year of data on asteroids and comets orbiting the sun near Earth. But scientists already know the mission won't last forever. They are turning their thoughts to what should come next as they work to make sure humans aren't caught unawares by solar system rubble that could wreak havoc on Earth.

"NEOWISE recently surpassed 95 billion recorded measurements of asteroids, comets, stars and galaxies — a remarkable accomplishment for a recycled spacecraft," Lindley Johnson, NASA's planetary defense officer and head of the Planetary Defense Coordination Office at NASA, said in a statement .

"This asteroid hunter has measured the sizes of more than 1,000 near-Earth asteroids and is still producing great data, making it a unique asset in our portfolio of asteroid-hunting telescopes and an important prototype for an upcoming space-based NEO survey mission," he added.

Related: Humanity Will Slam a Spacecraft into an Asteroid in a Few Years to Help Save Us All

Tens of thousands of space rocks pass in and out of Earth's neighborhood. But if scientists can watch them for a while, the researchers can calculate the orbital paths of these objects and determine whether they pose a risk to life on Earth.

There's just one problem: These objects are hard to see in visible light. "NEOs are intrinsically faint because they are mostly really small and far away from us in space," Amy Mainzer, principal investigator of the NEOWISE mission and an astronomer at NASA's Jet Propulsion Laboratory in California, said in a separate statement . "Add to this the fact that some of them are as dark as printer toner, and trying to spot them against the black of space is very hard."

So, NEOWISE works by studying infrared light, in which asteroids and comets appear bright. The mission has identified more than 300 previously unknown objects and has gathered a host of observations about space rocks originally spotted by other instruments.

All of that information provides the details that scientists need to feed their calculations. That way, if they spot an asteroid that will pass a little too close for comfort, humans will have time to decide to do something that would steer the space rock off course.

But it's not just about planetary defense; there's plenty of science to be done with this data as well. " These objects are intrinsically interesting because some are thought to be as old as the original material that made up the solar system," Mainzer said. "One of the things that we have been finding is that NEOs are pretty diverse in composition."

Because of the multifaceted utility of the NEOWISE data, Mainzer and her colleagues are already designing a mission that could succeed it. That mission, the Near-Earth Object Camera ( NEOCam ), would use a purpose-built telescope this time but follow the same principles as NEOWISE.