A dog expert has invented a device which can tell an animal’s exact mood by measuring the wag of its tail.

Dr Roger Mugford says a dog’s wag can indicate if it is happy, or angry and about to attack.

The device – dubbed the wagometer – goes on the dog’s back with sensors attached to its tail.

Details such as the speed, direction and arc of the wag can then be analysed to judge how the dog is feeling.

Dr Mugford, who runs the Animal Behaviour Centre in Chertsey, Surrey, said: “A happy dog tends to have a wide and horizontal wag. A very high tail that only wags at the tip indicates the dog is ready to attack.