Skip to content

Commit 5fa2c71

Browse files
committed
WIP
1 parent 3b46afb commit 5fa2c71

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/inertialsense/logInspector/logPlotter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2898,6 +2898,10 @@ def loadIMU(self, device, accelSensor, did=DID_IMU, useImus=False): # 0 = gyro
28982898
imu1 = np.array(imu1)
28992899
imuCount = 1
29002900

2901+
# remove linear drift
2902+
# for i in range(imu1.shape[1]):
2903+
# imu1[:,i] = detrend(imu1[:,i], type='linear')
2904+
29012905
else:
29022906
time = self.getData(device, DID_IMUS_RAW, 'time')
29032907
name = "IMUS"
@@ -3033,7 +3037,7 @@ def imuPQR(self, did=DID_IMU, fig=None, axs=None, useImus=False, combineImus=Fal
30333037
label = str(self.log.serials[d])
30343038
if combineImus:
30353039
n = 0
3036-
self.configureSubplot(ax[i, n], alable + axislable + ' (deg/s), mean: %.4g, std: %.3g' % (mean*180.0/np.pi, std*180.0/np.pi), 'deg/s')
3040+
self.configureSubplot(ax[i, n], alable + axislable + ' (deg/s), mean: %.4g, std: %.3g' % (mean*180.0/np.pi, std*180.0/np.pi), 'deg/s')
30373041
ax[i, n].plot(time, snr[:, i] * 180.0/np.pi, label=label)
30383042
if plotResidual and (len(refTime) != 0) and self.log.serials[d] != 'Ref INS':
30393043
self.configureSubplot(ax[i,1], 'Residual', 'deg/2')
@@ -3207,12 +3211,8 @@ def allanVariancePQR(self, did=DID_IMU, fig=None, axs=None):
32073211
# Averaging window tau values from dt to dt*Nsamples/10
32083212
t = np.logspace(np.log10(dtMean), np.log10(0.1*np.sum(dt)), 200)
32093213

3210-
# remove linear drift
3211-
w_detrended = detrend(pqr[:,i], type='linear')
3212-
32133214
# Compute the overlapping ADEV
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)
3215+
(t2, ad, ade, adn) = allantools.oadev(pqr[:,i], rate=1/(dtMean/self.d), data_type="freq", taus=t)
32163216
# Compute random walk and bias instability
32173217
t_bi_max = 1000
32183218
idx_max = (np.abs(t2 - t_bi_max)).argmin()

0 commit comments

Comments
 (0)