## 6 Positioning Accuracy
### Experiment Method  
DPA microphones were placed just below every ceiling corner and pointed at the opposite floor corner of the room. All microphones were connected to the Avid Mbox Pro audio card, which supports four-channel synchronized input. The audio card was further connected to a PC running the asynchronous trilateration software developed in this project.  
The software uses RtAudio API for real-time audio input/output. It is accessed via the Java wrapper JRtAudio, which allowed for quick GUI prototyping in Java. On the PC, RtAudio API supports either DirectSound or ASIO drivers. ASIO support proved essential to us because streaming more than two channels with DirectSound turned out to be very challenging. Audio streams from the audio card are written into a buffer and get processed through a bandpass filter. We found the Bessel bandpass filter [31] with filter order 4, corner frequency one = 21,400 Hz, and corner frequency two = 21,600 Hz, to have the best response to the phone's inherent ultrasonic signal outputs. This filters out all other frequencies and leaves (almost) only the frequency of the signal.  
The ultrasound signal is streamed at 96,000 bit/s sampling rate. Assuming the speed of sound is 346 m/s at normal room temperatures, each sample should be equivalent to 3.6 mm travelled (it is notnecessary to account for variations in temperature because changes in office room temperature are practically insignificant). Unfortunately only one out of 10 samples of the bandpass filter is a valid representation of the signal's intensity. The other 9 samples can be discarded, being a by-product of using a low-order filter. Therefore the real resolution of the system is 3.6 multiplied by 10, or 36 mm. This parameter can be improved by using a high-order filter, which would require more powerful hardware to run in real-time or even the use of a dedicated Digital Signal Processor (DSP).  
The same 10 test locations or check points were chosen for all three experiments. Precise coordinates of these check points were pre-measured with a laser measurement device. The phone was then placed at each of these locations with its main speaker pointing directly upward. In Experiment 1 the phone was 0.12 m below the ceiling and during Experiments 2 and 3 it was 1.7 m below the ceiling to mimic normal carrying height. For Experiment 3, the Lok8 positioning software was modified to accommodate multiplication by a \"room calibration factor\" of 1.1 for each difference in delay. This value appears to compensate well for the height difference between microphones and the phone, and was found by trial and error. In all three experiments the phone was made to produce an ultrasonic \"beep\" 100 times at each of the 10 check point locations with an interval of one second between beeps to provide enough measurement data for statistical analysis. These signals were captured by the four microphones and processed by the Lok8 positioning software to independently estimate coordinates of the signal source for each detected signal. These coordinates as well as the standard deviation for the trilateration procedure were recorded into text files. This resulted in 3,000 readings; 300 per each unique check point location, 1,000 per experiment.