srmainwaring / asv_wave_sim

This package contains plugins that support the simulation of waves and surface vessels in Gazebo.
GNU General Public License v3.0
110 stars 29 forks source link

Fix Hermitian symmetry for derivatives for waves FFT #90

Closed srmainwaring closed 1 year ago

srmainwaring commented 1 year ago

This PR corrects a term in the derivative amplitudes in the waves FFT and adds extra tests.

Details

  1. Correct Nyquist term in derivative amplitudes (must be zero).
  2. Enable tests to check derivative and displacement amplitudes are Hermitian.

For an explanation of why the Nyquist term must vanish (and not just be real) see:

Steven G. Johnson. "Notes on FFT-based differentiation", MIT Applied Mathematics, 2011. https://math.mit.edu/~stevenj/fft-deriv.pdf