-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMoveDial.cs
More file actions
540 lines (444 loc) · 67.5 KB
/
MoveDial.cs
File metadata and controls
540 lines (444 loc) · 67.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
using System;
using System.Collections;
using System.IO;
using System.Linq;
using UnityEngine;
using System.Collections.Generic;
public class MoveDial : MonoBehaviour
{
public AnimationCurve animCurve;
[Header("Target Movement Parameters")]
[SerializeField]
private int numTargets = 15;
[SerializeField]
private int numberOfTrials = 54;
[SerializeField]
private float rotSpeed = 3f;
[SerializeField]
private float startAngle = 90f;
private float val = 90f;
private float preVal = 90f;
[Header(" ")]
public ExperimentState expState;
public SineWaveGenerator sineGen;
public TargetAngleTrajectories targetArxiv;
[Header(" ")]
public bool moveTarget = false;
private float TargetAngle = 1f; //# Later on in the experiment development, get rid of this variable in the below code
private float yRot;
private float prevYRot = 1f; // Spring function variables
// Original target range indicator color
// color: C5C100 and emission: r=191,g=0,b=0
private Coroutine moveTargetRoutine;
private Coroutine moveTargetRoutine2;
private TargetWaves targetWave;
private struct TargetWaves
{
public float[][] targWav;
}
private float[] tempWave = new float[0];
[Range(-180f, 180f)]
public float angularOffset = 0f;
private float[,] targetAngleTrials = new float[54, 20];
//public string jsonSaveLoadPath;
//double[] tempTargetVars1 = new double[1080] { 65.60, 164.12, 61.08, 122.58, 75.65, 153.39, 87.56, 179.90, 79.43, 147.73, 46.28, 179.90, 16.35, 164.73, 21.11, 95.31, 22.17, 164.93, 0.10, 153.15, 14.15, 157.86, 28.16, 146.62, 45.82, 172.35, 86.30, 179.90, 75.18, 122.23, 27.40, 177.77, 13.97, 113.52, 42.90, 109.23, 10.61, 157.60, 1.52, 179.90, 126.96, 63.80, 179.88, 0.10, 179.90, 52.56, 114.58, 40.89, 159.02, 65.73, 108.18, 0.10, 154.53, 50.22, 157.41, 81.48, 123.95, 5.42, 179.90, 74.18, 0.10, 148.72, 44.69, 106.54, 74.94, 175.19, 0.10, 149.71, 12.26, 102.46, 0.10, 150.84, 2.87, 126.60, 85.20, 128.58, 59.98, 127.36, 86.65, 166.52, 55.78, 95.72, 11.12, 98.94, 17.44, 156.64, 0.10, 125.48, 73.94, 169.54, 77.83, 165.31, 58.95, 168.30, 16.01, 99.29, 72.70, 163.04, 72.86, 179.90, 128.02, 0.10, 140.08, 87.12, 156.08, 0.10, 113.46, 57.49, 109.09, 18.63, 139.55, 12.20, 117.10, 77.38, 174.27, 51.63, 144.68, 47.07, 132.52, 72.86, 130.27, 20.62, 113.42, 0.10, 99.65, 0.10, 92.07, 42.34, 104.00, 72.93, 153.85, 89.69, 175.93, 73.11, 153.66, 60.48, 107.57, 66.71, 155.23, 0.10, 125.16, 17.45, 108.59, 52.04, 90.17, 37.82, 113.61, 21.26, 139.74, 62.40, 160.09, 30.74, 153.36, 20.16, 115.28, 18.71, 103.42, 0.10, 94.25, 58.96, 153.20, 17.25, 169.36, 77.67, 179.90, 0.10, 117.32, 0.10, 167.35, 4.28, 162.47, 50.21, 147.62, 89.42, 139.41, 0.10, 170.87, 70.44, 159.67, 34.06, 120.65, 30.24, 112.15, 87.93, 146.56, 0.10, 147.08, 40.43, 105.84, 61.10, 124.20, 64.65, 106.63, 86.64, 94.78, 37.77, 136.37, 54.41, 134.15, 48.38, 32.52, 103.95, 24.45, 166.08, 6.32, 162.64, 66.49, 148.84, 0.10, 151.36, 3.30, 126.44, 58.30, 179.90, 82.67, 138.24, 31.06, 161.27, 27.32, 98.47, 91.04, 0.10, 98.69, 79.08, 148.90, 36.63, 126.64, 0.10, 143.12, 37.53, 142.98, 71.25, 139.12, 1.84, 137.16, 66.17, 179.90, 52.34, 146.85, 2.58, 14.71, 105.58, 38.42, 163.21, 55.20, 114.66, 13.56, 146.08, 27.76, 179.90, 6.47, 179.90, 41.73, 149.47, 76.59, 177.50, 38.04, 105.83, 71.78, 126.98, 6.77, 131.86, 89.96, 121.80, 83.73, 164.38, 78.36, 147.78, 0.41, 127.04, 24.72, 165.06, 81.14, 165.96, 46.98, 116.78, 41.14, 170.06, 74.31, 117.69, 117.69, 39.93, 123.84, 20.49, 121.61, 0.10, 111.87, 0.10, 91.91, 20.30, 179.90, 85.66, 179.90, 53.37, 97.82, 86.54, 91.64, 12.27, 93.83, 66.32, 97.59, 52.63, 139.60, 80.87, 111.50, 80.59, 133.77, 25.04, 108.57, 0.10, 166.29, 28.48, 139.52, 20.75, 91.01, 52.96, 137.34, 33.52, 137.60, 0.10, 0.10, 110.05, 19.38, 102.67, 83.83, 150.14, 42.49, 179.90, 0.10, 150.34, 63.10, 179.90, 12.01, 106.80, 19.25, 159.90, 0.10, 174.45, 40.08, 121.66, 72.93, 100.72, 34.93, 106.89, 34.04, 131.56, 50.24, 179.90, 18.04, 153.52, 66.34, 131.76, 0.10, 126.57, 39.03, 131.18, 67.22, 160.73, 2.33, 139.87, 134.99, 15.82, 179.90, 0.10, 139.17, 19.83, 99.68, 79.58, 100.09, 84.11, 131.55, 7.66, 168.78, 45.50, 179.90, 26.62, 102.28, 45.02, 130.54, 42.74, 16.67, 171.85, 0.10, 175.47, 18.90, 179.90, 58.79, 152.94, 26.78, 116.92, 64.00, 133.61, 12.12, 109.92, 0.10, 96.63, 26.43, 119.79, 38.18, 144.43, 35.26, 156.29, 84.73, 179.90, 37.56, 118.30, 82.57, 155.22, 19.60, 124.66, 0.10, 135.35, 25.63, 103.11, 84.33, 130.74, 0.10, 110.12, 29.36, 120.18, 176.43, 8.13, 148.09, 40.76, 95.76, 36.35, 132.04, 36.72, 172.58, 0.10, 96.73, 0.10, 157.77, 8.26, 127.76, 64.14, 91.76, 4.29, 116.59, 2.84, 155.00, 54.64, 110.79, 63.80, 93.38, 0.10, 112.37, 9.02, 106.67, 50.92, 156.00, 10.20, 136.24, 0.10, 179.90, 37.36, 95.82, 63.85, 93.60, 35.35, 80.68, 162.98, 20.80, 163.56, 35.84, 155.58, 54.04, 179.90, 0.16, 136.08, 22.21, 92.73, 62.05, 136.63, 65.21, 133.84, 10.70, 107.01, 9.79, 126.94, 0.10, 130.32, 54.58, 93.58, 25.17, 114.65, 44.68, 117.31, 3.67, 146.51, 30.52, 125.07, 28.90, 175.97, 3.25, 175.66, 35.58, 135.86, 33.76, 91.60, 179.90, 79.97, 131.37, 22.31, 93.95, 61.16, 162.37, 9.80, 107.25, 12.32, 93.31, 0.10, 142.25, 0.10, 155.42, 25.50, 179.90, 51.93, 92.75, 25.94, 10.90, 142.45, 51.42, 90.98, 24.58, 96.52, 0.10, 178.29, 54.75, 179.90, 0.10, 145.13, 5.48, 175.38, 1.65, 137.99, 30.48, 179.90, 28.95, 137.53, 41.30, 137.89, 29.28, 179.90, 80.86, 115.14, 69.29, 170.33, 57.29, 171.60, 46.34, 97.28, 58.93, 130.22, 0.10, 106.86, 50.83, 165.40, 21.29, 136.06, 33.73, 100.63, 18.15, 100.09, 88.29, 178.96, 20.14, 168.18, 0.10, 132.37, 66.44, 141.16, 43.89, 174.88, 58.56, 179.90, 16.18, 179.90, 27.19, 136.97, 75.44, 119.68, 49.22, 102.92, 56.33, 111.40, 0.10, 122.67, 84.68, 96.46, 16.93, 93.13, 6.27, 179.90, 62.32, 93.68, 31.69, 176.57, 47.31, 167.97, 81.22, 127.41, 66.26, 179.90, 74.03, 162.60, 72.25, 95.96, 35.30, 179.90, 59.36, 136.84, 19.30, 179.90, 59.31, 95.73, 26.16, 138.51, 55.99, 179.90, 37.99, 128.93, 22.72, 176.78, 77.10, 140.65, 0.46, 112.86, 39.34, 113.23, 0.10, 135.81, 0.10, 172.89, 73.12, 156.33, 58.66, 163.34, 61.24, 153.21, 14.20, 164.59, 51.92, 140.38, 60.98, 179.90, 63.90, 179.90, 54.62, 133.42, 17.54, 93.66, 80.84, 179.90, 57.29, 147.16, 81.17, 140.71, 63.79, 96.14, 87.69, 144.80, 64.89, 178.26, 8.95, 105.84, 0.10, 179.90, 0.10, 153.30, 25.99, 134.37, 26.64, 179.90, 48.08, 103.53, 44.07, 104.01, 54.48, 126.57, 37.61, 105.94, 76.36, 179.90, 0.10, 154.92, 53.84, 90.78, 57.18, 177.16, 75.21, 145.22, 39.03, 132.10, 82.92, 158.47, 23.96, 165.24, 33.40, 96.31, 161.55, 65.56, 123.57, 55.38, 95.95, 75.86, 113.96, 0.10, 130.98, 14.33, 170.77, 36.81, 111.88, 79.74, 104.72, 5.96, 128.24, 57.01, 96.17, 0.10, 95.50, 77.87, 174.69, 60.90, 179.60, 17.17, 125.69, 44.33, 179.90, 39.96, 116.65, 28.15, 179.90, 83.28, 163.27, 27.86, 141.67, 78.07, 169.92, 0.10, 121.89, 14.55, 179.90, 77.43, 118.18, 0.10, 129.72, 32.25, 143.71, 6.20, 129.04, 55.81, 111.01, 32.91, 147.70, 17.90, 149.44, 25.96, 158.99, 81.85, 64.28, 158.06, 32.50, 179.90, 25.32, 179.90, 8.94, 136.40, 55.43, 111.84, 52.06, 114.31, 32.68, 106.48, 80.74, 156.37, 0.10, 179.90, 37.24, 120.61, 17.27, 123.42, 75.84, 179.90, 89.51, 179.90, 64.44, 157.82, 72.35, 132.68, 29.54, 179.90, 72.07, 179.90, 29.46, 175.11, 0.10, 140.00, 56.87, 94.60, 81.64, 169.42, 48.03, 167.18, 86.12, 130.58, 70.18, 166.23, 55.71, 178.90, 4.42, 114.37, 68.73, 120.81, 66.65, 95.58, 55.62, 178.48, 35.69, 151.70, 16.03, 135.95, 0.10, 110.91, 8.22, 112.00, 55.17, 179.90, 60.93, 96.89, 75.19, 161.53, 61.53, 124.54, 56.09, 129.84, 74.91, 116.44, 66.36, 176.44, 83.95, 106.02, 0.10, 120.96, 0.10, 147.35, 73.50, 120.63, 11.09, 138.57, 9.28, 132.70, 44.10, 159.22, 66.02, 122.98, 77.40, 137.92, 25.29, 96.50, 42.31, 179.90, 44.23, 125.57, 24.99, 158.63, 76.17, 156.00, 50.43, 178.17, 15.58, 173.90, 76.10, 103.90, 34.12, 131.55, 0.45, 99.83, 49.74, 155.60, 74.69, 179.90, 33.76, 176.56, 52.53, 104.00, 85.89, 92.93, 45.14, 179.90, 45.22, 111.56, 27.16, 127.80, 16.78, 148.95, 42.96, 118.75, 55.78, 97.34, 139.90, 4.84, 136.66, 83.94, 140.45, 8.56, 165.26, 7.67, 179.90, 28.43, 127.04, 60.06, 117.21, 62.49, 176.66, 58.43, 153.65, 0.10, 93.00, 71.72, 8.59, 160.19, 82.93, 179.90, 70.78, 176.22, 29.17, 153.28, 31.06, 170.88, 3.26, 165.01, 62.89, 101.35, 25.50, 91.71, 0.10, 179.90, 28.43, 179.90, 179.90, 4.48, 163.35, 68.38, 115.80, 29.05, 179.90, 0.10, 117.06, 28.40, 102.07, 16.44, 109.21, 28.79, 168.26, 39.15, 154.87, 65.47, 110.49, 21.93, 2.81, 98.58, 11.35, 95.26, 30.13, 142.49, 26.19, 179.00, 78.05, 151.00, 5.99, 119.93, 84.17, 121.44, 28.32, 115.47, 15.75, 149.31, 88.19, 151.66, 5.70, 107.92, 54.80, 142.81, 87.06, 111.23, 0.10, 168.05, 66.99, 179.90, 24.91, 92.97, 56.38, 179.90, 83.36, 150.19, 75.87, 148.33, 59.11, 172.26, 179.90, 61.93, 143.38, 44.08, 156.71, 76.42, 122.62, 16.16, 173.71, 46.89, 162.50, 52.29, 142.37, 34.05, 135.81, 52.86, 137.23, 62.51, 105.15, 75.08, 40.07, 153.85, 76.77, 141.68, 4.80, 150.84, 55.59, 167.55, 14.80, 172.41, 82.41, 140.88, 48.95, 118.71, 21.25, 140.99, 22.07, 143.46, 17.66, 110.34, 90.71, 22.33, 166.19, 7.98, 157.69, 14.33, 102.07, 7.82, 121.76, 0.64, 124.55, 8.48, 93.02, 13.44, 94.02, 0.10, 177.40, 2.87, 167.96, 55.50, 164.20, 56.16, 120.40, 47.91, 127.69, 65.08, 179.90, 63.64, 94.09, 86.20, 100.35, 0.10, 148.07, 43.26, 178.64, 66.82, 142.87, 11.14, 135.71, 47.78 };
//double[] tempTargetVars2 = new double[1080] { 163.68, 40.27, 111.87, 19.84, 179.90, 49.06, 146.28, 64.59, 127.23, 24.32, 128.99, 59.13, 179.90, 0.10, 179.90, 0.10, 146.87, 0.10, 114.13, 0.10, 48.83, 179.90, 32.38, 141.32, 0.10, 169.35, 0.10, 114.24, 20.40, 179.90, 64.84, 151.77, 62.57, 179.90, 14.82, 118.23, 0.10, 145.43, 55.04, 163.31, 149.58, 63.85, 172.11, 0.10, 142.60, 56.99, 153.89, 0.10, 144.14, 54.45, 132.86, 65.35, 158.64, 0.10, 131.35, 61.53, 165.10, 49.23, 173.40, 36.87, 179.90, 17.19, 161.30, 47.04, 140.46, 9.50, 131.72, 66.67, 135.96, 9.81, 161.17, 8.32, 153.36, 13.87, 170.82, 7.09, 112.26, 26.99, 144.84, 26.58, 179.90, 33.65, 177.00, 49.99, 125.34, 0.10, 128.10, 33.48, 116.95, 30.72, 151.05, 20.82, 138.51, 26.80, 149.47, 45.84, 179.90, 51.75, 124.81, 33.97, 49.75, 136.65, 0.10, 162.43, 8.25, 162.39, 1.12, 131.21, 0.10, 179.90, 62.39, 151.18, 12.68, 179.90, 47.89, 179.90, 9.90, 167.48, 69.88, 169.84, 145.37, 32.61, 179.90, 10.05, 179.90, 66.26, 179.90, 0.58, 115.93, 64.06, 128.51, 0.10, 174.96, 51.59, 179.90, 20.13, 136.73, 8.53, 139.25, 0.10, 179.52, 0.10, 137.95, 32.88, 179.90, 69.17, 143.78, 36.99, 151.70, 5.68, 151.35, 30.74, 166.31, 61.18, 146.72, 0.10, 145.78, 59.28, 154.85, 0.10, 33.68, 111.75, 28.36, 179.90, 64.79, 172.22, 7.98, 179.82, 8.37, 179.90, 0.10, 165.20, 0.10, 118.38, 13.12, 161.88, 48.45, 176.83, 9.50, 139.90, 179.90, 1.03, 121.26, 48.50, 114.95, 31.99, 179.09, 44.50, 175.79, 63.46, 179.90, 16.13, 162.81, 63.06, 152.43, 41.11, 179.90, 0.10, 162.06, 2.51, 31.76, 171.44, 54.62, 127.33, 15.71, 156.27, 58.67, 143.76, 0.10, 123.41, 63.67, 179.90, 0.10, 128.04, 18.39, 179.90, 41.90, 151.43, 34.28, 156.42, 145.36, 12.58, 172.72, 37.35, 175.36, 51.77, 175.18, 18.37, 111.26, 55.80, 169.72, 21.15, 134.20, 0.10, 118.70, 15.88, 179.90, 9.98, 157.24, 43.36, 177.54, 0.32, 112.75, 35.40, 154.60, 0.10, 115.67, 65.80, 154.67, 44.66, 127.80, 0.10, 129.77, 55.64, 176.63, 58.38, 179.90, 56.68, 163.32, 11.14, 34.75, 117.11, 0.10, 163.15, 1.22, 139.25, 51.46, 121.16, 0.10, 130.18, 32.57, 179.90, 0.10, 118.21, 0.10, 165.41, 10.70, 145.91, 54.00, 132.39, 55.56, 176.17, 0.10, 165.97, 61.73, 178.67, 46.42, 179.90, 0.10, 123.16, 0.10, 149.82, 15.30, 138.62, 21.36, 166.92, 13.31, 168.11, 35.40, 179.90, 121.86, 44.41, 135.34, 52.63, 146.32, 2.45, 176.66, 68.28, 161.76, 36.68, 179.90, 54.38, 115.14, 46.17, 110.82, 51.11, 116.65, 51.87, 177.02, 49.79, 151.22, 0.10, 179.90, 1.26, 176.18, 44.37, 139.12, 0.10, 165.12, 0.10, 151.63, 55.89, 159.84, 2.19, 136.92, 66.26, 130.98, 65.93, 179.90, 42.41, 134.74, 51.79, 110.63, 3.21, 172.69, 44.64, 111.90, 0.10, 169.80, 53.24, 179.90, 42.27, 139.39, 0.10, 154.37, 63.36, 165.23, 67.17, 179.90, 3.59, 11.76, 141.01, 0.10, 136.32, 12.34, 179.90, 42.29, 158.82, 24.20, 177.62, 16.81, 149.93, 51.50, 122.37, 36.63, 172.26, 27.27, 113.58, 18.12, 165.74, 25.25, 167.06, 59.80, 115.70, 11.32, 179.21, 23.97, 113.65, 25.60, 113.04, 54.42, 170.90, 57.70, 129.53, 23.40, 110.56, 31.97, 136.69, 0.10, 156.78, 0.10, 179.90, 31.03, 179.90, 52.15, 128.10, 21.56, 179.90, 69.22, 166.28, 22.50, 159.34, 14.08, 118.44, 35.63, 166.73, 1.10, 153.76, 23.03, 148.40, 1.00, 154.96, 25.61, 151.57, 30.79, 179.90, 36.38, 179.90, 37.91, 132.23, 51.74, 131.44, 14.30, 175.01, 0.10, 141.35, 37.74, 179.90, 44.23, 127.63, 110.89, 21.93, 179.90, 27.70, 179.90, 32.22, 158.07, 10.07, 124.91, 12.71, 132.22, 48.91, 128.47, 56.12, 179.90, 0.10, 178.69, 14.87, 121.31, 30.64, 66.43, 131.90, 69.13, 179.90, 55.20, 141.83, 32.86, 179.90, 3.36, 179.90, 23.50, 160.20, 10.56, 135.74, 19.53, 115.09, 36.86, 179.90, 22.54, 131.67, 0.10, 134.65, 29.14, 179.90, 0.10, 174.62, 31.80, 179.90, 60.66, 179.90, 0.10, 110.03, 26.18, 157.83, 60.30, 169.28, 45.03, 130.78, 54.67, 125.61, 0.10, 130.07, 59.94, 143.68, 40.14, 126.42, 26.74, 179.90, 26.59, 179.90, 15.57, 125.95, 0.10, 117.71, 2.74, 170.47, 34.14, 144.14, 68.87, 137.17, 134.15, 53.85, 115.40, 53.59, 130.64, 49.21, 174.59, 24.44, 133.74, 46.03, 134.39, 0.10, 161.48, 0.10, 147.39, 39.18, 179.90, 40.04, 124.65, 43.59, 122.23, 4.47, 112.72, 46.35, 171.55, 0.10, 178.82, 0.10, 118.70, 14.06, 139.80, 13.30, 113.50, 0.10, 145.78, 20.15, 173.46, 42.39, 179.90, 65.45, 165.00, 23.46, 179.90, 36.41, 138.72, 0.15, 137.01, 64.25, 179.90, 67.65, 143.69, 29.73, 122.73, 0.10, 179.90, 67.93, 117.50, 58.89, 118.79, 59.59, 58.12, 161.56, 4.69, 168.88, 6.62, 172.59, 50.23, 179.50, 0.10, 137.13, 1.11, 179.90, 9.82, 153.41, 45.45, 161.53, 48.91, 179.90, 6.06, 139.26, 130.82, 7.61, 158.05, 38.22, 131.80, 40.89, 170.78, 0.10, 127.67, 0.10, 140.57, 45.00, 179.52, 65.63, 179.90, 48.46, 179.90, 51.77, 164.00, 24.30, 179.90, 42.99, 121.07, 0.10, 118.26, 0.10, 127.73, 53.14, 179.90, 0.10, 174.68, 14.47, 177.51, 54.48, 112.05, 40.50, 142.76, 51.46, 179.90, 61.42, 17.23, 113.89, 0.10, 155.40, 58.58, 121.81, 19.09, 152.88, 0.10, 140.37, 0.10, 140.02, 61.63, 179.90, 62.32, 179.90, 53.48, 157.38, 57.09, 142.10, 25.90, 141.55, 58.43, 179.90, 33.76, 170.33, 47.49, 179.90, 1.33, 127.86, 17.18, 115.94, 2.68, 162.07, 65.04, 179.90, 42.91, 124.76, 1.84, 171.45, 7.55, 125.95, 0.10, 161.84, 36.03, 179.90, 0.10, 145.78, 51.44, 148.19, 39.04, 167.71, 27.04, 133.29, 53.00, 121.19, 59.93, 129.95, 22.86, 150.76, 4.26, 133.81, 66.41, 179.90, 23.75, 179.90, 42.95, 124.29, 0.10, 166.75, 0.10, 125.25, 48.10, 154.37, 34.69, 177.47, 30.06, 174.01, 34.64, 139.15, 139.17, 48.65, 157.88, 26.07, 147.53, 33.14, 179.90, 11.68, 166.05, 0.10, 165.96, 50.62, 125.57, 39.53, 176.05, 21.03, 165.42, 69.22, 169.26, 0.10, 179.90, 45.14, 179.90, 0.10, 164.20, 69.90, 179.90, 0.10, 178.84, 68.90, 154.55, 16.57, 174.72, 47.35, 171.50, 24.64, 179.90, 30.34, 169.62, 44.09, 38.89, 121.11, 65.24, 179.90, 48.62, 112.73, 66.69, 169.39, 54.29, 161.93, 18.72, 142.38, 43.28, 154.69, 3.20, 132.02, 61.99, 110.94, 43.37, 116.27, 31.35, 138.49, 5.09, 176.88, 42.78, 129.68, 39.57, 164.78, 63.65, 122.16, 63.00, 167.59, 55.94, 179.90, 44.66, 138.91, 21.50, 136.59, 55.61, 158.48, 179.90, 56.34, 116.31, 0.10, 150.35, 38.25, 122.12, 46.26, 135.25, 42.11, 161.04, 44.12, 119.30, 35.60, 132.62, 60.77, 137.39, 24.29, 114.72, 62.10, 138.70, 31.79, 114.51, 48.66, 166.49, 27.04, 133.89, 66.86, 179.90, 14.27, 179.90, 19.13, 171.50, 0.10, 149.63, 1.02, 159.48, 0.10, 120.76, 0.10, 13.76, 160.93, 47.20, 161.36, 34.72, 121.09, 1.84, 167.57, 35.39, 118.06, 53.07, 139.89, 19.65, 152.41, 7.50, 152.00, 30.29, 179.90, 10.82, 171.46, 179.90, 1.29, 124.32, 19.19, 176.93, 53.92, 179.90, 0.10, 147.67, 12.36, 121.42, 30.87, 137.73, 6.51, 161.08, 36.09, 173.22, 15.69, 165.63, 0.88, 0.10, 134.10, 3.25, 177.23, 60.88, 176.06, 53.01, 140.28, 0.10, 147.91, 29.91, 179.90, 45.00, 168.08, 69.32, 169.07, 11.53, 172.94, 20.21, 177.67, 129.74, 69.01, 130.90, 38.10, 159.08, 0.10, 161.58, 4.51, 155.06, 65.84, 179.54, 61.88, 159.10, 18.76, 110.12, 60.63, 179.90, 14.76, 179.90, 19.03, 55.77, 168.84, 13.07, 179.90, 49.19, 120.97, 65.94, 170.03, 40.21, 129.54, 24.84, 134.71, 54.70, 121.75, 15.02, 160.70, 0.10, 160.08, 4.85, 139.67, 47.22, 163.13, 0.10, 179.90, 39.53, 140.71, 38.72, 170.14, 24.12, 179.90, 37.21, 121.84, 25.33, 179.90, 0.10, 166.07, 67.09, 141.00, 18.72, 139.21, 22.09, 179.90, 16.77, 124.76, 69.70, 167.96, 61.53, 179.90, 61.82, 135.40, 50.39, 150.39, 26.62, 179.90, 35.24, 179.90, 5.06, 116.06, 43.54, 125.49, 174.89, 57.38, 128.08, 61.88, 141.55, 12.10, 137.60, 14.69, 165.89, 0.10, 118.00, 33.61, 119.74, 8.77, 146.10, 49.27, 174.22, 0.10, 117.77, 58.44, 0.10, 132.02, 28.68, 179.90, 0.10, 156.16, 7.65, 173.41, 49.51, 179.90, 0.10, 134.21, 63.48, 123.25, 31.51, 132.23, 46.14, 121.28, 32.95, 139.37, 18.20, 172.31, 0.10, 156.27, 40.55, 130.68, 59.36, 129.44, 35.33, 114.62, 11.37, 160.51, 0.10, 170.17, 0.10, 178.22, 0.10, 174.34, 64.88, 154.15, 19.20, 135.17, 61.39, 123.43, 20.78, 137.98, 46.46, 136.03, 33.69, 133.12, 7.88, 160.17, 0.10, 165.60, 45.30, 164.24, 41.69, 139.38, 0.10, 172.10, 130.72, 38.48, 170.23, 48.67, 115.87, 14.63, 112.29, 61.02, 163.43, 0.10, 147.76, 0.10, 120.30, 66.08, 136.28, 66.40, 139.96, 40.82, 160.93, 0.10 };
//double[] tempTargetVars2 = new double[1080]{179.90,179.90,14.76,120.30,179.90,179.90,179.90,22.58,179.90,179.90,179.90,64.40,179.90,179.90,179.90,179.90,179.90,179.90,0.10,179.90,179.90,6.12,125.05,179.90,179.90,179.90,179.90,24.34,121.57,179.90,172.13,179.90,113.93,148.72,160.94,179.90,179.90,113.49,179.90,91.68,142.74,179.90,179.90,179.90,179.90,179.90,179.90,179.90,148.90,179.90,179.90,179.90,179.90,179.90,27.76,155.33,179.90,179.90,6.38,179.90,58.65,179.90,122.93,179.90,55.76,140.21,179.90,0.10,179.90,179.90,74.07,179.90,179.90,57.54,177.37,179.90,179.90,179.90,179.90,179.90,115.53,179.90,95.15,179.90,179.90,44.10,179.90,179.90,147.51,179.90,179.90,179.90,179.90,31.81,125.54,179.90,179.90,0.10,179.90,179.90,159.74,179.90,179.90,179.90,179.90,179.90,28.69,179.90,179.90,179.90,179.90,179.90,109.95,179.90,118.21,96.74,47.61,179.90,179.90,179.90,179.90,159.88,179.90,154.14,36.46,179.90,97.82,179.90,179.90,179.90,179.90,33.88,146.87,48.98,179.90,179.90,179.90,73.39,127.84,179.90,179.54,0.10,179.90,66.94,179.90,179.90,179.90,179.90,5.80,120.51,179.90,179.90,179.90,179.90,179.90,168.81,129.89,168.14,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,53.32,144.59,92.73,179.90,28.92,179.90,179.90,77.16,133.53,179.90,102.94,179.90,179.90,179.90,24.99,125.05,28.29,133.15,32.06,126.05,179.90,179.90,179.90,27.08,165.77,179.90,179.90,179.90,125.87,133.59,179.90,23.14,153.22,179.90,179.90,179.90,179.90,179.90,179.90,153.86,179.90,134.70,0.10,173.97,179.90,179.90,179.90,121.63,179.90,179.90,179.90,179.90,38.53,155.63,179.90,28.85,179.90,0.10,130.42,179.90,179.90,58.35,155.50,179.90,49.12,179.90,24.39,141.03,148.49,179.90,0.10,175.35,58.46,146.63,153.77,179.90,179.90,179.90,179.90,179.90,5.64,179.90,179.90,179.90,179.90,82.94,137.52,179.90,0.10,179.90,179.90,179.90,179.90,179.90,175.81,179.90,179.90,179.90,179.90,179.90,179.90,59.96,154.90,179.90,179.90,179.90,179.90,20.86,149.45,98.61,179.90,153.43,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,150.64,179.90,179.90,0.10,140.81,64.21,146.98,179.90,179.90,179.90,179.90,179.90,179.90,179.90,69.46,179.90,80.46,179.90,0.10,129.57,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,0.10,179.90,179.90,7.91,146.60,179.90,179.90,179.90,179.90,179.90,101.22,179.90,179.90,179.90,179.90,12.10,160.78,179.90,179.90,105.58,175.32,118.42,179.90,171.85,179.90,179.90,179.90,128.28,179.90,179.90,179.90,179.90,49.67,147.40,179.90,179.90,179.90,179.90,179.90,135.79,179.90,25.87,179.90,179.90,89.39,163.88,179.90,179.90,179.90,179.90,101.48,179.90,179.90,176.32,0.10,179.90,179.90,179.90,179.90,179.90,179.90,171.65,179.90,135.17,172.52,179.90,179.90,179.90,179.90,179.90,179.90,0.10,179.90,167.35,179.90,179.90,179.90,179.39,179.90,179.90,179.90,163.93,179.90,179.90,179.90,179.90,179.90,178.81,135.89,179.90,179.90,179.90,173.58,179.90,179.90,179.90,0.10,159.26,179.90,138.76,179.90,179.90,179.90,179.90,179.90,179.90,73.14,157.16,179.90,179.90,179.90,179.90,14.75,131.69,179.90,124.82,116.82,97.71,61.87,168.57,0.10,179.90,179.90,109.00,179.90,106.36,171.30,179.90,179.90,179.90,179.90,179.90,141.79,58.30,144.50,179.90,106.64,27.30,163.95,118.71,179.90,179.90,88.53,179.90,179.90,179.90,179.90,46.13,132.25,113.26,179.90,179.90,36.68,146.20,179.90,179.90,179.90,179.90,179.90,179.90,5.80,179.90,179.90,179.90,179.90,179.90,179.90,103.66,49.99,179.90,179.90,179.90,179.90,116.91,68.70,150.04,179.90,179.90,179.90,179.90,174.50,179.90,179.90,64.35,140.36,179.90,179.90,179.90,146.64,179.90,169.82,179.90,179.90,5.56,179.90,150.53,179.90,49.73,179.90,42.57,168.31,173.44,179.90,179.90,179.90,179.90,179.90,179.90,179.90,119.20,0.10,135.66,179.90,103.08,179.90,179.90,97.66,179.90,179.90,179.90,91.73,179.90,179.90,179.90,179.90,179.90,179.90,27.81,133.09,104.96,179.90,179.90,116.43,12.40,133.36,79.89,179.90,179.90,42.18,173.65,179.90,179.90,0.10,173.22,179.90,179.90,179.90,13.63,145.74,179.90,179.90,22.76,179.90,86.25,172.60,179.90,179.90,179.90,179.90,90.27,169.89,179.90,179.90,179.90,125.68,179.90,179.90,67.45,179.59,20.14,179.90,179.90,179.90,179.90,179.90,179.90,43.76,179.90,179.90,179.90,179.90,168.29,179.90,48.21,153.21,179.90,179.90,179.90,179.90,179.90,179.90,179.90,9.58,179.90,179.90,179.90,179.90,2.36,136.31,179.90,179.90,179.90,93.64,179.90,148.35,179.90,113.83,179.90,179.90,179.90,179.90,179.90,179.90,179.90,116.62,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,156.49,179.90,179.90,0.10,140.33,54.14,153.84,0.10,179.90,179.90,179.90,0.10,179.90,179.90,179.90,113.06,179.90,179.90,179.90,179.90,164.22,179.90,179.90,58.44,131.15,179.90,113.26,179.90,0.10,155.52,179.90,179.90,179.90,179.90,179.90,24.39,124.59,55.97,179.90,63.43,156.67,0.10,179.90,179.90,179.90,179.90,179.90,0.10,158.14,179.90,179.90,98.51,179.90,179.90,179.90,179.90,9.74,142.68,179.90,179.90,179.90,179.90,79.82,166.68,179.90,179.90,166.27,179.90,179.90,133.69,179.90,179.90,179.90,179.90,121.62,179.90,8.66,179.90,0.10,169.98,179.90,179.90,179.90,179.90,179.90,22.84,162.15,179.90,179.90,179.90,179.90,179.90,31.95,179.90,79.43,178.31,179.90,179.90,179.90,179.90,0.10,179.33,179.12,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,0.10,179.90,179.90,179.90,179.90,10.02,179.90,55.97,179.90,179.90,25.14,179.90,0.10,131.37,179.90,179.90,179.90,179.90,8.10,179.90,5.83,179.90,179.90,179.90,179.90,179.90,179.90,179.90,127.40,94.37,160.85,168.69,179.90,96.29,179.90,37.92,136.42,179.90,179.90,179.90,179.90,179.90,179.90,90.84,179.90,149.51,8.51,149.47,25.32,164.05,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,157.51,179.90,179.90,77.66,129.08,0.10,143.67,179.90,179.90,179.90,179.90,179.90,115.34,179.90,179.90,179.90,179.90,179.90,179.90,159.76,179.90,71.81,124.28,179.90,179.90,179.90,179.90,95.69,179.90,179.90,179.90,179.90,179.90,179.90,101.14,179.90,125.97,179.90,179.90,179.90,179.90,0.10,175.19,129.36,179.90,179.90,179.90,179.90,179.90,179.90,158.17,169.94,179.90,36.75,179.90,179.90,179.90,179.90,179.90,179.90,150.36,178.07,11.08,179.90,18.41,179.90,167.64,179.90,179.90,179.90,179.90,139.50,179.90,160.47,179.90,179.90,179.90,115.18,57.34,179.90,179.90,168.05,146.74,179.90,179.90,179.90,47.39,159.30,179.90,179.90,137.87,0.10,143.39,179.90,179.90,106.47,179.90,100.82,77.82,127.15,152.65,179.90,179.90,179.90,179.90,179.90,179.90,87.16,179.90,179.90,179.90,33.81,142.87,179.90,106.43,179.90,179.90,179.90,179.90,179.90,179.90,152.66,35.28,171.14,179.90,44.35,169.14,13.97,151.32,179.90,179.90,179.90,179.90,0.10,163.07,179.90,179.90,179.90,66.07,179.90,163.75,179.90,179.90,47.66,154.70,179.90,179.90,179.90,179.90,114.35,179.90,169.98,179.90,0.10,174.66,69.85,179.90,179.90,179.90,96.50,179.90,23.31,161.23,179.90,179.90,179.90,179.90,0.10,173.71,179.90,179.90,0.10,179.90,179.90,50.57,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,179.90,118.85,61.78,151.45,0.10,179.90,179.90,179.90,168.41,179.90,179.90,179.90,179.90,179.90,151.64,94.27,179.90,179.90,179.90,179.90,0.10,179.90,179.90,36.07,140.85,19.70,145.12,38.21,174.32,129.79,179.90,179.90,179.90,15.40,179.90,179.90,179.90,179.90,105.72,179.90,179.90,179.90,179.90,179.90,179.90,65.32,166.72,179.90,179.90,179.90,179.90,179.90,179.90,179.90,129.91,165.52,179.90,24.13,179.90,179.90,179.90,179.90,117.04,179.90,21.96,170.39,179.90,179.90,179.90,179.90,33.67,179.90,179.90,179.90};
//double[] tempTargetVars2 = new double[1080] { 0.10, 174.88, 0.10, 161.37, 0.10, 179.90, 15.59, 179.90, 14.57, 179.90, 0.10, 179.90, 4.97, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 8.48, 173.67, 11.91, 160.44, 0.10, 170.69, 0.10, 179.90, 0.10, 179.90, 0.10, 166.24, 0.10, 179.90, 0.10, 179.90, 8.39, 166.47, 5.46, 179.90, 179.90, 0.10, 174.42, 5.07, 179.90, 8.73, 169.51, 0.10, 179.90, 9.27, 160.50, 0.10, 177.19, 0.10, 178.97, 12.52, 179.90, 0.61, 169.40, 0.10, 0.10, 160.71, 0.10, 178.07, 0.10, 179.90, 18.07, 174.65, 4.84, 179.90, 8.92, 170.27, 0.10, 171.62, 0.10, 179.90, 0.10, 174.26, 0.10, 179.90, 179.90, 5.82, 169.56, 0.10, 179.90, 0.10, 160.18, 18.07, 179.90, 18.55, 179.90, 9.10, 179.90, 12.66, 173.97, 0.10, 162.75, 0.10, 169.97, 0.10, 15.74, 161.35, 0.10, 179.90, 13.59, 168.26, 14.51, 164.18, 4.85, 170.54, 9.85, 179.90, 17.19, 170.15, 0.10, 178.57, 15.84, 179.90, 0.10, 164.61, 179.90, 0.10, 179.90, 14.37, 163.18, 0.10, 179.90, 0.10, 179.90, 11.26, 171.65, 16.60, 163.07, 0.10, 162.08, 1.82, 175.06, 3.25, 174.03, 0.10, 19.02, 163.24, 0.10, 161.69, 0.10, 179.90, 3.76, 179.90, 17.06, 179.90, 0.10, 179.90, 4.95, 179.90, 0.10, 171.87, 0.10, 179.90, 0.10, 179.73, 9.69, 169.97, 0.10, 179.90, 0.10, 179.90, 0.10, 162.46, 0.10, 179.90, 0.10, 173.93, 0.10, 179.90, 9.44, 176.48, 0.10, 179.90, 19.36, 179.90, 179.90, 13.40, 161.15, 2.71, 179.90, 0.10, 179.90, 19.69, 167.01, 17.73, 178.42, 0.10, 179.90, 3.85, 179.90, 11.06, 179.90, 0.10, 176.48, 0.10, 8.55, 171.45, 0.10, 177.14, 15.85, 179.90, 17.66, 179.90, 16.57, 179.90, 12.17, 167.22, 14.57, 161.85, 3.68, 179.90, 10.62, 179.90, 0.10, 179.25, 169.66, 16.54, 162.48, 8.86, 179.90, 0.10, 171.40, 7.16, 163.50, 2.26, 179.90, 10.70, 179.90, 17.75, 179.90, 0.10, 162.04, 2.39, 169.24, 12.98, 179.90, 0.10, 179.90, 0.74, 179.90, 2.11, 179.90, 0.10, 176.77, 13.57, 179.90, 3.36, 161.80, 0.10, 175.94, 0.10, 179.90, 0.10, 179.90, 0.10, 7.33, 177.22, 0.10, 179.90, 17.83, 166.76, 6.15, 179.90, 10.17, 179.90, 4.68, 179.90, 19.99, 179.90, 0.10, 179.90, 0.80, 167.90, 0.10, 160.11, 179.90, 0.10, 177.02, 0.10, 160.85, 15.37, 172.10, 0.10, 179.90, 0.10, 179.90, 6.64, 174.00, 0.10, 179.90, 4.89, 161.39, 19.05, 179.08, 0.10, 0.66, 175.23, 13.04, 179.90, 0.10, 164.13, 10.75, 172.29, 0.10, 166.06, 1.29, 179.64, 5.33, 179.90, 0.10, 169.61, 0.10, 179.90, 0.10, 164.41, 163.61, 0.10, 171.68, 0.10, 167.00, 14.39, 179.90, 0.10, 161.03, 9.66, 179.90, 0.10, 179.90, 9.94, 179.90, 0.10, 161.85, 0.10, 164.03, 0.10, 0.54, 179.90, 0.10, 166.88, 4.78, 174.47, 0.10, 164.85, 3.93, 174.25, 13.11, 179.90, 10.38, 161.50, 0.10, 177.10, 3.70, 178.82, 12.60, 169.18, 13.10, 164.44, 4.87, 179.90, 19.83, 179.90, 0.10, 179.90, 9.30, 174.20, 0.10, 179.90, 0.10, 168.28, 0.10, 179.90, 14.56, 179.90, 0.10, 177.24, 163.63, 7.31, 167.47, 0.10, 179.90, 12.72, 179.90, 3.90, 179.90, 0.22, 179.90, 0.10, 179.90, 18.30, 179.90, 12.98, 177.90, 16.09, 171.93, 0.10, 162.84, 0.10, 179.90, 0.10, 172.58, 0.10, 179.90, 15.64, 161.87, 0.10, 179.90, 0.10, 170.72, 0.10, 179.90, 0.10, 179.90, 5.65, 179.90, 0.10, 168.00, 0.10, 179.90, 0.10, 179.90, 0.10, 160.54, 0.10, 172.63, 0.10, 178.83, 12.22, 176.19, 9.77, 179.90, 12.93, 179.90, 0.10, 179.90, 18.40, 179.90, 0.10, 174.51, 0.10, 160.40, 0.10, 179.90, 0.10, 172.14, 0.10, 179.90, 0.10, 161.03, 0.10, 176.03, 0.10, 179.90, 0.10, 176.04, 0.10, 162.53, 0.10, 160.91, 0.10, 176.37, 10.23, 175.33, 0.10, 175.70, 0.10, 166.34, 15.72, 179.90, 5.09, 176.75, 0.52, 179.90, 1.97, 170.32, 18.32, 165.89, 0.10, 168.50, 17.82, 164.25, 2.88, 160.82, 17.87, 173.86, 13.36, 179.90, 0.10, 179.90, 2.55, 179.90, 0.10, 169.54, 0.10, 179.90, 15.20, 17.40, 179.90, 18.74, 179.90, 0.10, 161.22, 0.10, 179.90, 18.42, 170.12, 8.82, 164.12, 17.97, 179.90, 18.29, 179.90, 3.83, 179.90, 9.48, 169.54, 0.10, 179.90, 0.10, 170.77, 13.62, 179.90, 0.10, 179.90, 0.10, 164.64, 4.18, 161.42, 0.10, 166.22, 0.10, 164.02, 0.10, 179.90, 0.10, 179.90, 10.64, 164.72, 2.90, 179.90, 0.10, 179.90, 10.00, 175.62, 11.08, 179.90, 0.10, 174.79, 11.64, 179.90, 2.64, 179.90, 9.90, 160.38, 0.10, 179.90, 167.54, 9.92, 160.49, 6.26, 161.91, 0.10, 179.89, 13.33, 179.90, 14.86, 179.90, 7.05, 165.68, 0.10, 179.90, 9.92, 165.70, 2.09, 166.60, 0.10, 0.10, 170.61, 0.10, 179.90, 0.10, 171.91, 17.96, 179.90, 15.67, 179.90, 6.06, 177.94, 3.38, 179.90, 18.01, 168.87, 16.39, 179.90, 0.35, 176.39, 170.88, 0.10, 169.26, 19.67, 179.90, 0.10, 175.08, 17.70, 168.99, 18.36, 179.90, 3.01, 169.84, 0.10, 160.36, 0.10, 179.90, 0.10, 168.95, 6.73, 15.79, 179.90, 7.53, 164.67, 11.59, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 170.23, 0.10, 176.67, 0.10, 167.41, 0.10, 167.94, 0.10, 179.90, 0.10, 164.48, 3.72, 179.90, 0.10, 179.90, 8.12, 179.90, 14.73, 179.90, 0.10, 176.60, 0.10, 177.76, 12.99, 179.90, 18.69, 164.25, 3.41, 179.90, 0.10, 170.04, 0.10, 167.64, 6.02, 169.46, 4.18, 162.08, 0.10, 179.90, 0.10, 176.85, 5.97, 179.15, 4.06, 168.50, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 2.35, 179.90, 0.10, 179.90, 0.10, 162.27, 0.10, 179.90, 0.10, 166.25, 0.10, 0.10, 168.33, 0.10, 175.21, 0.10, 179.90, 0.10, 179.90, 7.55, 179.90, 11.32, 179.90, 0.10, 171.36, 0.10, 177.80, 0.10, 179.90, 0.10, 179.90, 179.90, 1.77, 163.48, 0.92, 179.90, 0.10, 179.90, 16.41, 163.32, 14.78, 179.90, 19.57, 179.90, 4.84, 176.45, 3.27, 179.90, 0.10, 171.26, 12.47, 179.90, 0.10, 179.90, 0.10, 169.48, 11.89, 167.55, 3.01, 167.93, 0.10, 179.90, 0.10, 178.66, 0.10, 160.77, 1.08, 178.80, 0.10, 167.60, 0.10, 0.10, 179.90, 0.10, 160.90, 0.10, 176.30, 0.10, 179.90, 12.20, 179.90, 8.59, 179.83, 14.76, 163.32, 12.53, 160.72, 12.82, 173.63, 0.10, 179.90, 179.90, 7.89, 162.12, 0.10, 166.35, 0.10, 179.90, 0.10, 179.90, 5.23, 179.90, 0.10, 176.81, 6.96, 179.90, 0.10, 179.90, 5.94, 170.56, 0.10, 0.10, 177.82, 18.98, 179.90, 19.80, 166.05, 10.74, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 162.59, 14.09, 169.96, 19.44, 179.90, 2.14, 171.96, 14.64, 165.82, 0.10, 162.34, 6.38, 179.90, 4.51, 179.90, 19.58, 179.90, 1.97, 179.64, 13.00, 173.34, 0.10, 179.90, 10.40, 179.90, 2.60, 162.06, 4.71, 160.12, 0.10, 171.20, 13.71, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 14.75, 179.90, 0.10, 179.90, 0.10, 169.83, 17.72, 179.90, 2.34, 179.90, 4.37, 177.94, 2.61, 179.90, 10.32, 172.44, 0.10, 174.60, 0.10, 179.90, 0.10, 165.72, 11.00, 179.90, 1.25, 179.90, 14.17, 179.90, 17.15, 179.90, 3.55, 179.90, 0.10, 179.90, 0.10, 179.60, 0.10, 179.90, 1.50, 179.90, 10.85, 179.90, 0.10, 174.29, 18.60, 170.76, 0.10, 171.13, 179.90, 0.10, 178.33, 0.10, 179.90, 9.03, 176.55, 0.10, 179.90, 14.10, 170.66, 0.10, 179.90, 8.72, 179.90, 8.00, 179.90, 0.10, 179.90, 0.10, 0.10, 166.38, 0.10, 179.90, 4.97, 178.91, 0.10, 176.59, 0.10, 179.90, 8.18, 179.90, 0.10, 179.90, 10.21, 176.53, 13.35, 161.94, 9.33, 179.90, 0.10, 179.90, 1.71, 169.94, 10.31, 166.10, 18.38, 162.99, 5.92, 179.90, 0.10, 179.90, 0.10, 175.91, 0.12, 179.90, 0.10, 165.60, 0.10, 177.35, 179.64, 0.10, 179.90, 1.55, 179.90, 0.10, 179.40, 5.04, 179.90, 6.10, 177.26, 0.10, 179.90, 3.83, 160.79, 0.10, 179.90, 0.10, 177.78, 0.10, 179.90, 0.10, 166.40, 6.34, 179.90, 0.10, 179.90, 19.30, 179.90, 0.10, 179.90, 11.23, 176.57, 0.10, 179.90, 0.10, 177.56, 0.10, 176.02, 13.16, 19.70, 179.90, 6.67, 172.72, 10.88, 168.99, 0.10, 179.90, 0.10, 179.17, 0.10, 179.90, 0.10, 171.32, 11.85, 160.67, 17.71, 179.90, 9.77, 179.90, 0.10, 179.90, 17.81, 179.90, 4.05, 179.90, 0.10, 174.13, 15.17, 179.90, 16.19, 179.90, 18.81, 168.05, 0.10, 179.90, 0.10, 170.42, 7.14, 168.85, 0.10, 170.24, 8.40, 173.08, 18.35, 179.90, 0.10, 179.90, 0.10, 164.49, 0.10, 165.57, 0.10, 160.92, 0.10, 165.24, 0.10, 179.90, 9.61, 179.90, 0.10, 179.90, 0.10, 179.90, 13.94, 171.43, 18.45, 165.99, 0.10, 179.90, 0.10, 162.37, 10.81, 179.90, 0.10, 167.76, 0.10, 179.62, 18.36, 175.13 };
//double[] tempTargetVars2 = new double[810] { 18.61, 179.90, 3.96, 175.22, 0.10, 179.90, 4.16, 169.15, 0.10, 179.90, 0.10, 164.29, 10.61, 162.49, 0.10, 179.90, 3.95, 179.90, 11.54, 166.69, 14.84, 179.90, 0.10, 176.02, 0.10, 169.01, 0.10, 179.90, 0.10, 167.36, 0.10, 176.53, 0.10, 172.18, 19.71, 169.20, 0.10, 166.36, 14.75, 165.14, 12.44, 165.21, 0.10, 179.90, 0.10, 0.10, 179.90, 0.10, 166.50, 0.10, 179.90, 18.66, 162.88, 16.03, 179.90, 4.97, 179.90, 2.67, 179.90, 2.44, 0.10, 179.90, 17.55, 179.90, 10.61, 179.90, 9.82, 179.90, 4.91, 179.90, 0.10, 179.90, 13.90, 164.93, 0.10, 0.10, 179.90, 0.10, 165.80, 0.10, 173.86, 1.82, 169.38, 18.02, 170.58, 0.10, 164.29, 5.35, 173.47, 18.70, 160.66, 0.10, 179.90, 18.11, 176.13, 17.25, 179.90, 0.10, 169.08, 2.67, 179.90, 16.71, 179.90, 15.95, 170.23, 179.90, 0.10, 179.90, 10.56, 164.08, 6.31, 163.91, 0.10, 179.90, 4.11, 179.90, 12.63, 175.73, 8.61, 161.72, 0.10, 173.58, 8.68, 179.90, 0.10, 166.78, 2.50, 174.29, 0.10, 169.17, 0.10, 179.90, 0.10, 167.97, 11.40, 179.90, 1.25, 175.00, 4.63, 179.90, 0.10, 179.90, 12.66, 163.11, 0.10, 174.75, 0.10, 178.15, 0.10, 179.90, 163.90, 2.31, 178.86, 13.35, 160.20, 0.10, 167.87, 11.37, 179.90, 16.17, 179.90, 0.10, 179.90, 15.96, 179.90, 179.90, 12.83, 160.35, 16.08, 178.18, 0.10, 177.46, 7.82, 179.90, 4.47, 165.28, 0.10, 177.81, 17.46, 179.90, 164.69, 0.10, 169.38, 4.33, 179.90, 0.10, 168.64, 12.61, 179.90, 2.27, 179.90, 6.84, 167.24, 0.10, 179.90, 177.05, 16.45, 177.81, 0.10, 162.34, 0.10, 168.31, 0.10, 179.90, 0.10, 178.77, 0.10, 179.90, 12.94, 165.90, 0.10, 170.61, 0.10, 179.90, 0.10, 179.90, 0.10, 171.64, 0.10, 179.90, 0.10, 165.31, 0.10, 179.90, 16.15, 0.10, 164.13, 0.10, 179.46, 5.17, 179.90, 0.10, 179.90, 0.10, 168.08, 0.10, 164.95, 0.10, 162.38, 10.67, 160.32, 18.36, 179.90, 0.10, 178.64, 7.73, 176.39, 0.26, 179.90, 16.41, 175.41, 6.14, 179.71, 0.10, 179.90, 0.10, 163.93, 0.10, 179.90, 0.10, 179.90, 0.10, 177.66, 16.10, 179.90, 0.10, 179.90, 5.78, 172.49, 0.10, 179.51, 0.10, 179.90, 0.10, 179.31, 9.60, 179.90, 0.33, 176.90, 0.37, 179.90, 1.73, 179.90, 12.07, 179.90, 0.10, 172.51, 0.10, 170.68, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 13.79, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 172.78, 4.59, 173.32, 17.29, 179.90, 13.38, 177.74, 0.10, 176.54, 0.10, 161.01, 0.10, 179.90, 18.33, 179.90, 0.10, 179.90, 19.71, 179.90, 6.80, 175.41, 0.10, 171.44, 12.30, 163.28, 17.61, 0.10, 175.38, 2.44, 179.57, 0.10, 179.90, 19.79, 177.26, 15.55, 179.90, 0.10, 176.28, 0.67, 162.54, 0.10, 18.30, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 175.50, 0.10, 177.46, 3.25, 162.44, 18.97, 179.90, 2.52, 0.10, 179.90, 13.32, 175.00, 0.10, 167.11, 5.85, 169.41, 0.10, 173.64, 0.10, 169.07, 16.75, 179.90, 0.10, 179.90, 13.27, 163.29, 0.10, 179.90, 5.05, 165.28, 0.10, 170.75, 12.06, 179.66, 16.93, 168.16, 0.10, 179.90, 0.10, 164.07, 0.23, 178.20, 0.10, 173.22, 11.63, 179.90, 15.52, 164.23, 0.10, 179.90, 0.10, 173.61, 11.72, 0.10, 179.90, 17.01, 179.90, 16.73, 179.90, 5.84, 179.90, 0.10, 179.90, 0.10, 170.94, 0.10, 166.98, 0.10, 163.80, 0.10, 171.09, 0.10, 179.90, 0.10, 179.90, 0.10, 166.49, 0.10, 168.82, 0.10, 165.64, 19.11, 179.90, 161.92, 12.80, 169.91, 14.87, 179.90, 0.10, 162.98, 0.10, 179.90, 0.45, 179.90, 0.10, 179.90, 0.10, 173.53, 178.22, 11.35, 179.90, 8.68, 179.90, 0.10, 172.81, 18.69, 167.75, 0.10, 179.90, 11.70, 179.90, 0.10, 167.75, 161.65, 4.47, 164.14, 0.10, 179.90, 0.10, 179.90, 0.10, 170.40, 19.93, 174.47, 0.10, 164.64, 4.28, 175.93, 0.10, 173.65, 19.65, 178.51, 0.10, 179.90, 0.10, 178.34, 0.10, 179.90, 0.10, 179.90, 10.20, 170.14, 0.10, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 12.79, 179.90, 0.10, 173.34, 16.47, 179.90, 10.23, 179.25, 9.81, 179.90, 12.64, 179.90, 1.07, 179.90, 0.10, 179.90, 8.27, 179.90, 0.10, 164.57, 12.03, 179.90, 2.14, 179.90, 8.63, 179.90, 0.10, 169.18, 19.64, 179.90, 9.40, 179.90, 0.10, 179.90, 13.38, 175.47, 0.10, 179.90, 0.10, 0.10, 167.21, 0.10, 178.04, 13.54, 179.90, 0.10, 167.69, 17.30, 179.90, 6.59, 179.90, 0.23, 179.90, 0.10, 0.10, 179.90, 0.10, 174.52, 6.11, 166.63, 0.10, 179.90, 6.86, 178.84, 16.88, 176.94, 6.67, 179.90, 3.26, 168.50, 0.10, 175.01, 0.10, 164.90, 8.61, 179.90, 12.95, 171.51, 15.95, 173.82, 19.41, 179.90, 5.46, 179.90, 18.13, 179.90, 0.10, 179.90, 19.63, 179.90, 10.01, 160.44, 3.93, 179.90, 2.00, 179.90, 16.92, 179.90, 1.71, 0.10, 179.90, 0.10, 173.16, 0.10, 179.90, 0.10, 164.27, 0.10, 170.56, 18.24, 160.05, 15.13, 179.90, 0.10, 2.74, 179.90, 0.10, 179.90, 5.33, 176.69, 10.42, 179.90, 0.10, 168.86, 15.22, 179.90, 19.72, 179.90, 0.10, 0.10, 179.90, 0.10, 166.19, 10.53, 179.90, 0.10, 162.03, 7.45, 160.50, 0.10, 174.38, 18.07, 169.53, 0.10, 17.76, 179.90, 9.50, 179.90, 0.10, 179.90, 14.85, 179.90, 0.10, 179.46, 0.10, 175.64, 0.10, 179.90, 13.20, 179.90, 8.04, 179.90, 3.66, 175.42, 9.33, 172.87, 0.10, 179.90, 17.60, 179.90, 0.10, 179.90, 14.00, 168.63, 179.90, 0.10, 179.90, 1.00, 179.90, 15.17, 163.97, 0.10, 172.52, 6.09, 176.84, 18.52, 179.90, 0.10, 172.47, 179.90, 0.10, 179.90, 18.18, 171.71, 6.86, 176.83, 0.10, 179.90, 0.10, 179.90, 0.10, 178.63, 7.01, 179.90, 178.08, 2.12, 171.29, 2.09, 163.21, 0.10, 179.90, 16.18, 179.01, 18.14, 179.90, 3.49, 168.60, 8.23, 179.90, 14.35, 170.16, 0.10, 165.01, 0.10, 179.90, 1.76, 179.90, 12.26, 161.00, 9.39, 179.90, 12.59, 169.37, 0.10, 179.90, 2.22, 165.56, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 168.31, 19.29, 179.27, 0.10, 170.02, 160.96, 0.10, 169.68, 0.56, 173.28, 0.10, 174.90, 18.95, 167.55, 0.84, 179.90, 0.10, 179.90, 15.53, 166.23, 0.10, 179.90, 16.37, 167.89, 14.53, 167.42, 0.10, 170.57, 7.73, 173.36, 7.54, 163.32, 0.10, 171.79, 17.12, 0.10, 163.89, 0.10, 177.82, 0.10, 171.61, 0.10, 166.64, 1.42, 179.90, 0.10, 167.59, 0.10, 175.86, 0.10, 161.52, 13.06, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 5.05, 179.90, 16.53, 179.90, 0.10, 161.94 };
//double[] tempTargetVars2 = new double[810] { 0.10, 150.55, 0.10, 179.90, 0.10, 166.35, 29.68, 161.39, 9.90, 163.67, 8.06, 156.30, 0.10, 173.64, 15.70, 8.97, 165.29, 0.10, 174.88, 6.26, 155.44, 0.10, 167.34, 0.10, 179.90, 20.13, 179.90, 0.10, 163.41, 0.10, 179.90, 0.26, 179.90, 25.91, 172.83, 0.10, 179.90, 0.10, 179.90, 9.30, 156.16, 1.84, 161.30, 0.10, 164.07, 6.58, 179.90, 20.99, 172.78, 14.87, 179.90, 18.68, 176.04, 11.58, 179.90, 26.39, 154.37, 19.08, 179.90, 0.10, 10.65, 157.75, 0.10, 179.90, 7.03, 179.90, 24.01, 179.90, 5.27, 176.95, 17.32, 175.55, 16.31, 179.90, 21.21, 29.16, 171.86, 26.23, 159.58, 28.60, 153.30, 26.46, 179.90, 0.10, 179.28, 10.01, 154.19, 15.29, 151.64, 1.03, 12.37, 160.69, 0.10, 178.70, 19.06, 164.07, 11.44, 179.90, 0.10, 175.60, 0.10, 157.62, 0.10, 179.90, 15.08, 4.51, 166.16, 26.69, 179.90, 15.80, 166.63, 1.10, 179.90, 10.16, 167.95, 0.10, 168.97, 13.86, 170.96, 0.10, 158.35, 0.10, 154.03, 0.10, 179.90, 0.10, 179.90, 2.70, 179.90, 0.10, 179.90, 0.10, 179.90, 10.42, 166.87, 153.39, 0.10, 169.10, 0.10, 179.90, 0.10, 165.78, 16.91, 173.68, 23.30, 161.26, 18.19, 179.90, 24.12, 173.94, 154.70, 29.74, 170.26, 0.10, 179.90, 17.40, 159.70, 28.87, 179.89, 0.10, 176.21, 0.10, 179.90, 21.62, 175.11, 0.10, 179.90, 5.78, 179.90, 2.76, 179.90, 0.10, 179.90, 16.41, 169.24, 24.00, 175.70, 0.10, 179.37, 20.75, 179.90, 4.73, 157.25, 10.64, 179.90, 1.58, 179.90, 12.91, 166.66, 0.10, 169.42, 16.81, 157.09, 0.10, 163.94, 158.68, 25.16, 174.74, 24.08, 160.50, 13.19, 171.67, 0.10, 158.75, 8.15, 160.29, 9.73, 175.57, 0.10, 155.15, 172.90, 17.68, 154.01, 11.70, 179.90, 8.52, 179.90, 0.10, 166.45, 20.99, 172.67, 5.18, 150.21, 3.14, 170.33, 179.90, 0.10, 176.59, 0.10, 156.95, 0.10, 170.30, 0.10, 167.46, 8.79, 174.64, 0.10, 179.90, 19.53, 171.18, 165.40, 15.51, 157.78, 11.22, 179.90, 0.10, 179.90, 0.10, 179.90, 25.35, 158.15, 6.88, 168.59, 24.51, 175.75, 16.10, 153.31, 15.39, 161.05, 0.10, 179.90, 0.10, 175.61, 0.10, 168.73, 0.10, 164.08, 0.10, 165.97, 15.83, 161.14, 0.10, 179.90, 8.48, 177.97, 29.71, 179.90, 23.50, 172.99, 0.10, 161.63, 0.10, 169.18, 0.10, 173.03, 179.90, 1.08, 164.39, 0.10, 179.90, 29.88, 179.90, 0.10, 162.56, 0.10, 179.90, 10.52, 179.06, 26.50, 179.90, 10.53, 179.90, 21.66, 170.00, 0.10, 177.63, 0.10, 161.05, 18.67, 167.17, 0.10, 179.90, 3.56, 156.75, 3.32, 179.90, 0.10, 179.90, 0.10, 179.90, 4.88, 158.11, 0.10, 179.90, 18.59, 179.90, 0.10, 163.99, 21.01, 164.99, 29.72, 154.61, 28.57, 179.90, 6.45, 178.16, 0.10, 179.90, 7.11, 157.90, 6.52, 179.90, 15.67, 179.90, 0.10, 0.10, 176.97, 4.35, 179.90, 3.66, 175.37, 23.28, 179.90, 0.10, 156.19, 0.10, 167.35, 0.10, 179.90, 0.10, 157.33, 0.10, 175.03, 10.93, 179.90, 0.10, 160.81, 0.10, 179.90, 14.61, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 171.12, 8.91, 179.90, 26.27, 161.06, 21.86, 166.13, 1.97, 150.01, 0.10, 168.70, 27.79, 179.90, 0.99, 179.90, 16.31, 179.90, 0.10, 179.90, 0.10, 179.90, 21.19, 179.24, 13.49, 155.10, 10.36, 179.90, 14.50, 158.05, 164.75, 4.78, 152.62, 0.10, 163.16, 0.10, 172.56, 17.43, 179.90, 12.85, 155.75, 21.15, 179.90, 0.10, 179.90, 0.10, 179.90, 9.13, 150.96, 29.34, 155.82, 23.15, 179.90, 0.10, 179.90, 6.68, 179.90, 0.10, 179.90, 14.12, 165.29, 0.10, 179.90, 15.26, 160.02, 22.50, 174.88, 0.10, 173.46, 5.82, 179.90, 6.91, 171.59, 0.10, 173.55, 28.70, 156.57, 0.10, 179.90, 0.10, 179.90, 27.94, 155.12, 19.78, 151.98, 0.10, 154.43, 16.34, 179.90, 0.10, 179.90, 1.81, 163.67, 22.27, 172.99, 0.10, 178.64, 0.10, 151.71, 24.51, 179.90, 24.82, 179.90, 0.10, 178.99, 160.46, 15.76, 179.90, 0.54, 179.90, 0.10, 157.78, 0.10, 179.90, 0.10, 163.63, 27.24, 179.19, 27.51, 155.71, 170.16, 27.08, 168.78, 0.10, 179.90, 22.51, 153.47, 0.10, 179.90, 16.49, 179.90, 0.10, 179.90, 10.79, 175.90, 178.76, 27.95, 179.90, 0.10, 172.55, 0.10, 165.86, 28.40, 173.50, 4.45, 179.90, 29.18, 177.45, 0.10, 179.90, 15.59, 179.90, 18.20, 176.32, 17.58, 168.77, 26.46, 178.04, 27.18, 173.75, 5.21, 168.56, 22.02, 169.99, 12.29, 174.16, 12.67, 179.90, 0.10, 179.90, 0.10, 170.55, 16.31, 179.90, 11.02, 179.90, 0.10, 179.90, 20.20, 165.64, 3.90, 176.88, 18.17, 179.90, 25.25, 155.03, 0.10, 171.71, 0.10, 178.28, 20.91, 179.90, 0.10, 175.98, 6.00, 11.49, 161.56, 22.27, 179.90, 0.10, 178.45, 4.20, 179.90, 4.32, 179.90, 7.47, 179.90, 0.30, 174.02, 10.03, 0.10, 163.83, 0.10, 155.31, 0.10, 179.90, 24.41, 179.90, 0.10, 153.41, 0.10, 166.38, 0.10, 179.90, 20.42, 170.59, 9.81, 174.99, 1.57, 169.95, 0.10, 175.12, 13.16, 169.09, 6.55, 179.21, 0.10, 179.90, 0.10, 179.90, 179.90, 12.39, 179.90, 23.62, 175.62, 28.41, 179.90, 26.35, 179.90, 28.24, 157.51, 20.35, 179.90, 0.10, 179.90, 155.80, 19.97, 179.90, 18.98, 179.72, 13.13, 179.90, 19.89, 168.20, 18.04, 175.30, 12.20, 167.39, 11.95, 176.11, 8.54, 179.90, 0.10, 159.54, 0.10, 179.90, 19.96, 179.90, 29.85, 179.90, 6.88, 177.31, 19.96, 179.90, 0.10, 9.99, 161.26, 0.10, 153.60, 5.43, 156.04, 15.71, 179.78, 0.10, 179.90, 7.41, 176.21, 0.10, 159.19, 15.94, 14.40, 179.90, 21.52, 171.41, 3.96, 151.34, 13.04, 179.90, 20.61, 177.76, 0.10, 171.49, 13.06, 163.93, 0.10, 4.14, 151.53, 0.10, 152.48, 0.10, 171.14, 0.10, 159.18, 1.69, 179.90, 6.69, 179.90, 17.49, 179.90, 0.10, 169.74, 0.10, 171.34, 0.10, 161.10, 28.41, 165.62, 0.10, 179.90, 28.66, 179.90, 1.44, 154.62, 0.10, 179.90, 157.96, 0.10, 179.90, 0.10, 171.73, 13.80, 175.07, 0.10, 159.49, 0.10, 152.26, 18.47, 155.36, 0.10, 152.00, 179.90, 19.72, 176.57, 24.01, 170.69, 24.18, 179.90, 0.10, 179.90, 23.66, 165.45, 0.10, 164.02, 5.67, 171.87, 29.92, 173.30, 0.10, 178.01, 27.86, 171.91, 0.35, 179.90, 12.24, 175.02, 11.71, 150.61, 6.94, 164.32, 0.10, 179.90, 3.83, 179.90, 21.84, 169.98, 0.10, 151.04, 0.10, 162.68, 17.10, 179.90, 11.51, 156.83, 0.10, 178.46, 0.10, 172.15, 3.11, 168.13, 26.77, 160.99, 0.10, 168.28, 0.10, 150.21, 0.19, 179.90, 15.94, 179.90, 21.25, 167.05, 29.34, 154.08, 23.62, 179.90, 0.10, 151.11, 12.52, 150.36, 0.10, 179.90, 23.76, 179.90, 1.10, 179.90 };
//double[] tempTargetVars2 = new double[540] { 179.90, 0.19, 151.70, 0.10, 169.08, 11.93, 162.17, 0.10, 153.16, 0.10, 168.02, 2.80, 179.90, 22.04, 172.93, 27.73, 170.78, 27.02, 179.90, 24.48, 150.17, 4.56, 160.94, 8.37, 179.90, 0.10, 166.75, 0.10, 162.16, 0.10, 151.43, 0.10, 175.76, 27.19, 179.90, 5.69, 157.92, 28.58, 179.52, 2.08, 178.44, 28.92, 152.72, 22.33, 161.93, 5.31, 150.71, 19.40, 174.64, 8.59, 174.69, 0.10, 179.90, 5.33, 161.98, 0.10, 179.90, 0.10, 177.63, 17.30, 179.90, 22.85, 179.90, 19.37, 162.64, 0.10, 159.95, 22.36, 165.76, 12.20, 179.90, 0.10, 150.33, 0.10, 159.97, 5.30, 179.90, 15.62, 157.88, 0.10, 174.51, 12.00, 179.90, 0.10, 179.90, 0.10, 179.90, 12.60, 162.85, 17.74, 3.84, 179.90, 8.35, 179.90, 15.77, 150.03, 0.10, 179.90, 9.00, 179.90, 172.38, 10.30, 179.90, 0.10, 179.90, 17.57, 168.79, 20.61, 163.20, 0.10, 168.04, 0.10, 150.80, 12.42, 179.90, 25.33, 175.27, 24.40, 179.90, 11.05, 0.19, 179.90, 0.10, 179.90, 15.15, 176.10, 26.80, 179.90, 0.10, 173.18, 179.90, 0.10, 179.90, 0.10, 170.24, 5.56, 167.85, 0.10, 158.03, 0.10, 168.17, 20.69, 150.36, 12.80, 179.90, 27.11, 161.31, 1.93, 171.96, 0.10, 6.31, 179.90, 9.54, 150.06, 0.10, 151.81, 28.81, 179.90, 21.50, 179.90, 179.90, 0.12, 179.90, 5.04, 179.90, 7.90, 179.90, 2.06, 179.90, 0.10, 0.10, 152.92, 0.10, 176.30, 0.10, 171.77, 0.10, 170.84, 0.10, 166.68, 11.90, 152.41, 0.10, 179.90, 20.88, 179.90, 0.10, 179.90, 20.94, 179.90, 0.10, 179.90, 0.10, 179.90, 5.24, 178.28, 16.32, 160.80, 0.10, 179.90, 179.90, 8.57, 179.90, 8.47, 160.64, 1.72, 179.90, 14.55, 166.88, 0.10, 17.72, 179.90, 4.33, 175.08, 0.10, 179.90, 0.10, 179.90, 26.66, 171.64, 167.03, 12.27, 179.90, 28.98, 172.86, 0.10, 160.94, 9.96, 166.17, 0.10, 164.96, 0.10, 154.63, 0.10, 179.90, 17.02, 164.26, 0.10, 179.90, 21.24, 179.90, 0.10, 174.73, 23.38, 179.90, 7.18, 152.35, 3.52, 171.56, 0.10, 19.87, 155.47, 0.10, 175.53, 9.57, 179.90, 21.11, 179.90, 17.55, 157.03, 1.73, 179.90, 14.97, 173.53, 3.10, 176.03, 22.21, 179.90, 17.17, 179.90, 179.90, 0.10, 179.43, 21.41, 171.36, 11.29, 153.74, 10.40, 179.90, 1.09, 151.49, 19.98, 167.76, 11.66, 167.76, 0.10, 166.08, 0.10, 171.79, 1.88, 5.72, 179.90, 28.97, 159.71, 15.18, 156.45, 0.10, 179.90, 0.10, 179.90, 9.08, 179.37, 19.48, 179.90, 4.24, 155.86, 4.66, 173.79, 26.26, 172.74, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 156.96, 3.23, 179.90, 179.90, 0.10, 154.64, 18.79, 157.76, 0.10, 177.35, 26.33, 179.90, 5.53, 162.03, 0.10, 179.90, 29.98, 179.90, 0.10, 179.90, 0.10, 179.90, 28.25, 24.46, 179.90, 17.81, 179.90, 27.22, 177.48, 0.10, 174.66, 0.10, 179.90, 0.10, 179.90, 0.10, 179.90, 1.17, 179.90, 3.64, 179.90, 0.10, 165.25, 0.10, 170.93, 20.20, 155.78, 0.10, 179.90, 0.10, 160.83, 0.10, 179.90, 179.90, 0.10, 179.90, 0.10, 179.90, 0.10, 153.52, 22.24, 155.58, 25.33, 11.74, 179.90, 25.44, 171.84, 0.10, 179.90, 0.10, 171.49, 0.10, 179.90, 20.23, 179.90, 0.10, 160.11, 17.03, 177.92, 18.06, 164.35, 5.22, 179.90, 0.10, 159.42, 14.12, 179.90, 0.10, 166.63, 0.10, 179.90, 0.10, 179.90, 173.47, 0.10, 179.90, 2.58, 165.46, 8.70, 179.90, 0.10, 160.50, 23.50, 165.76, 0.89, 176.14, 12.90, 179.90, 18.53, 179.90, 0.10, 165.77, 0.10, 175.72, 0.10, 179.90, 10.71, 175.40, 20.93, 173.33, 5.27, 152.25, 0.10, 179.90, 7.88, 161.49, 2.91, 170.07, 23.36, 179.90, 2.19, 165.41, 0.10, 19.32, 179.90, 0.10, 151.29, 0.10, 164.24, 26.20, 157.14, 7.83, 175.59, 179.90, 0.10, 179.90, 24.40, 179.90, 10.64, 170.81, 0.10, 176.87, 0.10, 0.10, 156.35, 0.10, 157.20, 0.21, 179.90, 17.52, 179.90, 25.18, 160.56, 0.86, 179.57, 25.21, 178.54, 0.10, 179.90, 12.32, 173.87, 0.10, 179.90, 179.90, 0.10, 179.90, 0.10, 170.17, 0.10, 167.01, 0.10, 179.90, 2.20, 0.10, 179.90, 1.40, 168.23, 9.17, 179.90, 12.28, 179.90, 17.68, 177.45, 179.90, 25.65, 179.90, 0.10, 163.10, 16.50, 167.37, 15.87, 156.96, 5.06, 4.44, 175.39, 0.10, 179.90, 21.09, 159.91, 0.10, 158.82, 19.21, 179.90, 179.90, 0.10, 151.41, 0.10, 173.19, 0.10, 179.22, 13.44, 179.90, 8.15 };
double[] tempTargetVars2 = new double[540] { 178.58, 0.10, 179.90, 18.09, 140.50, 14.83, 179.90, 1.65, 147.35, 15.66, 179.90, 0.10, 179.90, 0.10, 145.46, 0.10, 136.35, 30.55, 135.19, 40.35, 142.03, 21.42, 145.95, 0.10, 174.39, 48.99, 154.45, 48.63, 179.90, 32.07, 47.57, 176.37, 0.10, 155.55, 0.10, 138.09, 14.07, 154.54, 35.92, 137.19, 27.30, 148.03, 34.10, 179.90, 0.10, 171.59, 0.10, 160.69, 8.62, 138.04, 142.22, 42.03, 179.90, 21.07, 151.29, 11.64, 150.27, 31.63, 143.76, 43.99, 0.10, 170.52, 0.10, 179.90, 2.41, 159.09, 0.10, 145.44, 14.15, 179.90, 38.54, 159.34, 8.58, 130.89, 7.65, 179.90, 0.10, 179.90, 13.28, 154.58, 137.15, 41.03, 142.98, 0.10, 155.87, 0.10, 160.45, 0.10, 167.86, 0.10, 13.47, 169.00, 0.10, 131.44, 0.10, 179.90, 0.10, 143.11, 21.48, 135.78, 157.06, 5.65, 163.84, 20.74, 179.90, 45.05, 179.90, 9.08, 159.69, 0.10, 23.52, 164.14, 8.32, 131.40, 15.15, 179.90, 0.10, 179.90, 1.89, 138.06, 0.10, 142.16, 10.29, 150.92, 6.24, 179.90, 0.10, 178.73, 0.10, 136.95, 0.10, 155.91, 0.10, 155.89, 0.10, 171.04, 44.95, 166.42, 44.35, 130.25, 0.10, 165.98, 8.03, 156.06, 0.10, 179.90, 0.10, 151.69, 48.60, 176.55, 163.13, 41.23, 177.92, 14.51, 161.60, 0.10, 179.90, 13.46, 147.79, 0.10, 179.90, 6.59, 143.38, 25.97, 179.90, 21.15, 131.10, 43.81, 175.82, 1.20, 20.69, 161.82, 9.48, 179.90, 3.84, 179.90, 0.10, 144.75, 11.38, 157.01, 0.10, 169.84, 16.45, 142.21, 25.41, 179.63, 0.10, 152.78, 0.10, 149.96, 140.19, 13.93, 179.90, 0.10, 179.90, 38.56, 135.69, 22.31, 143.52, 23.44, 5.39, 150.37, 20.61, 142.94, 38.06, 179.90, 0.10, 172.44, 0.10, 179.90, 156.81, 43.53, 154.64, 0.10, 160.56, 0.10, 149.91, 42.05, 179.90, 1.74, 25.17, 144.77, 15.52, 137.43, 0.10, 179.90, 7.40, 179.90, 49.80, 157.03, 136.78, 17.77, 176.90, 0.10, 178.81, 43.30, 138.55, 49.46, 179.90, 0.10, 0.10, 148.62, 0.10, 179.90, 0.10, 149.24, 0.10, 152.20, 28.14, 179.90, 5.27, 179.90, 0.10, 174.95, 31.20, 179.21, 16.42, 143.27, 30.74, 140.58, 6.53, 166.92, 0.10, 137.95, 38.25, 145.21, 3.94, 136.17, 7.09, 142.11, 174.28, 5.35, 163.73, 38.77, 179.90, 15.70, 161.16, 0.10, 166.00, 18.44, 0.10, 179.90, 23.33, 160.18, 0.10, 165.52, 0.10, 179.90, 0.10, 130.73, 152.60, 18.89, 169.21, 33.19, 170.03, 29.33, 132.03, 30.82, 146.98, 6.36, 179.90, 46.78, 179.90, 3.77, 179.90, 16.29, 157.05, 2.30, 179.90, 45.12, 0.10, 141.81, 33.48, 155.24, 31.13, 162.48, 33.83, 174.69, 10.65, 179.90, 0.10, 131.50, 48.61, 152.86, 18.68, 146.75, 0.10, 171.50, 25.05, 179.90, 45.27, 141.15, 0.10, 157.23, 14.85, 179.90, 18.80, 144.92, 27.90, 179.90, 27.59, 132.43, 9.96, 179.90, 48.16, 179.90, 2.41, 176.98, 0.10, 168.83, 156.60, 0.10, 170.87, 0.10, 136.35, 0.10, 171.85, 0.10, 135.32, 0.10, 179.90, 21.99, 164.38, 25.85, 132.19, 14.20, 179.90, 8.51, 173.12, 0.10, 20.13, 146.35, 32.93, 179.62, 3.48, 137.28, 0.10, 159.71, 42.14, 130.70, 2.05, 140.22, 20.91, 151.41, 21.52, 171.62, 18.97, 141.46, 0.10, 179.90, 39.95, 179.90, 41.86, 133.68, 44.90, 170.43, 28.03, 174.02, 33.30, 179.90, 27.55, 140.20, 0.10, 173.54, 0.10, 164.30, 0.10, 179.90, 36.82, 143.33, 43.03, 159.65, 41.25, 179.90, 36.75, 150.60, 4.24, 179.90, 25.38, 161.54, 6.81, 148.24, 0.10, 179.90, 31.89, 179.90, 46.86, 179.90, 46.80, 174.00, 142.53, 0.10, 179.90, 21.76, 179.90, 4.75, 179.90, 46.97, 179.90, 8.43, 179.90, 0.10, 130.91, 0.10, 167.30, 20.69, 179.90, 0.10, 179.90, 11.00, 130.52, 0.10, 179.90, 16.79, 146.96, 22.42, 179.90, 25.56, 149.84, 43.06, 0.10, 158.67, 0.10, 179.90, 46.60, 155.45, 0.10, 179.90, 0.10, 175.12, 0.10, 179.90, 35.41, 179.90, 13.49, 179.90, 0.10, 132.53, 8.76, 174.83, 179.90, 3.51, 179.90, 0.30, 146.93, 1.76, 169.46, 13.06, 171.08, 41.63, 142.28, 0.10, 148.13, 29.03, 179.90, 0.10, 179.90, 0.10, 179.90, 12.82, 0.10, 148.56, 0.10, 179.90, 17.51, 179.90, 3.70, 168.39, 22.78, 149.93, 179.90, 0.10, 141.84, 20.34, 150.64, 4.51, 138.34, 47.95, 155.97, 45.98, 179.90, 0.10, 164.64, 21.34, 165.95, 15.26, 168.50, 45.72, 179.79, 20.68, 170.60, 41.06, 139.20, 23.40, 145.21, 22.82, 179.90, 35.00, 179.90, 19.47 };
//private string LoadJsonTargetData()
//{
// string jsonData = File.ReadAllText(jsonSaveLoadPath);
// //Debug.Log("Trajectories Loaded!!!");
// return jsonData;
//}
int[] randomTrialOrder = new int[54];
public float[,] Convert2TargetArray(double[] targetAngles) // Formerly: LoadFile() or LoadJsonTargetData()
{
float[,] targetArray = new float[numberOfTrials, numTargets];
// Variables
// Remap target angles into trials and targets
int tri = 0;
int targ = 0;
try
{
for (int i = 0; i < (numberOfTrials*numTargets) -1; i++)
{
targetArray[tri, targ] = (float)targetAngles[i];
//Debug.Log("Idx: " + i + " Ang arr: " + targetAngleTrials[tri, targ]);
targ++;
// Increment tri = trial once every 20 targets
if (targ > numTargets - 1) // expState.numTargets
{
targ = 0;
tri++;
}
}
}
catch(Exception e)
{ Debug.LogError(e); }
return targetArray;
//Debug.Log("Target Data Conversion Complete!!!");
}
private void Awake()
{
targetAngleTrials = new float[numberOfTrials, numTargets];
if (moveTarget)
{
targetAngleTrials = Convert2TargetArray(tempTargetVars2);
}
int[] trialOrder = new int[numberOfTrials];
for (int io = 0; io < trialOrder.Length; io++)
{
trialOrder[io] = io;
}
randomTrialOrder = expState.ShuffleArray(trialOrder);
}
#region Create Target Angles Array Once
//private void Update()
//{
// // OneTime run for ever
// if (Input.GetKeyDown(KeyCode.D) & moveTarget)
// {
// targetArxiv.OneTimeCreateNSave(); // From Scriptable object
// //OR
// //OneTimeCreateNSave(); // From this function
// }
//}
#endregion
private void FixedUpdate() // Formerly "FixedUpdate()"
{
if (moveTarget) // True = This moves the dial target ...
{
if (expState.startTrial[1] == 1) // !moveTargetDial |
{
expState.inTrial = true;
moveTargetRoutine = StartCoroutine(ComplexSine());
expState.startTrial[1] = 0;
}
if (!expState.inTrial | expState.pause)
{
transform.localRotation = Quaternion.Euler(0f, startAngle, 0f);
if (moveTargetRoutine != null)
{
StopCoroutine(moveTargetRoutine);
}
if (moveTargetRoutine2 != null)
{
StopCoroutine(moveTargetRoutine2);
}
}
}
else // ... otherwise this moves the dial itself from hand open-close states
{
if (expState.endTrial) // At the end of the trial freeze the dial to the middle position
{
Quaternion toRot = Quaternion.Euler(0f, 90f, 0f);
transform.localRotation = toRot;
}
else
{
Quaternion toRot = Quaternion.Euler(0f, expState.dialAngle + angularOffset, 0f);
transform.localRotation = toRot;
}
}
}
public IEnumerator ComplexSine()
{
expState.actualTrialNum = randomTrialOrder[expState.currentTrial];
for (int tr = 0; tr < numTargets; tr++)
{
// Load target angle from the json file
val = targetAngleTrials[randomTrialOrder[expState.currentTrial], tr];//targetAngleWave[tr]; //targetArxiv.jsonTargetArchiv.targetAngles[expState.currentTrial, tr];
// Save the actual trial number so that we can know the sequence of trial and match them between participants
moveTargetRoutine2 = StartCoroutine(Rotate(val, rotSpeed, (expState.trialDuration / numTargets)));
yield return new WaitForSecondsRealtime(expState.trialDuration / numTargets);
StopCoroutine(moveTargetRoutine2);
//tdx++;
//preVal = val;
}
yield return null;
}
private IEnumerator Rotate(float targetAngle, float speed, float movementDuration)
{
float duration = 0f;
/*
* The "scaleFrame" variable depends on the angular difference
* between target and init dial angle and the movement duration
* and the frame time (i.e. the frame delta time).
* i.e. by how much do I have to scale the frame delta step in order to make it to the target in time
* The formula to compute this is based on y=mx, where y is the angular difference and x is the movement time
* m is the slope i.e. the scale factor ("scaleFrame") we are after.
* Finally multiply the scale factor by the fixed delta time variable from unity to scale it to a per-frame basis
*/
float angularDifference = Mathf.Abs(targetAngle - transform.localEulerAngles.y);
//float scaleFrame = Time.fixedDeltaTime * (angularDifference/movementDuration);
float scaleFrame = angularDifference / movementDuration;
AnimationCurve curve = expState.BellCurve(movementDuration);
float[] animTime = expState.FloatRange(0f, movementDuration,
Mathf.RoundToInt(movementDuration / Time.fixedDeltaTime));
animCurve = curve;
int idx = 0;
while (movementDuration > duration) // transform.localRotation.y != targetAngle
{
try
{
//transform.localRotation = Quaternion.SlerpUnclamped(transform.localRotation,
// Quaternion.Euler(0f, targetAngle, 0f),
// (curve.Evaluate(animTime[idx]) * speed) *
// (Time.fixedDeltaTime * scaleFrame)); //
transform.localRotation = Quaternion.RotateTowards(transform.localRotation,
Quaternion.Euler(0f, targetAngle, 0f),
(curve.Evaluate(animTime[idx]) + 0.5f * speed) *
(Time.fixedDeltaTime * scaleFrame));
duration += Time.fixedDeltaTime;
idx++;
}
catch { }
yield return null;
}
//transform.localRotation = Quaternion.Euler(0f, targetAngle, 0f);
//Debug.Log("Rotation: " + targetAngle.ToString("F2"));
yield return true;
}
// Unused functions
#region
public IEnumerator SmoothSine()
{
//float[] tempWave = targetWave.targWav[expState.currentTrial];
sineGen.Duration = expState.trialDuration;
if (sineGen.Duration <= 0f)
{
sineGen.Duration = 10f;
}
sineGen.fps = 500f * expState.angularSpeed;
if (sineGen.fps <= 0f)
{
sineGen.fps = 750f;
}
sineGen.sinFreq1 = UnityEngine.Random.Range(3f, 8f);
if (sineGen.sinFreq1 <= 0f)
{
sineGen.sinFreq1 = 4f;
}
sineGen.sinFreq2 = UnityEngine.Random.Range(5f, 11f);
if (sineGen.sinFreq2 <= 0f)
{
sineGen.sinFreq2 = 6f;
}
while (tempWave.Length <= 1)
{
tempWave = sineGen.Init();
yield return null;
}
StartCoroutine(MoveDialRoutine());
tempWave = new float[0]; // Reset the wave variable to zero for the next trial
}
private IEnumerator MoveDialRoutine()
{
int idx = 0;
while (expState.inTrial & idx <= tempWave.Length)
{
try
{
transform.localRotation = Quaternion.Euler(0, tempWave[idx], 0);
idx++;
}
catch (Exception e) { Debug.LogError(e); }
yield return null;
}
}
private float[] RandomizeWaveVars()
{
float amp = UnityEngine.Random.Range(1f, 10f);
float flatness = UnityEngine.Random.Range(-1f, 1f);
float midline = UnityEngine.Random.Range(-5f, 5f);
float[] returnVars = new float[3] { amp, flatness, midline };
return returnVars;
}
public IEnumerator SmoothDial()
{
//expState.startTrial = false;
TargetAngle = UnityEngine.Random.Range(expState.targetRange[0], expState.targetRange[1]);
float dialDiff = TargetAngle - yRot;
if (dialDiff >= 0f)
{
while (yRot < TargetAngle)
{
yRot += expState.angularSpeed;
Quaternion toRot = Quaternion.Euler(0f, yRot, 0f);
transform.localRotation = toRot;
yield return null;
}
}
else //if(dialDiff > 0)
{
while (yRot > TargetAngle)
{
yRot -= expState.angularSpeed;
Quaternion toRot = Quaternion.Euler(0f, yRot, 0f);
transform.localRotation = toRot;
yield return null;
}
}
prevYRot = TargetAngle;
expState.startTrial[1] = 1;
//yield return null;
//moveTargetDial = false; // Short circuit code to repeat this coroutine
}
private void TargetWaveSequencer()
{
// Repeat the below in another embracing for loop to go through as many different versions of sine waves as possible
for (int i = 0; i < ExperimentManagerScript.totalTrialNum; i++)
{
// Select new random parameters for the next sine wave
sineGen.sinFreq1 = UnityEngine.Random.Range(3f, 10f);
sineGen.sinFreq2 = UnityEngine.Random.Range(3f, 10f) + 1f;
int idx = 0;
float[] tempWave = sineGen.Init();
// Init the resultant wave guy
targetWave.targWav = Enumerable.Range(0, ExperimentManagerScript.totalTrialNum)
.Select(j => new float[tempWave.Length])
.ToArray();
foreach (float s in tempWave)
{
targetWave.targWav[i][idx] = s;
idx++;
}
}
}
#endregion
}
// IEnumerator MoveDialRoutine()
//{
//int randRotDirection = UnityEngine.Random.Range(0, 2); // Randomly select which direciton the target should start to rotate
//Quaternion toRot = new Quaternion();
//float rY = Mathf.SmoothStep(0, tempWave[idx], Mathf.PingPong(Time.time * 1f, 1));
//transform.localRotation = Quaternion.Euler(0, rY, 0);
////float sa = targetWave.targWav[expState.currentTrial][xi];
//if (randRotDirection == 0)
//{
// toRot = Quaternion.Euler(0f, (tempWave[idx] + startAngle), 0f); // (tempWave[idx] * 40f)
//}
//else
//{
// toRot = Quaternion.Euler(0f, ((-1 * tempWave[idx]) + startAngle), 0f); // (tempWave[idx] * 40f)
//}
//transform.localRotation = toRot;
//}
//float[] sinWave1 = new float[arrayLength];
//float[] sinWave2 = new float[arrayLength];
//float[] cosWave1 = new float[arrayLength];
//float[] cosWave2 = new float[arrayLength];
//// Wave variables
//float[] waveVars1 = RandomizeWaveVars();
//float[] waveVars2 = RandomizeWaveVars();
//float[] waveVars3 = RandomizeWaveVars();
//float[] waveVars4 = RandomizeWaveVars();
//Debug.Log("Rand Vars: \n" + waveVars1[0].ToString("F2") + "," +
// waveVars2[0].ToString("F2") + "," +
// waveVars3[0].ToString("F2") + "," +
// waveVars4[0].ToString("F2"));
//for (int i = 0; i < arrayLength; i++)
//{
// float x = i * arrayFraction;
// sinWave1[i] = sineGen.CreateSine(x, waveVars1[0], waveVars1[1], waveVars1[2]);
// sinWave2[i] = sineGen.CreateSine(x, waveVars2[0], waveVars2[1], waveVars2[2]);
// cosWave1[i] = sineGen.CreateCosine(x, waveVars3[0], waveVars3[1], waveVars3[2]);
// cosWave2[i] = sineGen.CreateCosine(x, waveVars4[0], waveVars4[1], waveVars4[2]);
//}
//for (int i = 0; i < arrayLength; i++)
//{
// tempWave[i] = sinWave1[i] + cosWave1[i];
//}
////Debug.Log("Max W: " + tempWave.Max().ToString("F2"));
//for (int i = 0; i < arrayLength; i++)
//{
// tempWave[i] = UnityEngine.Random.Range(0f,180f);
// //tempWave[i] = tempWave[i].Normalize(tempWave.Max());
// //tempWave[i] = tempWave[i].Map(0f, 1f, 0f, 90f);
// //Debug.Log("W: " + tempWave[i].ToString("F2"));
//}
////float[] tempWave = targetWave.targWav[expState.currentTrial];
//sineGen.Duration = expState.trialDuration;
//if (sineGen.Duration <= 0f)
//{
// sineGen.Duration = 10f;
//}
//sineGen.fps = 500f * expState.angularSpeed;
//if (sineGen.fps <= 0f)
//{
// sineGen.fps = 750f;
//}
//sineGen.sinFreq1 = UnityEngine.Random.Range(3f, 8f);
//if (sineGen.sinFreq1 <= 0f)
//{
// sineGen.sinFreq1 = 4f;
//}
//sineGen.sinFreq2 = UnityEngine.Random.Range(5f, 11f);
//if (sineGen.sinFreq2 <= 0f)
//{
// sineGen.sinFreq2 = 6f;
//}
//double[] result = new double[2];
//result = NormalizedRandom(targetRange[0], targetRange[1]);
//double targang = SampleGaussian(randf, result[0], result[1]);
//Debug.Log("Ang: " + targang);
//TargetAngle = (float)targang;
//yRot = TargetAngle;// * expState.dialAngleTarget * Time.deltaTime * smoothFactor;
//float dialPos = Mathf.LerpAngle(prevYRot, yRot, lerpTime * Time.deltaTime);
////Debug.Log("Prev: " + prevYRot.ToString() + " Curr: " + yRot.ToString());
////Debug.Log("Target angle: " + yRot.ToString());
//Quaternion toRot = Quaternion.Euler(0f, dialPos, 0f);
////transform.localRotation = transform.localRotation * toRot;
//transform.localRotation = toRot;
//yRot += expState.dialAngleTarget * Time.deltaTime * smoothFactor; //# This is also not working
//yRot = yRot % 0.5315f; // This isn't working
//ang+=0.001f;
//yRot = ang % 180f;
////time2wait = Random.Range(targetDirectionChangeFrequency[0], targetDirectionChangeFrequency[1]);
//time2wait = targetDirectionChangeFrequency[1];
//// 1. Compute difference between current and previous dial angles
//float dialDiff = TargetAngle - prevYRot;
//// 2. Use the given wait time to compute how many time steps are required for the trial
//float totalTimeSteps = time2wait / Time.fixedDeltaTime;
//// 3. Use those time steps to compute the required step size
//float stepSize = dialDiff / totalTimeSteps;
//// 4. Loop through the angles and add the step size
//float sTime = Time.time;
//yRot = prevYRot;
////while ((Time.time-sTime) < time2wait)
//IEnumerator ChangeAngle()
//{
// TargetAngle = Random.Range(0f, 180f);
// //time2wait = Random.Range(targetDirectionChangeFrequency[0], targetDirectionChangeFrequency[1]);
// time2wait = targetDirectionChangeFrequency[1];
// yield return new WaitForSecondsRealtime(time2wait);
// prevYRot = TargetAngle;
// StartCoroutine(ChangeAngle());
//}
// Old way of moving the dial
//Quaternion toRot = Quaternion.Euler(0f, expState.dialAngle * Time.deltaTime * smoothFactor, 0f);
//float dialAngExp = Mathf.Pow(expState.dialAngle, expState.exPonent);
//prevAngle = clampedVal;
//clampedVal = Mathf.Clamp(dialAngExp * expState.dialGaining, -5f, 185f); // <= This is the previous scale factor version
////float clampedVal = Mathf.Clamp(dialAngExp, -5f, 185f); // <= This is a new version using exponents
//// Spring function
//float currAngVal = (alpha * clampedVal) + ((1f-alpha) * prevAngle);
//Debug.Log("dial_ang: " + dialAngExp);
//Quaternion toRot = Quaternion.Euler(0f, currAngVal, 0f);
//float sumQuat = (toRot.x * toRot.x) + (toRot.y * toRot.y) + (toRot.z * toRot.z) + (toRot.w * toRot.w);
//if (sumQuat == 1f)
//{
// Spring function
//transform.localRotation = toRot;
//transform.localRotation = toRot; //transform.localRotation *
//}
//else
//{
// //Debug.Log("Quaternion not valid \n " +
// // "sum: " + sumQuat.ToString());
//}