mirror of
https://github.com/NohamR/Stage-2023.git
synced 2026-01-10 16:18:14 +00:00
changes mod
This commit is contained in:
BIN
traitementV2/780.png
Normal file
BIN
traitementV2/780.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
traitementV2/accel±20.png
Normal file
BIN
traitementV2/accel±20.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
BIN
traitementV2/accel±50.png
Normal file
BIN
traitementV2/accel±50.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
28
traitementV2/accpt4.py
Normal file
28
traitementV2/accpt4.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import csv
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
plusoumoins = 20
|
||||
|
||||
def opencsv(file):
|
||||
with open(file, newline='') as csvfile:
|
||||
return [row for row in csv.DictReader(csvfile, delimiter=';')]
|
||||
|
||||
data = opencsv('traitementV2/vit13.txt')
|
||||
|
||||
|
||||
for i in range (len(data)-plusoumoins):
|
||||
accel = (float(data[i+plusoumoins]['vitesse']) - float(data[i-plusoumoins]['vitesse'])) / (float(data[i+plusoumoins]['temps']) - float(data[i-plusoumoins]['temps']))*100
|
||||
print(f'accel {i}:', accel)
|
||||
|
||||
plt.figure(plusoumoins,figsize=[16,9])
|
||||
plt.xlim([-1,476])
|
||||
plt.ylim([-1, 1])
|
||||
|
||||
plt.plot([i],[accel], marker='o', linestyle='-')
|
||||
# plt.show
|
||||
# plt.pause(0.00001)
|
||||
if i == 457-plusoumoins-2:
|
||||
plt.savefig(f'traitementV2/accel±{plusoumoins}.png')
|
||||
plt.clf
|
||||
# with open("traitementV2/vit13.txt", 'a', encoding='utf-8') as file:
|
||||
# file.write('\n' + str(i) + ';' + str(vitesse))
|
||||
File diff suppressed because it is too large
Load Diff
476
traitementV2/pt13.txt
Normal file
476
traitementV2/pt13.txt
Normal file
@@ -0,0 +1,476 @@
|
||||
temps;distance
|
||||
1;113.90268274039994
|
||||
2;113.90268274039994
|
||||
3;113.90268274039994
|
||||
4;113.90268274039994
|
||||
5;113.39596107770217
|
||||
7;113.90268274039994
|
||||
8;113.90268274039994
|
||||
9;113.92456837476712
|
||||
13;113.41770305090014
|
||||
14;113.90268274039994
|
||||
15;113.90268274039994
|
||||
16;113.90268274039994
|
||||
20;113.90268274039994
|
||||
21;113.90268274039994
|
||||
22;113.90268274039994
|
||||
23;113.90268274039994
|
||||
25;113.92456837476712
|
||||
26;112.89235272140164
|
||||
27;113.88080370759658
|
||||
28;113.90268274039994
|
||||
29;113.90268274039994
|
||||
30;113.90268274039994
|
||||
31;113.90268274039994
|
||||
32;113.90268274039994
|
||||
33;113.88080370759658
|
||||
34;113.39596107770217
|
||||
35;113.39596107770217
|
||||
36;113.39596107770217
|
||||
37;113.88080370759658
|
||||
38;113.90268274039994
|
||||
39;113.88080370759658
|
||||
40;113.88080370759658
|
||||
41;113.90268274039994
|
||||
42;113.90268274039994
|
||||
43;113.90268274039994
|
||||
44;113.88080370759658
|
||||
45;113.90268274039994
|
||||
46;113.90268274039994
|
||||
47;113.90268274039994
|
||||
48;113.90268274039994
|
||||
49;113.35249674242968
|
||||
50;113.37422564252824
|
||||
51;113.37422564252824
|
||||
52;113.39596107770217
|
||||
53;113.39596107770217
|
||||
54;113.39596107770217
|
||||
55;113.37422564252824
|
||||
56;113.37422564252824
|
||||
57;113.37422564252824
|
||||
58;113.37422564252824
|
||||
59;113.37422564252824
|
||||
60;113.37422564252824
|
||||
61;113.37422564252824
|
||||
62;113.37422564252824
|
||||
63;113.35249674242968
|
||||
64;113.35249674242968
|
||||
65;113.35249674242968
|
||||
66;113.35249674242968
|
||||
67;113.35249674242968
|
||||
68;113.35249674242968
|
||||
69;113.35249674242968
|
||||
70;113.39596107770217
|
||||
71;113.39596107770217
|
||||
72;113.39596107770217
|
||||
73;113.39596107770217
|
||||
74;113.39596107770217
|
||||
75;113.39596107770217
|
||||
76;113.37422564252824
|
||||
77;113.37422564252824
|
||||
78;113.37422564252824
|
||||
79;113.37422564252824
|
||||
80;113.39596107770217
|
||||
81;113.39596107770217
|
||||
82;113.39596107770217
|
||||
83;113.88080370759658
|
||||
84;113.88080370759658
|
||||
85;113.37422564252824
|
||||
86;113.37422564252824
|
||||
87;113.39596107770217
|
||||
88;113.39596107770217
|
||||
89;113.39596107770217
|
||||
90;113.39596107770217
|
||||
91;113.37422564252824
|
||||
92;113.37422564252824
|
||||
93;113.39596107770217
|
||||
94;113.39596107770217
|
||||
95;113.39596107770217
|
||||
96;113.39596107770217
|
||||
97;113.41770305090014
|
||||
98;113.41770305090014
|
||||
99;113.41770305090014
|
||||
100;113.41770305090014
|
||||
101;113.39596107770217
|
||||
102;113.39596107770217
|
||||
103;113.39596107770217
|
||||
104;113.39596107770217
|
||||
105;113.39596107770217
|
||||
106;113.39596107770217
|
||||
107;113.39596107770217
|
||||
108;113.39596107770217
|
||||
109;113.39596107770217
|
||||
110;113.39596107770217
|
||||
111;113.39596107770217
|
||||
112;113.39596107770217
|
||||
113;113.39596107770217
|
||||
114;113.39596107770217
|
||||
115;113.39596107770217
|
||||
116;113.39596107770217
|
||||
117;113.39596107770217
|
||||
118;113.39596107770217
|
||||
119;113.41770305090014
|
||||
120;113.41770305090014
|
||||
121;113.41770305090014
|
||||
122;113.39596107770217
|
||||
123;113.39596107770217
|
||||
124;113.39596107770217
|
||||
125;113.39596107770217
|
||||
126;113.39596107770217
|
||||
127;113.39596107770217
|
||||
128;113.39596107770217
|
||||
129;113.39596107770217
|
||||
130;113.39596107770217
|
||||
131;113.39596107770217
|
||||
132;113.39596107770217
|
||||
133;113.39596107770217
|
||||
134;113.39596107770217
|
||||
135;113.39596107770217
|
||||
136;113.39596107770217
|
||||
137;113.39596107770217
|
||||
138;113.39596107770217
|
||||
139;113.39596107770217
|
||||
140;113.39596107770217
|
||||
141;113.39596107770217
|
||||
142;113.39596107770217
|
||||
143;113.39596107770217
|
||||
144;113.39596107770217
|
||||
145;113.39596107770217
|
||||
146;113.39596107770217
|
||||
147;113.39596107770217
|
||||
148;113.39596107770217
|
||||
149;113.39596107770217
|
||||
150;113.39596107770217
|
||||
151;112.89235272140164
|
||||
160;113.39596107770217
|
||||
161;113.41770305090014
|
||||
162;113.41770305090014
|
||||
163;112.41328775001939
|
||||
167;113.39596107770217
|
||||
168;113.39596107770217
|
||||
169;113.41770305090014
|
||||
170;113.39596107770217
|
||||
171;112.39182906706137
|
||||
172;112.91395238302232
|
||||
173;112.91395238302232
|
||||
174;112.91395238302232
|
||||
175;112.39182906706137
|
||||
176;112.39182906706137
|
||||
177;112.39182906706137
|
||||
178;112.91395238302232
|
||||
179;112.91395238302232
|
||||
180;112.91395238302232
|
||||
181;111.39992318792598
|
||||
182;112.39182906706137
|
||||
183;112.39182906706137
|
||||
184;112.39182906706137
|
||||
185;111.39992318792598
|
||||
186;111.91568088037849
|
||||
187;111.42110384686693
|
||||
188;111.42110384686693
|
||||
189;111.42110384686693
|
||||
193;111.46348405104577
|
||||
194;110.95057887757523
|
||||
195;111.91568088037849
|
||||
196;110.92952906130722
|
||||
197;110.92952906130722
|
||||
198;110.92952906130722
|
||||
199;110.5036896534225
|
||||
200;110.992697225526
|
||||
201;110.5036896534225
|
||||
202;110.992697225526
|
||||
203;110.97163493139053
|
||||
204;110.97163493139053
|
||||
205;111.01376576275614
|
||||
206;111.01376576275614
|
||||
207;110.992697225526
|
||||
208;110.5036896534225
|
||||
209;110.5036896534225
|
||||
210;110.5036896534225
|
||||
211;110.03843161747227
|
||||
212;110.03843161747227
|
||||
213;110.08004541253567
|
||||
214;110.08004541253567
|
||||
215;109.5965140418991
|
||||
216;109.5965140418991
|
||||
217;109.55516751547407
|
||||
218;109.57583774201251
|
||||
219;109.5965140418991
|
||||
220;109.65857940842659
|
||||
221;109.19812088147722
|
||||
222;109.19812088147722
|
||||
223;109.19812088147722
|
||||
224;109.1364350921017
|
||||
225;109.17755292564226
|
||||
226;109.19812088147722
|
||||
227;109.21869486688848
|
||||
228;109.21869486688848
|
||||
229;108.71984307241543
|
||||
230;108.76073400808588
|
||||
237;106.87489612284426
|
||||
238;106.87489612284426
|
||||
239;106.87489612284426
|
||||
240;106.41039267972812
|
||||
241;105.96831201126908
|
||||
242;105.50912760451035
|
||||
243;105.50912760451035
|
||||
244;105.96831201126908
|
||||
245;106.0077079431609
|
||||
248;105.11099387982487
|
||||
249;105.09153361999773
|
||||
250;105.130459699107
|
||||
251;104.65679491176226
|
||||
252;104.65679491176226
|
||||
253;104.65679491176226
|
||||
254;100.85010232969762
|
||||
255;100.01110726634198
|
||||
256;101.60572413348754
|
||||
257;102.92282403407741
|
||||
258;102.4812642429444
|
||||
259;103.36693956268459
|
||||
260;102.92282403407741
|
||||
261;102.53758588878247
|
||||
262;102.51880673307357
|
||||
263;102.4812642429444
|
||||
264;102.51880673307357
|
||||
265;102.13555683704129
|
||||
266;101.69847069433332
|
||||
267;101.30078780550541
|
||||
268;101.30078780550541
|
||||
269;100.90514914230053
|
||||
270;100.90514914230053
|
||||
271;100.52979647604367
|
||||
272;100.52979647604367
|
||||
273;100.13809841094593
|
||||
274;99.71229048770766
|
||||
275;99.69424386146943
|
||||
276;99.71229048770766
|
||||
277;99.32477234574041
|
||||
278;99.30682491666337
|
||||
279;99.32477234574041
|
||||
280;98.903527522254
|
||||
281;98.93922063549164
|
||||
282;98.93922063549164
|
||||
283;98.13865287129774
|
||||
284;98.15630249687169
|
||||
285;97.74155501028397
|
||||
286;97.74155501028397
|
||||
287;97.36400734215728
|
||||
288;97.36400734215728
|
||||
289;96.95364724716276
|
||||
290;97.02307304361022
|
||||
291;96.61457103936468
|
||||
292;96.20832454213539
|
||||
293;95.40252375755514
|
||||
294;95.40252375755514
|
||||
295;95.40252375755514
|
||||
296;95.01979326410523
|
||||
297;95.05352766823162
|
||||
298;94.68937596487135
|
||||
299;94.70615975739216
|
||||
300;94.70615975739216
|
||||
301;93.54159072866744
|
||||
302;93.5580905852994
|
||||
303;93.94983235653768
|
||||
304;93.18487545005125
|
||||
305;92.82989693224735
|
||||
306;92.82989693224735
|
||||
307;92.09280368942092
|
||||
308;92.47664252225249
|
||||
309;92.10894957427504
|
||||
310;91.36319918754546
|
||||
311;91.01705088202571
|
||||
312;91.01705088202571
|
||||
313;90.65676427309727
|
||||
314;90.2982942835695
|
||||
315;90.2982942835695
|
||||
316;89.57121161174231
|
||||
317;89.6178372185309
|
||||
318;89.6178372185309
|
||||
319;88.89768253370882
|
||||
320;88.54800985056673
|
||||
321;88.20007421905581
|
||||
322;87.86899370560427
|
||||
323;87.8841285312825
|
||||
324;87.8841285312825
|
||||
325;86.84033543005802
|
||||
326;86.50081464926805
|
||||
327;86.16295593116655
|
||||
328;85.84140431097202
|
||||
329;85.50675579287447
|
||||
330;85.50675579287447
|
||||
331;84.81347716714163
|
||||
332;84.48382426395254
|
||||
333;84.49817128824773
|
||||
334;84.18430872792776
|
||||
335;83.85767542141714
|
||||
336;83.85767542141714
|
||||
337;83.20910291483531
|
||||
338;82.88714128187712
|
||||
339;82.91511141284022
|
||||
340;82.27549299785763
|
||||
341;81.9579605547623
|
||||
342;81.9579605547623
|
||||
343;81.66934101790514
|
||||
344;81.01434153094871
|
||||
345;80.72974895516191
|
||||
346;80.41949037228693
|
||||
347;80.43292099504976
|
||||
348;80.43292099504976
|
||||
349;79.82991095774648
|
||||
350;79.21919883482502
|
||||
351;78.91596726339523
|
||||
352;78.62717191558076
|
||||
353;77.7041420832723
|
||||
354;77.7041420832723
|
||||
355;77.43343775096056
|
||||
356;77.45899293892187
|
||||
357;77.17656331630288
|
||||
358;76.27392412526761
|
||||
359;75.9717125699865
|
||||
360;75.9717125699865
|
||||
361;75.11047480482982
|
||||
362;74.54275098493423
|
||||
363;73.98009450925957
|
||||
364;73.70064537128788
|
||||
365;73.4343593302413
|
||||
366;73.4343593302413
|
||||
367;72.59518263387557
|
||||
368;72.33355180161911
|
||||
369;72.07301189683938
|
||||
370;71.8251437086447
|
||||
371;71.27491407716619
|
||||
372;71.27491407716619
|
||||
373;70.75232317666304
|
||||
374;70.22288021473204
|
||||
375;69.97108241769348
|
||||
376;69.45946336908032
|
||||
377;68.93011319568129
|
||||
378;68.93011319568129
|
||||
379;68.44898721495323
|
||||
380;68.1935620486459
|
||||
381;67.69671236779283
|
||||
382;66.92197720635845
|
||||
383;66.68356123085218
|
||||
384;66.68356123085218
|
||||
385;65.45402008888533
|
||||
386;65.4746469897533
|
||||
387;64.9897737329689
|
||||
388;64.75901670868834
|
||||
389;64.28003539912956
|
||||
390;64.28003539912956
|
||||
391;63.57886486439869
|
||||
392;63.08981136742726
|
||||
393;62.61469618136209
|
||||
394;62.14352092428581
|
||||
395;61.69541664528446
|
||||
396;61.69541664528446
|
||||
397;60.80967459978345
|
||||
398;60.353269060348424
|
||||
404;58.71776217410935
|
||||
405;58.27810268338762
|
||||
411;55.60993381102287
|
||||
412;54.97570713814874
|
||||
413;54.790992130147174
|
||||
419;51.55684626906423
|
||||
420;51.55684626906423
|
||||
421;51.3913839198885
|
||||
422;50.25013272729472
|
||||
423;49.69272746056912
|
||||
424;49.134036175702555
|
||||
425;48.782087554614954
|
||||
426;48.782087554614954
|
||||
427;47.36298036438692
|
||||
428;47.196356754601084
|
||||
429;47.05139665977286
|
||||
430;46.71376662330383
|
||||
431;46.56320937842218
|
||||
432;46.56320937842218
|
||||
433;45.553360976061164
|
||||
434;44.38017488164266
|
||||
435;44.229956240927734
|
||||
436;43.4145305863945
|
||||
437;43.114058139586575
|
||||
438;43.114058139586575
|
||||
439;42.336328735667244
|
||||
440;41.73814343682093
|
||||
441;41.44186773761665
|
||||
442;40.830568595068556
|
||||
443;40.21529505625481
|
||||
444;40.21529505625481
|
||||
445;39.33692037629811
|
||||
446;38.915559448628414
|
||||
447;38.18202002491956
|
||||
448;37.748729027097845
|
||||
449;37.471489858101094
|
||||
450;37.471489858101094
|
||||
451;36.247504911665715
|
||||
452;35.85938592623987
|
||||
453;35.17966544518724
|
||||
454;34.780015280663335
|
||||
455;34.26309488022975
|
||||
456;34.26309488022975
|
||||
457;33.2425100966097
|
||||
458;32.74368687022438
|
||||
459;32.24581074670364
|
||||
460;31.887042472342284
|
||||
461;31.39441669401581
|
||||
462;31.39441669401581
|
||||
463;30.316194285885622
|
||||
464;29.850946822232522
|
||||
465;29.274494408242788
|
||||
466;28.697333159047467
|
||||
467;28.250165920304813
|
||||
468;28.250165920304813
|
||||
469;27.251408203901413
|
||||
470;26.597932435862734
|
||||
471;26.297699181516183
|
||||
472;25.545824766856242
|
||||
473;25.13281960865403
|
||||
474;25.13281960865403
|
||||
475;24.111641822422584
|
||||
476;23.609264848780704
|
||||
477;23.117200910517123
|
||||
478;22.42883604905868
|
||||
479;22.05188798357431
|
||||
480;22.05188798357431
|
||||
481;20.82597250996624
|
||||
482;20.369417753970062
|
||||
483;19.730496938398282
|
||||
484;19.476564601405407
|
||||
485;18.765139163582727
|
||||
486;18.765139163582727
|
||||
487;17.560008619996612
|
||||
488;17.227566473541046
|
||||
489;16.56023092586279
|
||||
490;16.07984554675826
|
||||
491;15.451571757668749
|
||||
492;15.451571757668749
|
||||
493;14.428049541844786
|
||||
494;13.895162375033236
|
||||
495;13.287890523788946
|
||||
496;12.694385074765744
|
||||
497;12.266471100672735
|
||||
498;12.266471100672735
|
||||
499;11.131444595325704
|
||||
500;10.5883968705696
|
||||
501;10.117611442933999
|
||||
502;9.447509550801716
|
||||
503;8.858962479183305
|
||||
504;8.72702384689526
|
||||
505;7.65693780154592
|
||||
506;7.167674415211756
|
||||
507;6.565774839540286
|
||||
508;6.092237485921093
|
||||
509;5.448283588464423
|
||||
510;5.448283588464423
|
||||
511;4.4973548205346265
|
||||
512;3.890041070237749
|
||||
513;3.2991872459670786
|
||||
514;2.6632590080822656
|
||||
515;2.2024705101967648
|
||||
516;2.2024705101967648
|
||||
517;1.0528975944720018
|
||||
518;0.7236154475711274
|
||||
519;0.4449815457591514
|
||||
520;0.27076179223171837
|
||||
BIN
traitementV2/visu_capture.png
Normal file
BIN
traitementV2/visu_capture.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
72
traitementV2/visupt4.py
Normal file
72
traitementV2/visupt4.py
Normal file
@@ -0,0 +1,72 @@
|
||||
import matplotlib.pyplot as plt
|
||||
from colour import Color
|
||||
|
||||
def rainbow_gradient(num_colors):
|
||||
colors = []
|
||||
gradient = list(Color("violet").range_to(Color("red"), num_colors))
|
||||
for color in gradient:
|
||||
colors.append(color.hex_l)
|
||||
return colors
|
||||
|
||||
framenb = 1
|
||||
|
||||
keyvalues = []
|
||||
|
||||
with open('traitementV2/distance.txt', 'r') as f:
|
||||
lignes = f.readlines()
|
||||
for ligne in lignes:
|
||||
line = eval(ligne)
|
||||
|
||||
allkeys = list(line.keys())
|
||||
allkeys.sort()
|
||||
linedict = {i: line[i] for i in allkeys}
|
||||
|
||||
linedict = {cle: valeur for cle, valeur in linedict.items() if valeur >= 0}
|
||||
|
||||
for key, value in linedict.items():
|
||||
if key not in keyvalues:
|
||||
keyvalues.append(key)
|
||||
|
||||
keypositions = {}
|
||||
|
||||
for key, i in zip(keyvalues, range(1, len(keyvalues)+1)):
|
||||
keypositions[key] = i
|
||||
print('keypositions: ', keypositions)
|
||||
colors = rainbow_gradient(len(keypositions)+1)
|
||||
|
||||
with open('traitementV2/distance.txt', 'r') as f:
|
||||
lignes = f.readlines()
|
||||
for ligne in lignes:
|
||||
line = eval(ligne)
|
||||
|
||||
allkeys = list(line.keys())
|
||||
allkeys.sort()
|
||||
linedict = {i: line[i] for i in allkeys}
|
||||
|
||||
linedict = {cle: valeur for cle, valeur in linedict.items() if valeur >= 0}
|
||||
|
||||
plt.figure(1,figsize=[16,9])
|
||||
plt.xlim([-1,780])
|
||||
plt.ylim([-20, 150])
|
||||
|
||||
plt.grid()
|
||||
|
||||
nb = 0
|
||||
|
||||
for key, value in linedict.items():
|
||||
if key == 13:
|
||||
# print('value: ', value)
|
||||
# print(framenb)
|
||||
with open("traitementV2/pt13.txt", 'a', encoding='utf-8') as file:
|
||||
file.write('\n' + str(framenb) + ';' + str(value))
|
||||
|
||||
plt.plot([framenb],[value], marker='o', linestyle='-', color=colors[keypositions[key]]) # , color=colors[key]
|
||||
|
||||
nb += 1
|
||||
|
||||
# plt.draw()
|
||||
# plt.pause(0.0001)
|
||||
if framenb == 780:
|
||||
plt.savefig(f'traitementV2/{framenb}.png')
|
||||
framenb += 1
|
||||
# plt.clf()
|
||||
457
traitementV2/vit13.txt
Normal file
457
traitementV2/vit13.txt
Normal file
@@ -0,0 +1,457 @@
|
||||
temps;vitesse
|
||||
0;0.2203695636911355
|
||||
1;0.22161122417978193
|
||||
2;0.2218895757246934
|
||||
3;0.22414714122121102
|
||||
4;0.2251793424582029
|
||||
5;0.22640301448957026
|
||||
6;0.22637916369574068
|
||||
7;0.22773771622202058
|
||||
8;0.22773771622202058
|
||||
9;0.23076676980392818
|
||||
10;0.2320941807387388
|
||||
11;0.23329454949710868
|
||||
12;0.23463617025213993
|
||||
13;0.23565445618186323
|
||||
14;0.23565445618186323
|
||||
15;0.23807971549773826
|
||||
16;0.23872824527431533
|
||||
17;0.23936223880725904
|
||||
18;0.23972979102989075
|
||||
19;-0.0
|
||||
20;-0.0
|
||||
21;0.011960565173266524
|
||||
22;0.01148819777981944
|
||||
23;0.0004725094603026778
|
||||
24;0.011260481393283802
|
||||
25;0.011260481393283802
|
||||
26;0.011746828823665586
|
||||
27;0.0010351763898071233
|
||||
28;0.012582311854087959
|
||||
29;0.012582311854087959
|
||||
30;0.012582311854087959
|
||||
31;0.01355018199671011
|
||||
32;0.01355018199671011
|
||||
33;0.01355018199671011
|
||||
34;0.01355018199671011
|
||||
35;0.015054516640458959
|
||||
36;-0.012109053184948499
|
||||
37;0.013902814872813295
|
||||
38;0.014478578893954213
|
||||
39;0.014478578893954213
|
||||
40;0.014478578893954213
|
||||
41;0.014478578893954213
|
||||
42;0.013334780597309765
|
||||
43;0.012759016576168847
|
||||
44;-0.0
|
||||
45;-0.0
|
||||
46;-0.0
|
||||
47;0.012759016576168847
|
||||
48;0.013906765733465639
|
||||
49;0.01333100171232472
|
||||
50;0.01333100171232472
|
||||
51;0.013906765733465639
|
||||
52;0.013334780597309765
|
||||
53;0.013334780597309765
|
||||
54;0.012759016576168847
|
||||
55;0.0005757640211409185
|
||||
56;0.0005757640211409185
|
||||
57;0.013906765733465639
|
||||
58;0.013906765733465639
|
||||
59;-0.0011437982966444487
|
||||
60;-0.0005719851361558731
|
||||
61;-0.0005719851361558731
|
||||
62;-0.0
|
||||
63;0.0005719851361558731
|
||||
64;0.0005719851361558731
|
||||
65;-0.0005719851361558731
|
||||
66;-0.0005719851361558731
|
||||
67;-0.0005719851361558731
|
||||
68;-0.0005719851361558731
|
||||
69;-0.0011441423255762941
|
||||
70;-0.0011441423255762941
|
||||
71;-0.0011441423255762941
|
||||
72;-0.0011441423255762941
|
||||
73;-0.0011437982966444487
|
||||
74;-0.0011437982966444487
|
||||
75;-0.0011437982966444487
|
||||
76;-0.0011437982966444487
|
||||
77;-0.0011437982966444487
|
||||
78;-0.0011437982966444487
|
||||
79;-0.0011437982966444487
|
||||
80;-0.0
|
||||
81;-0.0
|
||||
82;-0.0
|
||||
83;-0.0
|
||||
84;-0.0
|
||||
85;-0.0
|
||||
86;-0.0005719851361558731
|
||||
87;-0.0005719851361558731
|
||||
88;-0.0005719851361558731
|
||||
89;-0.0005719851361558731
|
||||
90;-0.0
|
||||
91;-0.0005721571894204209
|
||||
92;-0.0005721571894204209
|
||||
93;0.012186859386748426
|
||||
94;0.012759016576168847
|
||||
95;-0.0005719851361558731
|
||||
96;-0.0005719851361558731
|
||||
97;-0.0
|
||||
98;-0.0
|
||||
99;-0.0
|
||||
100;-0.0
|
||||
101;-0.0005719851361558731
|
||||
102;-0.0005719851361558731
|
||||
103;-0.0
|
||||
104;-0.0
|
||||
105;-0.0
|
||||
106;-0.0
|
||||
107;0.0005721571894204209
|
||||
108;0.0005721571894204209
|
||||
109;0.0005721571894204209
|
||||
110;0.0005721571894204209
|
||||
111;-0.0
|
||||
112;-0.0
|
||||
113;-0.0
|
||||
114;-0.0
|
||||
115;-0.0
|
||||
116;-0.0
|
||||
117;-0.0
|
||||
118;-0.0
|
||||
119;-0.0
|
||||
120;-0.0
|
||||
121;-0.0
|
||||
122;-0.0
|
||||
123;0.013252851481592947
|
||||
124;-0.0
|
||||
125;-0.0004726515912603477
|
||||
126;-0.0004726515912603477
|
||||
127;0.021362463645277722
|
||||
128;-0.0
|
||||
129;0.00044371373873420395
|
||||
130;-0.0
|
||||
131;0.00044371373873420395
|
||||
132;0.020492490013077597
|
||||
133;0.009836912136323435
|
||||
134;0.009836912136323435
|
||||
135;0.009836912136323435
|
||||
136;0.020492490013077597
|
||||
137;0.020492490013077597
|
||||
138;0.020492490013077597
|
||||
139;0.009836912136323435
|
||||
140;0.009836912136323435
|
||||
141;0.009836912136323435
|
||||
142;0.04073546713828959
|
||||
143;0.020492490013077597
|
||||
144;0.020492490013077597
|
||||
145;0.020492490013077597
|
||||
146;0.04073546713828959
|
||||
147;0.030209799945381217
|
||||
148;0.04030320879255594
|
||||
149;0.04030320879255594
|
||||
150;0.04030320879255594
|
||||
151;0.03716301974339231
|
||||
152;0.04702658077167198
|
||||
153;0.028466926871609226
|
||||
154;0.04743138493067205
|
||||
155;0.04743138493067205
|
||||
156;0.04743138493067205
|
||||
157;0.05562060431307058
|
||||
158;0.04621661254184936
|
||||
159;0.05562060431307058
|
||||
160;0.04621661254184936
|
||||
161;0.03693688057713674
|
||||
162;0.055098321507082784
|
||||
163;0.054634938366909254
|
||||
164;0.054634938366909254
|
||||
165;0.03228614828394072
|
||||
166;0.07054320547023586
|
||||
167;0.07054320547023586
|
||||
168;0.07107349749945478
|
||||
169;0.08189096244463166
|
||||
170;0.057399937794856
|
||||
171;0.06911968220699151
|
||||
172;0.06911968220699151
|
||||
173;0.08091313027129808
|
||||
174;0.06817841524786018
|
||||
175;0.06918686711188532
|
||||
176;0.06868271524509405
|
||||
177;0.08091313027129808
|
||||
178;0.0793993408437983
|
||||
179;0.09063003662305114
|
||||
180;0.05370249527923793
|
||||
181;0.07789532159961324
|
||||
182;0.07939985304779656
|
||||
183;0.07839697905900257
|
||||
184;0.05370249527923793
|
||||
185;0.06578014667048791
|
||||
186;0.05371729219459618
|
||||
187;0.06588440913296337
|
||||
188;0.06488706923856222
|
||||
189;0.10428608927730694
|
||||
190;0.09262915351661279
|
||||
191;0.11456328994395969
|
||||
192;0.10270764503588868
|
||||
193;0.11275493295541236
|
||||
194;0.1231909421999288
|
||||
195;0.11351277383891235
|
||||
196;0.11419057305129372
|
||||
197;0.10218140250594553
|
||||
198;0.12786311621089405
|
||||
199;0.12782828937810417
|
||||
200;0.126982070267033
|
||||
201;0.13819501849986685
|
||||
202;0.13819501849986685
|
||||
203;0.13773700682095086
|
||||
204;0.20986059399401907
|
||||
205;0.22809961711044605
|
||||
206;0.19343403304206427
|
||||
207;0.15468712137814916
|
||||
208;0.1642862472723449
|
||||
209;0.14593708369241468
|
||||
210;0.1555917690969187
|
||||
211;0.15345495985036142
|
||||
212;0.15386320236577225
|
||||
213;0.1537805059245579
|
||||
214;0.15341371758562902
|
||||
215;0.1621947218447349
|
||||
216;0.17304584161072317
|
||||
217;0.17168115382547425
|
||||
218;0.17168115382547425
|
||||
219;0.1802819943299281
|
||||
220;0.17894099890872123
|
||||
221;0.18799470542605629
|
||||
222;0.18844183490072938
|
||||
223;0.1974042707813599
|
||||
224;0.20666096476480048
|
||||
225;0.19620867849882603
|
||||
226;0.1967052939212655
|
||||
227;0.18875309442759622
|
||||
228;0.18920178015452221
|
||||
229;0.18875309442759622
|
||||
230;0.1876716289368531
|
||||
231;0.17572728439443602
|
||||
232;0.16424767422546793
|
||||
233;0.18426186833031544
|
||||
234;0.19530023785993472
|
||||
235;0.206653823321923
|
||||
236;0.1939326018300237
|
||||
237;0.20335595468001194
|
||||
238;0.20438032518288757
|
||||
239;0.2027144122263026
|
||||
240;0.20088741758294834
|
||||
241;0.21163747032625224
|
||||
242;0.1221520470411114
|
||||
243;0.12127851338912726
|
||||
244;0.16324211515611572
|
||||
245;0.19790263885584905
|
||||
246;0.19635449944313615
|
||||
247;0.21877399722244656
|
||||
248;0.21666968603173847
|
||||
249;0.20609016135237673
|
||||
250;0.20559597304424782
|
||||
251;0.2352545661651832
|
||||
252;0.23580831967826785
|
||||
253;0.21541380211851602
|
||||
254;0.2240419801126861
|
||||
255;0.222918180875212
|
||||
256;0.222918180875212
|
||||
257;0.2319038277073582
|
||||
258;0.22180280579073788
|
||||
259;0.22160123425706912
|
||||
260;0.2412262444341634
|
||||
261;0.24002756655053198
|
||||
262;0.22882209488636707
|
||||
263;0.2378284102203201
|
||||
264;0.24773674221416206
|
||||
265;0.23753889637291867
|
||||
266;0.2562003501295016
|
||||
267;0.25544566124235574
|
||||
268;0.2443602711506079
|
||||
269;0.2642510026784953
|
||||
270;0.27345291539276073
|
||||
271;0.26154154348005076
|
||||
272;0.27071865240177423
|
||||
273;0.259405959973723
|
||||
274;0.259405959973723
|
||||
275;0.2769387345289279
|
||||
276;0.2858734919181376
|
||||
277;0.28396556094726877
|
||||
278;0.29425444033258424
|
||||
279;0.2923109275392159
|
||||
280;0.2816202302437083
|
||||
281;0.2786591208003557
|
||||
282;0.2873341972000685
|
||||
283;0.28695664392914244
|
||||
284;0.28514432989940725
|
||||
285;0.29462769070564426
|
||||
286;0.28504475114353167
|
||||
287;0.3025541274357064
|
||||
288;0.3110268019872378
|
||||
289;0.2796441925217691
|
||||
290;0.296910462827415
|
||||
291;0.3155755737309313
|
||||
292;0.2954451288233936
|
||||
293;0.29369883985111084
|
||||
294;0.31093566845522735
|
||||
295;0.2990277561647108
|
||||
296;0.3172934776306726
|
||||
297;0.30726390997961284
|
||||
298;0.28763889980251856
|
||||
299;0.29439841905997993
|
||||
300;0.31046979071580766
|
||||
301;0.30896834236057985
|
||||
302;0.3071347991575985
|
||||
303;0.33142505790255794
|
||||
304;0.31229130338078975
|
||||
305;0.3206420912518508
|
||||
306;0.3199695863055007
|
||||
307;0.308450505721209
|
||||
308;0.3230022559289241
|
||||
309;0.3217989907649819
|
||||
310;0.31308634567415194
|
||||
311;0.3361487822750705
|
||||
312;0.35108888279863865
|
||||
313;0.3384273926525907
|
||||
314;0.3368465599468467
|
||||
315;0.33496306844540114
|
||||
316;0.32650118370343995
|
||||
317;0.339778241026287
|
||||
318;0.3466632629277727
|
||||
319;0.3352754018500593
|
||||
320;0.33312317250810103
|
||||
321;0.34798045292319857
|
||||
322;0.3397209118621466
|
||||
323;0.3448776906514237
|
||||
324;0.35881040017592364
|
||||
325;0.34836896045110083
|
||||
326;0.35335994507359986
|
||||
327;0.3680262688726035
|
||||
328;0.35119420532043
|
||||
329;0.3554992984160279
|
||||
330;0.3622210133188524
|
||||
331;0.36770075395032403
|
||||
332;0.37085169275237534
|
||||
333;0.36963651906078243
|
||||
334;0.36147181951144086
|
||||
335;0.3941816027938007
|
||||
336;0.3936387896130647
|
||||
337;0.390529926967831
|
||||
338;0.3805311085825444
|
||||
339;0.3851561016912019
|
||||
340;0.37755622411713685
|
||||
341;0.3717178215493056
|
||||
342;0.3845876504169748
|
||||
343;0.38996688341048613
|
||||
344;0.4030387372272647
|
||||
345;0.4073985966057478
|
||||
346;0.3836449336837672
|
||||
347;0.3990009992158696
|
||||
348;0.411011671306265
|
||||
349;0.38122587513303413
|
||||
350;0.37824763491968855
|
||||
351;0.38271168121326465
|
||||
352;0.3901028798570653
|
||||
353;0.38840348333529445
|
||||
354;0.41278326530522785
|
||||
355;0.39694974273228933
|
||||
356;0.395135243051521
|
||||
357;0.4117524371612199
|
||||
358;0.41759275939765256
|
||||
359;0.4177524132351629
|
||||
360;0.42439295325568366
|
||||
361;0.41453274758581293
|
||||
362;0.4313188651008514
|
||||
363;0.4297118049640075
|
||||
364;0.42279371149636724
|
||||
365;0.4191763504222161
|
||||
366;0.4220170531558322
|
||||
367;0.4129392044628501
|
||||
368;0.42717360514310826
|
||||
369;0.43993466955000315
|
||||
370;0.4281513389703908
|
||||
371;0.4390383140463713
|
||||
372;0.4447076054955774
|
||||
373;0.4215087160245048
|
||||
374;0.4365720425299255
|
||||
375;0.43871000558769757
|
||||
376;0.4399462070013526
|
||||
377;0.44244276988794345
|
||||
378;0.45405170458254246
|
||||
379;0.4408220718517713
|
||||
380;0.4481677545496066
|
||||
381;0.447153523259126
|
||||
382;0.4521037905540802
|
||||
383;0.4518242946827663
|
||||
384;0.45705522239968616
|
||||
385;0.44034310833362933
|
||||
386;0.45482573865439074
|
||||
387;0.4762161718306143
|
||||
388;0.48121744246250797
|
||||
389;0.4844167100083613
|
||||
390;0.48168865716090675
|
||||
391;0.4773929593004052
|
||||
392;0.4819562150645929
|
||||
393;0.4950831420747329
|
||||
394;0.5038308729785489
|
||||
395;0.48323921723559043
|
||||
396;0.48153449385666597
|
||||
397;0.4668320916233354
|
||||
398;0.48594455970340344
|
||||
399;0.49818791401006396
|
||||
400;0.47601278831958244
|
||||
401;0.4868164104093057
|
||||
402;0.4947692299860013
|
||||
403;0.48588422902629
|
||||
404;0.508205294066336
|
||||
405;0.525402024804196
|
||||
406;0.50672794196171
|
||||
407;0.4956407924943794
|
||||
408;0.5025562271650974
|
||||
409;0.48109765730895965
|
||||
410;0.5000635872937892
|
||||
411;0.5132840339685756
|
||||
412;0.5057665217144769
|
||||
413;0.5081396680990065
|
||||
414;0.5102626251063773
|
||||
415;0.494175805565638
|
||||
416;0.5102453301654887
|
||||
417;0.5222599290074934
|
||||
418;0.5159585115236797
|
||||
419;0.5115524959795529
|
||||
420;0.5109705489825482
|
||||
421;0.4995681543030294
|
||||
422;0.5239863483711705
|
||||
423;0.532734825909475
|
||||
424;0.5180861575211296
|
||||
425;0.5205142205126738
|
||||
426;0.519160360197855
|
||||
427;0.5086432506051207
|
||||
428;0.5219748773259202
|
||||
429;0.5359982238209609
|
||||
430;0.5251215677058093
|
||||
431;0.5276132051436483
|
||||
432;0.5257720959481818
|
||||
433;0.5163308255702512
|
||||
434;0.533236107860266
|
||||
435;0.5475268374591108
|
||||
436;0.5315416537618848
|
||||
437;0.5369325597744949
|
||||
438;0.5372508402384074
|
||||
439;0.5255344555829528
|
||||
440;0.541927055756813
|
||||
441;0.5548024080287647
|
||||
442;0.5443587727463455
|
||||
443;0.5396235513142538
|
||||
444;0.5486688313960989
|
||||
445;0.5288826625892584
|
||||
446;0.5430385470557738
|
||||
447;0.55902048785306
|
||||
448;0.5476961730646185
|
||||
449;0.55121068001838
|
||||
450;0.5503876421136936
|
||||
451;0.5322727773384714
|
||||
452;0.5526050102395345
|
||||
453;0.5612703298948206
|
||||
454;0.5363418674791338
|
||||
455;0.5289119989931144
|
||||
BIN
traitementV2/vitesse±1.png
Normal file
BIN
traitementV2/vitesse±1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
traitementV2/vitesse±19.png
Normal file
BIN
traitementV2/vitesse±19.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
28
traitementV2/vtpt4.py
Normal file
28
traitementV2/vtpt4.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import csv
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
plusoumoins = 19
|
||||
|
||||
def opencsv(file):
|
||||
with open(file, newline='') as csvfile:
|
||||
return [row for row in csv.DictReader(csvfile, delimiter=';')]
|
||||
|
||||
data = opencsv('traitementV2/pt13.txt')
|
||||
|
||||
|
||||
for i in range (len(data)-plusoumoins):
|
||||
vitesse = -(float(data[i+plusoumoins]['distance']) - float(data[i-plusoumoins]['distance'])) / (float(data[i+plusoumoins]['temps']) - float(data[i-plusoumoins]['temps']))
|
||||
# print(f'vitesse {i}:', -vitesse)
|
||||
|
||||
plt.figure(plusoumoins,figsize=[16,9])
|
||||
plt.xlim([-1,476])
|
||||
plt.ylim([-1, 1])
|
||||
|
||||
plt.plot([i],[vitesse], marker='o', linestyle='-')
|
||||
# plt.show
|
||||
# plt.pause(0.00001)
|
||||
# if i == 474-plusoumoins:
|
||||
# plt.savefig(f'traitementV2/vitesse±{plusoumoins}.png')
|
||||
# plt.clf
|
||||
with open("traitementV2/vit13.txt", 'a', encoding='utf-8') as file:
|
||||
file.write('\n' + str(i) + ';' + str(vitesse))
|
||||
35
traitementV2/vtpt4mod.py
Normal file
35
traitementV2/vtpt4mod.py
Normal file
@@ -0,0 +1,35 @@
|
||||
import csv
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
# plusoumoins = 6
|
||||
|
||||
def opencsv(file):
|
||||
with open(file, newline='') as csvfile:
|
||||
return [row for row in csv.DictReader(csvfile, delimiter=';')]
|
||||
|
||||
data = opencsv('traitementV2/pt13.txt')
|
||||
|
||||
def tester(plusoumoins):
|
||||
for i in range (len(data)-plusoumoins):
|
||||
# print(data[i+1]['temps'])
|
||||
# print(data[i-1]['temps'])
|
||||
# print(data[i+1]['distance'])
|
||||
# print(data[i-1]['distance'])
|
||||
vitesse = (float(data[i+plusoumoins]['distance']) - float(data[i-plusoumoins]['distance'])) / (float(data[i+plusoumoins]['temps']) - float(data[i-plusoumoins]['temps']))
|
||||
print(f'vitesse {i}:', -vitesse)
|
||||
|
||||
plt.figure(plusoumoins,figsize=[16,9])
|
||||
plt.xlim([-1,476])
|
||||
plt.ylim([-1, 1])
|
||||
|
||||
plt.plot([i],[-vitesse], marker='o', linestyle='-')
|
||||
# plt.show
|
||||
# plt.pause(0.00001)
|
||||
if i == 474-plusoumoins:
|
||||
plt.savefig(f'traitementV2/vitesse±{plusoumoins}.png')
|
||||
plt.clf
|
||||
|
||||
# for i in range(1, 20):
|
||||
# tester(i)
|
||||
|
||||
tester(100)
|
||||
Reference in New Issue
Block a user