How do you calculate sample difference in terms of sensor signals?
Differencing is a common preprocessing step for time series. Here's an example in python:

from pandas import DataFrame
data=[[1495573445.162, 0, 0.021973, 0.012283, -0.995468, 1],
 [1495573445.172, 0, 0.021072, 0.013779, -0.994308, 1],
 [1495573445.182, 0, 0.020157, 0.015717, -0.995575, 1],
 [1495573445.192, 0, 0.017883, 0.012756, -0.993927, 1]]
df = DataFrame(data, columns=['timestamp', 'foo', 'x', 'y', 'z', 'bar']).set_index('timestamp')
df.assign(dx=df.x.diff(), dy=df.y.diff(), dz=df.z.diff())


The result:


               foo         x           y            z   bar        dx         dy          dz
timestamp                               
1.495573e+09    0   0.021973    0.012283    -0.995468   1         NaN        NaN         NaN
1.495573e+09    0   0.021072    0.013779    -0.994308   1   -0.000901   0.001496    0.001160
1.495573e+09    0   0.020157    0.015717    -0.995575   1   -0.000915   0.001938   -0.001267
1.495573e+09    0   0.017883    0.012756    -0.993927   1   -0.002274  -0.002961    0.001648