3 import matplotlib.pyplot
as plt
4 plt.rcParams.update({
'font.size': 30})
5 ScanTimeArray=np.zeros(0)
6 ImuTimeArray=np.zeros(0)
7 ImuXArayTmp=np.zeros(0)
8 ImuYArayTmp=np.zeros(0)
9 ImuZArayTmp=np.zeros(0)
11 DISTTimeTmp=np.zeros(0)
13 LayerTimeTmp=np.zeros(0)
14 LayerFirstTime=np.zeros(0)
15 with open(
'/home/rosuser/mrs6xxx_moved.csv',
'r')
as csvfile:
16 debugreader = csv.reader(csvfile, delimiter=
';', quotechar=
'#')
17 for row
in debugreader:
19 if(
'LASESCANTIME' in keyword):
20 ScanTimeArray=np.append(ScanTimeArray,row[0])
21 elif(
'ACCX'in keyword):
22 ImuTimeArray=np.append(ImuTimeArray,row[0])
23 ImuXArayTmp = np.append(ImuXArayTmp, row[2])
24 elif(
'ACCY'in keyword):
25 ImuYArayTmp = np.append(ImuYArayTmp, row[2])
26 elif(
'ACCZ'in keyword):
27 ImuZArayTmp = np.append(ImuZArayTmp, row[2])
28 elif(
'DIST'in keyword):
29 DISTTmp = np.append(DISTTmp, row[2])
30 DISTTimeTmp = np.append(DISTTimeTmp, row[0])
33 elif (
'LAYER' in keyword):
34 LayerTmp = np.append(LayerTmp, row[2]).astype(float)
35 LayerTimeTmp = np.append(LayerTimeTmp, row[0]).astype(float)
36 if(row[2]==
'13.19000000'):
37 LayerFirstTime=np.append(LayerFirstTime,row[0]).astype(float)
39 DeltaLayerFirstTime=(LayerFirstTime[1:]-LayerFirstTime[:-1])/1000
40 DeltaMean=np.mean(DeltaLayerFirstTime)
41 TimePredictetVal=np.arange(0,DeltaLayerFirstTime.size,1)
42 TimePredictetVal=TimePredictetVal*DeltaMean
43 TimePredictionDiff=LayerFirstTime[1:]*1000-LayerFirstTime[0]-TimePredictetVal
44 LayerFirstTime=(LayerFirstTime-LayerFirstTime[0])/1e6
46 plt.plot(LayerFirstTime[:-1],TimePredictionDiff)
47 plt.xlabel(
'Time since scaner start /s')
48 plt.ylabel(
'Time betwean first Layers /ms')
49 plt.title(
'MRS6xxx timing moved scaner')
50 plt.legend(loc=
'upper left')