In a corner of the campus at Riga Technical University, a team of scientists is working on technology that could one day stop asteroids from smashing into Earth.

The high-precision timers being built by hand in the lab of Latvian start-up Eventech are currently being used to track satellites.

This year, the company won a European Space Agency (ESA) contract to develop timers that will study the possibility of re-directing an asteroid before it comes too close to our planet for comfort.

NASA plans to launch the first part of the Asteroid Impact and Deflection Assessment (AIDA) mission -- known as the Double Asteroid Redirection Test (DART) -- on July 22, 2021 on a Falcon 9 rocket belonging to tech tycoon Elon Musk's Space X.

The 500-kilogram (1,100-pound) camera-equipped probe will fly to an asteroid named Didymos and smash into it, trying to blow it off its current course that will see it pass near Earth sometime in 2123.

Eventech's deep space event timers are being developed for the follow-up HERA mission, which is planned to launch five years later, to determine if the first mission succeeded.

Imants Pulkstenis (L) and Pavels Razmajevs are part of the team that won the EDA contract
Imants Pulkstenis (L) and Pavels Razmajevs are part of the team that won the EDA contract AFP / Gints Ivuskans

"Our new technology that will follow on the second ESA spacecraft named HERA will measure if the first impact steered the kilometre-sized Didymos off its previous course, avoiding harm to humanity," Eventech engineer Imants Pulkstenis told AFP at the lab.

"It's much more interesting to boldly go where no man has gone before than to manufacture some mundane consumer electronics for huge profit," he added, borrowing the famous slogan from Star Trek, the cult 1960s sci-fi television series.

Eventech's timers are part of a space technology tradition in the Baltic state stretching back to Soviet times when Sputnik -- the first man-made satellite to orbit the Earth -- was launched in 1957.

They measure the time needed for an impulse of light to travel to an object in orbit and back.

Eventech devices can record the measurement to within a picosecond -- or one trillionth of a second -- which allows astronomers to convert a time measure into a distance measurement with up to two millimetres of precision.

Eventech's timers are part of a space technology tradition stretching back to Soviet times
Eventech's timers are part of a space technology tradition stretching back to Soviet times AFP / Gints Ivuskans

Around 10 of the timers are produced every year and they are used in observatories around the world.

They track Earth's increasingly crowded atmosphere, filled with a new crop of private satellites alongside traditional scientific and military ones.

"Tracking them all requires tools," Eventech chief operations officer Pavels Razmajevs said.

Although Latvia only became a full member of the ESA in 2016, its engineers have been tracking satellites since the Soviet-era.

The University of Latvia even has its own satellite laser ranging station in a forest south of Riga.

Eventech's engineers said they use analogue parts as much as possible, mainly because microchips take nanoseconds to compute the signal, which is too long for incoming measurements ranging in picoseconds.

Even the physical length of the motherboard can affect how fast the signal travels from one circuit to another.

While these timers are used for calculations on Earth, a different appliance for deep space missions is being developed in another corner of the same lab to track planetary objects from a moving space probe.

"There is no GPS data coverage available on other planets so you have to take your own precision ranging with you," Pulkstenis said.

Developing devices for deep space will be a complex task -- but one Eventech's engineers are relishing.

"Our updated technology has to withstand extreme temperatures in space and extreme cosmic radiation," said Pulkstenis. "It's a fun challenge".