Is there an electronic device that I can use that can tell me its position in 3D space? For instance if I put it in the middle of my desk it can tell it is at (0,0,0). If I move it back on the desk it knows it is at (0,0,-2). If I pick it up it knows it is at (0,4,-2). I am talking about hardware not software. What are some of the possible ways to impliment something like this?