Ever wonder why your dog spins around trying to pick the perfect spot to poop?

He may not be doing it just to bug you.

In fact, dogs may have an inner compass that dictates how they do their business, according to a team of Czech and German researchers.

"Urinating and defecating dogs tend to align their body along the North-South axis," the researchers wrote in an email to The Huffington Post.

For the study, 70 unleashed dogs were observed urinating and defacating a total of 7,000 times over a two-year period. Observers reported which way the dogs oriented their bodies, and took notes about the environment, time of day and the dogs' familiarity with the area.

Talk about dogged research.

When the researchers pored through the data, they discovered that the dogs showed a preference for peeing and pooping while facing due north or south -- but only when the Earth's magnetic field was calm, which it is about 20 percent of the time during daylight, according to the researchers.

"We found that dogs are magnetosensitive, and they are predictably disturbed by even small changes of the MF (magnetic field)," Dr. Sabine Begall, a zoologist at the University of Duisburg-Essen in Germany, told HuffPost Science in an email.



Schematic illustration of Earth's magnetic field.

Earth's magnetic field changes as a result of the sun's gravity on Earth's atmosphere, solar flares, solar wind, and sunspot activity.

"Imagine that you read a compass during a hike," Dr. Begall said in the email. "If the compass needle is shaky, you might dismiss reading the compass at all. That could be the reason why the dogs have no preference when the MF is unstable."

Dogs aren't the only animals to exhibit a sensitivity to the Earth's magnetic field lines. Previous studies have shown that cattle and deer graze in a North-South direction. Birds and fish use the magnetic field to navigate during their seasonal migrations.

So what explains this special ability in dogs?

"We don't know yet," Dr. Begall said in the email. "We can only speculate. Since it is the polarity that has an effect on the alignment direction, it could be that the dogs somehow calibrate their compass or read their 'mental map' during the walks."

The study was published online on Dec. 27 in the journal Frontiers In Zoology.