Tuesday, August 2, 2011

Using sound to triangulate location


When most people think of Sonar they think of submarine pings are bats finding mozzies. The problem is that the power needed to tune in on echoes is pretty advanced stuff and beyond the capabilities of most smart devices...
But sound presents some wonderful location possibilities compared to radio waves.

One problem with radio waves is that they travel at the speed of light and this means that if you use the signals themselves for measuring distance, you have to have a timing system that is accurate to parts of a nanosecond to measure small distances..

Here is my proof: 

speed = distance/ time
speed of light ie 186,000 m/per hr=  186,000miles/ 1hr

To measure 10 metres at the speed of light is a flash of time.

According to my research most smart phones can accurately measure time down to as little as 14 nanoseconds i.e. 14 billionths of a second.

So at 299,792,458 m/s (speed of light) the accuracy in meters of a smart device able to measure time at 14 nanoseconds or more is

14* 0.0000000001 of a second times 299,792,458 meters which equals 4.19 meters!!!

This is a big ask and fraught with accuracy problems but this is the theoretical accuracy and is not far off what most of us experience with our own GPS location experiences when everything is working properly...


Now let’s try Sound instead of light in the same equation

However consider what happens when you use Sound instead of Light... the accuracy.

Speed of sound is 340.29 meters per second
The accuracy of a smart phone is 14 billionths of a second i.e. 14 nanoseconds

Therefore the accuracy of a sound based location system should be

14* 0.0000000001*340.29

= 4.76406 × 10^-6 !

So lets say it should be accurate to the millimetre!

That’s pretty accurate.

The problem is that sound has limited range... but that’s ok since stuff you want to measure really accurately is usually only in close proximity.

Sizes of rooms, location of stuff in rooms, at meeting halls, in offices, in garages and workshops...
Now the job is how to make all this practical.