I am wondering what the most precise method is to detect the playback sample position of a sine sweep? The real playback sample position is unknown and an DSP with constraint computing capabilities shoud be used for the estimation, recording the playback by an external microphone.
In the concrete case the sine sweep is repeatedly played with fixed duration in the ultrasound range and a microphone 50 cm away from the loudspeaker is used to record the chirp and detect the playback position. After each single chirp playback might be a delay, whereby the delay time is known and doesn't change. Real-word noise is given in the background, which might be as loud as the ultrasound playback. One period of the sine sweep looks like this:
As visible, the frequency in the chirp is either linear or exponentially increasing from a low frequency to a high frequency, fade in and fade out is applied and the chirp duration is 100ms with 44kHz sampling rate.