While obtaining a competitive resolution of the atmospheric shower depth \Xmax with radio interferometry requires an inter-detector synchronisation of better than a few nanoseconds (see Figure~\ref{fig:xmax_synchronise}),
the synchronisation defect in \gls{AERA} was found to range between a few nanoseconds upto multiple tens of nanoseconds over the course of a single day (see~\cite[Figure~3]{PierreAuger:2015aqe}).\Todo{copy figure?}
Therefore, an extra timing mechanism must be provided to employ radio measurements for \Xmax~determination in these experiments.
For this section, it is assumed that the transmitter is actively introduced to the array and is therefore fully controlled in terms of produced signals and the transmitting power.
It is foreseeable that ``parasitic'' setups, where sources that are not under control of the experiment introduce signals, can be analysed in a similar manner.
The nature of the transmitted radio signal, hereafter beacon, affects both the mechanism of reconstructing the timing information and the measurement of the radio signal for which the antennas have been designed.
Depending on the stability of the station clock, one can choose for employing a continuous beacon (e.g.~a~sine~waves) or one that is emitted at some interval (e.g.~a~pulse).
In the following, the synchronisation scheme for both the continuous and the recurrent beacon are elaborated upon.
Before going in-depth on the synchronisation using either of such beacons, the timing problem\Todo{rephrase} common to both scenarios is worked out.%>>>
An in-band solution for synchronising the detectors is effectively a reversal of the method of interferometry in Section~\ref{sec:interferometry}.
The distance between the transmitter $T$ and the antenna $A_i$ incur a time delay $(\tProp)_i$ caused by the finite propagation speed of the radio signal (see Figure~\ref{fig:beacon_spatial_setup}).
\\
Since the signal is an electromagnetic wave, its instantanuous velocity $v$ depends solely on the refractive index~$n$ of the medium as $v =\frac{c}{n}$.
In general, the refractive index of air is dependent on factors such as the pressure and temperature of the air the signal is passing through and the frequencies of the signal.
However, in many cases, the refractive index can be taken constant over the trajectory to simplify models.
As \eqref{eq:transmitter2antenna_t0} applies for each antenna, two antennas recording the same signal from a transmitter will share the $\tTrueEmit$ term.
In that case, the differences between the true arrival times $(\tTrueArriv)_i$ and propagation delays $(\tProp)_i$ of the antennas can be related as
As the mismatch is the difference between the antenna clock deviations, this scheme does not allow to uniquely attribute the mismatch to one of the clock deviations $(\tClock)_i$.
As \eqref{eq:synchro_mismatch_clocks} applies for each pair of antennas in the array, all the antennas that record the signal can determine the synchronisation mismatches simultaneously.
Taking one antenna as the reference antenna with $(\tClock)_r =0$, the mismatches across the array can be determined by applying \eqref{eq:synchro_mismatch_clocks} over consecutive pairs of antennas and thus all clock deviations $(\tClock)_i$.
The tradeoff between the gained accuracy and the timescale between synchronisation periods allows for a dead time of the detectors during synchronisation.
In Figure~\ref{fig:pulse:filter_response}, the impulse and the filter's response are shown, where the Butterworth filter bandpasses the signal between $30\MHz$ and $80\MHz$.
Detecting the modeled signal from Figure~\ref{fig:pulse:filter_response} in a waveform can be achieved by finding the correlation (see Section~\ref{sec:correlation}) between the two signals (see Figure~\ref{fig:pulse_correlation}).
When the digitiser samples the filtered signal, time offsets $\tau$ smaller than the sampling period $\Delta t =1/f_s$ cannot be resolved.
Still, for many measurements under ideal conditions, one can show that the resolution of the timing asymptotically approaches $\Delta t/\sqrt{12}$.
\\
This is an effect of the quantisation of the sampling period, where the time offsets $\tau$ are modeled as a uniform distribution in time bins the size of $\Delta t$.
In that case, the variance of a uniform distribution applies, obtaining this limit.
Top: The measured waveform and templated filter response from Figure~\ref{fig:pulse:filter_response}.
Bottom: The (normalised) correlation between the waveform and template as a function of time delay $\tau$.
The template is shifted by the time delay found at the maximum correlation (green dashed line), aligning the template and waveform in the top figure.
}
\label{fig:pulse_correlation}
\end{figure}
% pulse finding: signal to noise definition
As can be seen in Figure~\ref{fig:pulse:filter_response}, the impulse response spreads the power of the signal over time.
The peak amplitude gives a measure of this power without needing to integrate the signal.
\\
Expecting the noise to be gaussian distributed in the time domain, it is natural to use the root mean square of its amplitude as a quantity representing the strength of the noise.
\\
Therefore, the \gls{SNR} will be defined as the maximum amplitude of the filtered signal versus the \gls{RMS} of the noise amplitudes.
From the above, it is clear that both the \gls{SNR} aswell as the sampling rate of the template have an effect on the ability to resolve small time offsets.
To further investigate this, we set up a simulation\footnote{\Todo{Url to repository}} where templates with different sampling rates are matched to simulated waveforms for multiple \glspl{SNR}.
First, an ``analog'' template is rendered at $\Delta t =10\mathrm{fs}$ to be able to simulate small time-offsets.
Each simulated waveform samples this ``analog'' template with $\Delta t =2\mathrm{ns}$ and a randomised time-offset $t_\mathrm{true}$.
\\
Second, the matching template is created by sampling the ``analog'' template at the specified sampling rate.
\\
% pulse finding: time accuracies
Afterwards, simulated waveforms are correlated against the matching template obtaining a best time delay $\tau$ per waveform.
Comparing the best time delay $\tau$ with the randomised time-offset $t_\mathrm{true}$, we get a time residual $t_\mathrm{res}= t_\mathrm{true}-\tau$ per waveform.
By evaluating the time residuals for some combinations of \glspl{SNR} and template sampling rates, Figure~\ref{fig:pulse:snr_time_resolution} is produced.
It shows that, as long as the pulse is (much) stronger than the noise ($\mathrm{\gls{SNR}}\gtrsim5$), template matching could achieve a sub-nanosecond timing accuracy even if the measured waveform is sampled at a lower rate (here $\Delta t =2\ns$).
A continuously emitted beacon will be recorded simultaneously with the signals from air showers.
It is therefore important that the beacon does not fully perturb the recording of the air shower signals, but still be prominent enough for synchronising the antennas.
\\
% Use sine wave to filter using frequency
By implementing the beacon signal as one or more sine waves, the beacon can be recovered from the waveform using Fourier Transforms (see Section~\ref{sec:fourier}).
It is then relatively straightforward to discriminate the beacon from the air shower signals, resulting in a relatively unperturbed air shower recording for analysis.
This effect is observable in the $\tMeasArriv$ term in \eqref{eq:transmitter2antenna_t0}, describing the time when the signal is measured at the detector, being no longer uniquely defined,
with $-\pi < \pMeasArriv < \pi$ the phase of the beacon at time $\tMeasArriv$, $T$ the period of the beacon and the unknown period counter $k \in\mathbb{Z}$.
Lower panel: Expecting the impulsive signals to come from the same source, the overlap between the two impulsive signals is used to lift the period degeneracy ($k=n-m$).
With an estimated accuracy of the \gls{GNSS} below $50\ns$ the correct beacon period can be determined, resulting in a unique $\tTrueEmit$ transmit time\Todo{reword}.
Such an algorithm efficiently finds the amplitudes and phases within a trace $x$ at specific frequencies $f_k = f_s \tfrac{k}{N}$ determined solely by the number of samples $N$ ($0\leq k < N$) and the sampling frequency $f_s$.
However, if the frequency of interest is not covered in the specific frequencies $k f_s$, the approach must be modified (e.g. zero-padding or interpolation).\Todo{extend?}