An accelerometer gives an output proportional to acceleration. By performing the mathematical operation of integration on the output you can determine velocity. By integrating a second time you can determine distance moved.

You can use use an op-amp circuit to do a double integration of the accelerometers output, but due to imperfections in all op-amps, the integrating capacitors will charge up or down due to leakage currents.

This gives a drift in position, which is quite significant, even if you use the highest quality components.

However if you have some type of vehicle that gets launched, (e.g. a rocket, or a drag car) at a known time, and keep the integrating capacitors shorted out until the moment of launch, you can obtain good results over a period of a few seconds.