When you picture the Solar System in your head, most people would think of the Sun, stolid and stationary in the centre, with everything else whizzing about around it. But every body in the Solar System also exerts its own gravitational tug on the star, causing it to move around just a tiny bit.

Therefore, the precise gravitational centre (or barycentre) of the Solar System is not smack-bang in the middle of the Sun, but somewhere closer to its surface, just outside it. But it hasn't been easy for us to figure out exactly where this barycentre is, due to the myriad gravitational influences at play.

Now, using specially designed software, an international team of astronomers has narrowed down the location of our Solar System's barycentre to within 100 metres (328 feet) - and it could vastly improve our measurements of gravitational waves.

It all has to do with pulsars. These dead stars can rotate extremely fast, on millisecond timescales, shooting beams of electromagnetic radiation from their poles. If they're oriented just right, these beams flash past Earth like a very fast cosmic lighthouse, creating a pulsed signal that's extremely regular.

This regular pulse is useful for all sorts of things, from probing the interstellar medium to a potential navigation system.

In recent years, observatories including the North American Nanohertz Observatory for Gravitational Waves (NANOGrav) have started using them to look for low-frequency gravitational waves, since gravitational waves should cause very subtle disturbances in the timing of a whole array of pulsars across the sky.

"Using the pulsars we observe across the Milky Way galaxy, we are trying to be like a spider sitting in stillness in the middle of her web," explained astronomer and physicist Stephen Taylor of Vanderbilt University and the NANOGrav Collaboration.

"How well we understand the Solar System barycenter is critical as we attempt to sense even the smallest tingle to the web."

That's because errors in the calculation of Earth's position in relation to the Solar System barycentre can affect our measurements of pulsar timing, which in turn can affect our searches for low-frequency gravitational waves.

Part of the problem is Jupiter. By a very large margin, it has the strongest gravitational effect on the Sun - the tugs of the other planets are minute in comparison. We know how long Jupiter takes to orbit the Sun - about 12 Earth years - but our understanding of this orbit is incomplete.

Previously, estimations of the location of the barycentre have relied on Doppler tracking - how the light from objects changes as we (or our instruments) move towards or away from them - to calculate the orbits and masses of the planets. But any errors in these masses and orbits can introduce errors that might look a lot like gravitational waves.

And when the team used these existing datasets to analyse NANOGrav data, they kept getting inconsistent results.

"We weren't detecting anything significant in our gravitational wave searches between solar system models, but we were getting large systematic differences in our calculations," said astronomer Michele Vallisneri of NASA's Jet Propulsion Laboratory.

"Typically, more data delivers a more precise result, but there was always an offset in our calculations."

This is where the team's software enters the picture. It's called BayesEphem, and it's designed to model and correct for those uncertainties in Solar System orbits most relevant to gravitational wave searches using pulsars - Jupiter in particular.

When the team applied BayesEphem to the NANOGrav data, they were able to place a new upper limit on the gravitational wave background and detection statistics. And they were able to calculate a new, more precise location for the Solar System barycentre that, going forward, could enable much more accurate low-frequency gravitational wave detections.

"Our precise observation of pulsars scattered across the galaxy has localised ourselves in the cosmos better than we ever could before," Taylor said.

"By finding gravitational waves this way, in addition to other experiments, we gain a more holistic overview of all different kinds of black holes in the Universe."

The research has been published in The Astrophysical Journal.