A Performance Analysis System for the Sport of Bowling
A Performance Analysis System for the Sport of Bowling
A Performance Analysis System for the Sport of Bowling
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
One possibility is to use a trans<strong>for</strong>mation table to record <strong>the</strong> data. Each sample would be<br />
compressed into four "value" bits, plus a fifth "range" bit. Two adjacent compressed<br />
values would be stored toge<strong>the</strong>r in a byte, while <strong>the</strong> "range" bits would be stored<br />
consecutively in groups <strong>of</strong> eight comprising a "range" byte. The impact bits would also<br />
need to be stored in separate bytes. In this fashion, six bytes would be required to store<br />
eight samples: four dual sample bytes, one range byte, and one impact byte. Thus, a<br />
compression <strong>of</strong> 25% has been achieved, allowing an 8-Kbyte external EEPROM to hold a<br />
"worst-case" game's worth <strong>of</strong> sample data. The data <strong>for</strong> one wave<strong>for</strong>m would be stored<br />
as shown in Figures 2-12a and 2-12b.<br />
(one header per wave<strong>for</strong>m)<br />
1 2 3 4 5-8<br />
Ball<br />
Count<br />
Previous<br />
Record<br />
(address / 8)<br />
Next<br />
Record<br />
(address / 8)<br />
Pre-Samples<br />
Impact Byte<br />
(8 impact bits)<br />
Pre-Sample Bytes<br />
(no translation)<br />
1 2 3 4 5 6 7 8<br />
Figure 2-12a: Wave<strong>for</strong>m Header<br />
(repeated up to 60 times <strong>for</strong> 480 samples)<br />
1 2 3-6<br />
Impact Byte<br />
(8 Impact bits)<br />
Range Byte<br />
(8 Range bits)<br />
Sample Bytes<br />
(translated values)<br />
1 2 3 4 5 6 7 8<br />
Figure 2-12b: Wave<strong>for</strong>m Compressed Sample Record<br />
An example translation table is shown in Figure 2-13. Notice that this table yields a nonlinear<br />
translation, resulting in a hash function that converts 8-bit values into 5-bit values<br />
(4 data bits plus <strong>the</strong> "range" bit). For example, using <strong>the</strong> translation table <strong>of</strong> Figure 2-13,<br />
if eight consecutive samples contained <strong>the</strong> values 10, 12, 16, 38, 57, 75, 118, and 85 and<br />
impacts were registered at <strong>the</strong> third (16) and fourth (38) samples, <strong>the</strong> compressed data<br />
would appear as shown in Figure 2-12c.<br />
1 2 3-6<br />
Impact Byte<br />
30h<br />
(0011 0000)<br />
Range Byte<br />
1Fh<br />
(0001 1111)<br />
Sample Bytes<br />
(translated values)<br />
2 2 4 5 B C E D<br />
Figure 2-12c: Compressed Samples Example<br />
37