Remove dead code.
Convert a whole load of statics to dynamic allocations.
Rename max_index to peak_index.
Make the sample size configurable.
Correct the ADC configuration.
Remove the cracky polynomial fit.  Just using the phase angle directly
does a much better job.
Vertical interpolation removes a lot of noise from the image.
Start doing image processing in frequency domain.
Use float not double for the full size arrays.