A new atomic clock that will help spacecraft navigate autonomously through the final frontier will get its first off-Earth trial soon.

NASA's Deep Space Atomic Clock is scheduled to launch to Earth orbit on June 22 aboard a SpaceX Falcon Heavy rocket. The clock, which is about the size of a toaster oven, will operate for a year out there, proving out technology designed to enable more-efficient deep-space travel, NASA officials said.

Atomic clocks keep time by measuring the natural vibrations of atoms. Such oscillation is the backbone of modern timekeeping; after all, 1 second is officially defined as the time it takes a cesium-133 atom in a particular state to vibrate 9,192,631,770 times.

RELATED: How Atomic Clocks Work

Many spacecraft come equipped with atomic clocks. For example, the instruments travel aboard the satellites that allow us to pinpoint our locations via GPS.

The Deep Space Atomic Clock will fly on the Orbital Test Bed satellite, pictured here before it is shipped to Kennedy Space Center in Florida. General Atomics

But there's no GPS for probes plying deep space. Controllers must beam navigation commands to the distant spacecraft, a process that gets more and more time-consuming the farther a probe gets from Earth.

And that's where the Deep Space Atomic Clock comes in.

"If we want humans to explore the solar system, we need a better, faster way for the astronauts aboard a spacecraft to know where they are, ideally without needing to send signals back to Earth," NASA officials wrote in a Deep Space Atomic Clock FAQ. "A Deep Space Atomic Clock on a spacecraft would allow it to receive a signal from Earth and determine its location immediately using an onboard navigation system."

In ground tests, the clock showed impressive precision, "losing" time at a rate of just 1 second per 9 million years. That's about 50 times better than the atomic clocks aboard GPS satellites, NASA officials said.

"If the mission can prove this stability in space, it will be one of the most precise clocks in the universe," NASA added in the FAQ.

The upcoming launch will be the third ever for the Falcon Heavy. The huge, reusable rocket flew a demonstration mission in February 2018 and lofted the Arabsat-6A communications satellite in April of this year.

The Deep Space Atomic Clock is one of two dozen spacecraft launching on the June 22 flight, which is known as STP-2 because it's being conducted for the U.S. Air Force's Space Test Program. Other notable payloads include The Planetary Society's LightSail 2 solar-sailing demonstrator and NASA's Green Propellant Infusion Mission, which will test a next-generation fuel designed to be less toxic and more efficient than its predecessors.

Mike Wall's book about the search for alien life, "Out There" (Grand Central Publishing, 2018; illustrated by Karl Tate), is out now. Follow him on Twitter @michaeldwall. Follow us on Twitter @Spacedotcom or Facebook.

SIGN UP FOR THE MACH NEWSLETTER AND FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.