## Revision 1512

Edited BOM Vector Component Tables with values which will gaurantee that worst case net vector sum will not overflow an integer data type (16 bits).
Also changed Makefile to have TARGET=push_pull. Also added functionality to MATLAB script so that it will automatically calculate the BOM Vector
Component Table given a scalar value.

View differences:

push_pull.c
22 22
``` * The x component of each BOM detector (indexed from 0 to 15)
```
23 23
``` * was calculated using the following formula:
```
24 24
``` *
```
25
``` *		x_comp[i] = round(100 * cos ( 2 * pi / 16 * i) )
```
25
``` *		x_comp[i] = round(25 * cos ( 2 * pi / 16 * i) )
```
26 26
``` *
```
27 27
``` * If the BOM detectors were superimposed onto a 2 dimensional Cartesian space,
```
28 28
``` * this effectively calculates the x component of the emitter vector where
```
29 29
``` * emitter 0 corresponds to an angle of 0 radians, 4 -> pi/2, 8 -> pi, ect.
```
30 30
``` */
```
31 31
```static const signed int x_comp = {
```
32
```	100,
```
33
```	92,
```
34
```	71,
```
35
```	38,
```
32
```	25,
```
33
```	23,
```
34
```	17,
```
35
```	9,
```
36 36
```	0,
```
37
```	-38,
```
38
```	-71,
```
39
```	-92,
```
40
```	-100,
```
41
```	-92,
```
42
```	-71,
```
43
```	-38,
```
37
```	-9,
```
38
```	-17,
```
39
```	-23,
```
40
```	-25,
```
41
```	-23,
```
42
```	-17,
```
43
```	-9,
```
44 44
```	0,
```
45
```	38,
```
46
```	71,
```
47
```	92
```
45
```	9,
```
46
```	17,
```
47
```	23
```
48 48
```};
```
49 49

50 50

......
52 52
``` * The y component of each BOM detector (indexed from 0 to 15)
```
53 53
``` * was calculated using the following formula:
```
54 54
``` *
```
55
``` *		y_comp[i] = round(100 * sin ( 2 * pi / 16 * i) )
```
55
``` *		y_comp[i] = round(25 * sin ( 2 * pi / 16 * i) )
```
56 56
``` *
```
57 57
``` * If the BOM detectors were superimposed onto a 2 dimensional Cartesian space,
```
58 58
``` * this effectively calculates the y component of the emitter vector where
```
......
60 60
``` */
```
61 61
```static signed int y_comp = {
```
62 62
```	0,
```
63
```	38,
```
64
```	71,
```
65
```	92,
```
66
```	100,
```
67
```	92,
```
68
```	71,
```
69
```	38,
```
63
```	9,
```
64
```	17,
```
65
```	23,
```
66
```	25,
```
67
```	23,
```
68
```	17,
```
69
```	9,
```
70 70
```	0,
```
71
```	-38,
```
72
```	-71,
```
73
```	-92,
```
74
```	-100,
```
75
```	-92,
```
76
```	-71,
```
77
```	-38
```
71
```	-9,
```
72
```	-17,
```
73
```	-23,
```
74
```	-25,
```
75
```	-23,
```
76
```	-17,
```
77
```	-9
```
78 78
```};
```
79 79

80 80

......
153 153

154 154
```static int get_bom_vector(Vector* bom_vector) {
```
155 155

156
```	return EXIT_SUCCESS;
```
156
```	return 0;
```
157 157

158 158
```}
```

Also available in: Unified diff