## 2 General Design and Features of the Instrument v2021
### Wave Data Acquisition and Onboard Processing
At the end of a 20 min measurement period (or, to be more exact, 20.48 min, to obtain a multiple of \(2048=2^{11}\) samples to allow much faster FFT computation), the array of 10 Hz vertical acceleration data stored in RAM is processed using the Welch method. For this, the signal is split into segments of length 2048 sample points, with a 75% overlap, resulting in a total of 21 segments. This corresponds to segments with a length double of what was used in [PERSON] et al. [51]. The motivation for doubling the segment length is to increase the frequency resolution of the output. In addition, we use 75% overlap, instead of the 50% overlap used in [PERSON] et al. [51], in order to keep the number of segments large enough to perform a good averaging despite the increase in segment length. The real FFT for the vertical acceleration of each of these segments is computed using the real FFT implementation provided by the ARM digital processing reference library, applying Hanning windowing with an energy-conserving normalization, and these segment FFTs are averaged into the Welch estimate. The computation of the FFT takes just a few tens of milliseconds due to the dedicated floating point unit on the Ambiq Apollo microcontroller and the efficient FFT algorithm provided by ARM. The corresponding algorithm is summarized in Algorithm 2. The reader who may want to reimplement a similar algorithm is made aware that different FFT libraries may use different renormalization conventions; so, using another FFT implementation may require the use of additional scaling factors. In order to save memory, the Welch averaging is only performed for the set of frequency bins corresponding to frequencies that are relevant for waves, which is typically between \(f_{min}=0.05\) Hz (i.e., 20 s period waves) and \(f_{max}=0.5\) Hz (i.e., 2 s period waves). The Welch spectrum with Hanning windowing obtained at this stage is a low-noise estimate for the spectrum of the wave vertical acceleration, \(PSD_{accD}\). From there, the spectrum of the wave elevation \(\eta\) can be obtained by following [20]  
\[PSD_{\eta}(f)=PSD_{accD}(f)/(2.0\pi f)^{4}. \tag{1}\]Finally, the spectral moments are computed by following  
\[m_{i}=\int_{f_{min}}^{f_{max}}PSD_{\eta}(f)f^{i}df, \tag{2}\]  
and these are used to compute estimates of the significant wave height \(Hs\) and the wave period \(T_{z}\) and \(T_{c}\), following  
\[Hs=4\sqrt{m_{0}}, \tag{3}\]  
\[T_{z}=\sqrt{m_{2}/m_{0}}, \tag{4}\]  
\[T_{c}=\sqrt{m_{4}/m_{2}}. \tag{5}\]Since the full wave spectrum is transmitted (see the next section), these statistics are simply redundant information (as they can be derived from the transmitted spectrum) that are convenient to use for consistency checks or for quickly inspecting wave data as they are transmitted. We choose to transmit these quantities to remain consistent with the previous design of [PERSON] et al. [51], as these are well-adapted to our needs, but users are free to implement the transmission of other statistics (such as the zero crossing period \(T_{01}=m_{0}/m_{1}\) or the harmonic period \(T_{-10}=m_{-1}/m_{0}\)) if this is a better fit for their needs, owing to the open-source nature of the instrument. We want to remind those readers who may want to reimplement this processing again that different FFT packets may use different conventions; thus, additional renormalization factors may be needed. Similarly, some references in the literature use the angular frequency \(\omega=2\pi f\) rather than the frequency \(f\) as a dimension for spectra, in which case, some additional renormalization is needed in the formula above. Our general recommendation is to test the whole processing algorithm on dummy synthetic data to ensure that no renormalization factor has been forgotten.