Low level smartphone audio and sensor clock synchronization
An approach to obtain low latency association of the audio clock in a smartphone with an incoming RF message is to use an interrupt driven routine, where the receipt of the RF message preamble generates an interrupt that reads the audio clock counter since the start of the audio session. In some embodiments such an approach may be implemented on the specialized processing cores found in smartphones that control RF communication, sensor or audio processing.
1 . A method associated with a real-time location system, the method comprising:
receiving a global clock signal at a server;
associating a reference clock with the received global clock signal;
transmitting an acoustic signal from a location transmitter at a time synchronized with the reference clock;
receiving by a mobile device a clock signal associated with the global clock signal;
receiving by the mobile device the acoustic signal;
time-stamping, using an audio clock, the received acoustic signal;
synchronizing the audio clock with the reference clock using the global clock signal;
receiving data from an inertial motion sensor located in the mobile device;
receiving timing information associated with the received data;
associating the timing information and the audio clock, and
determining a location of the mobile device based on the synchronizing the audio clock and based on fusing the data from the inertial motion sensor and the associated timing information.
2 . The method of claim 1 , wherein the global clock signal is a GPS signal.
3 . The method of claim 1 , wherein the global clock signal is a network time protocol (NTP) signal.
4 . The method of claim 3 , wherein the global clock signal is a signal associated with a global atomic clock.
5 . The method of claim 1 , wherein the global clock signal is a cellular network clock signal.
6 . The method of claim 1 , wherein the inertial motion sensor is an accelerometer.
7 . The method of claim 1 , wherein the global clock signal is obtained from a low frequency (LF) radio frequency (RF) atom clock receiver.
8 . The method of claim 1 , wherein the time-stamping includes reading a value of the audio clock.
9 . The method of claim 8 , wherein the value is representative of a time since a start of an audio session associated with the received acoustic signal.
10 . The method of claim 8 , wherein the reading is performed in response to an interrupt.
11 . The method of claim 1 , wherein the acoustic signal is a sampled acoustic signal sampled at a rate in a range of 48 kHz to 192 kHz.
12 . The method of claim 1 , wherein the acoustic signal is a sampled acoustic signal sampled at a rate of 48 KHz.
13 . The method of claim 1 , wherein the inertial motion sensor is a gyroscope.
14 . The method of claim 1 , wherein the inertial motion sensor is a magnetometer.
15 . The method of claim 1 , wherein the inertial motion sensor is a pressure sensor.
16 . The method of claim 1 , wherein the acoustic signal is an ultrasound signal.
17 . The method of claim 1 , wherein the associating a reference clock with the received global clock signal includes:
triggering, by a micro-controller, an interrupt to the reference clock, and
receiving, by the micro-controller, a clock value from the reference clock in response to the interrupt.
18 . The method of claim 17 , wherein the receiving by the micro-controller includes using an internal bus.
19 . The method of claim 17 , wherein the receiving by the micro-controller includes using a universal asynchronous receiver/transmitter (UART) or a serial peripheral interface (SPI).