Skip to content

Commit 3b46afb

Browse files
committed
Attempt to remove temperature slope from IMU data for allan variance
1 parent 4cdf694 commit 3b46afb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

python/inertialsense/logInspector/logPlotter.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from os.path import expanduser
77
from datetime import date, datetime
88
import pandas as pd
9+
from scipy.signal import detrend
910

1011
file_path = os.path.dirname(os.path.realpath(__file__))
1112
sys.path.append(os.path.normpath(file_path + '/..'))
@@ -3205,8 +3206,13 @@ def allanVariancePQR(self, did=DID_IMU, fig=None, axs=None):
32053206
if np.all(pqr) != None and n<len(sensors):
32063207
# Averaging window tau values from dt to dt*Nsamples/10
32073208
t = np.logspace(np.log10(dtMean), np.log10(0.1*np.sum(dt)), 200)
3209+
3210+
# remove linear drift
3211+
w_detrended = detrend(pqr[:,i], type='linear')
3212+
32083213
# Compute the overlapping ADEV
3209-
(t2, ad, ade, adn) = allantools.oadev(pqr[:,i], rate=1/(dtMean/self.d), data_type="freq", taus=t)
3214+
# (t2, ad, ade, adn) = allantools.oadev(pqr[:,i], rate=1/(dtMean/self.d), data_type="freq", taus=t)
3215+
(t2, ad, ade, adn) = allantools.oadev(w_detrended, rate=1/(dtMean/self.d), data_type="freq", taus=t)
32103216
# Compute random walk and bias instability
32113217
t_bi_max = 1000
32123218
idx_max = (np.abs(t2 - t_bi_max)).argmin()

0 commit comments

Comments
 (0)