Inertial System (INS) and Inertial Measurement Units (IMU) are relatively new devices (from '50s) for getting physical information about acceleration and orientation of an inertial object.
This approach leads to dead-reckoning situation, where no external device will adjust or correct the measured data. Dynamic Bayesian network and other algorithm are used to fuse data from accelerometer and gyroscope to make a smoothing and prediction of the changes, that in this case, would lead to an extreme error after a certain amount of space/time. (recursive error)
Several models exist, ranging from huge nautical to tiny wearable devices, the size of a small mobile.
Vmsens (CH) and Xsens (NL) provide pocket size solutio along with a complete SDK. Price ranges from 1000$ to 5000$ and up