delta_lambda = lambda / 2;
receiver_coords = [100, 0; 0, 100; -100, 0; 0, -100];
hydrophone_coords = zeros(num_hydrophones, 2);
for i = 1:num_hydrophones
hydrophone_coords(i, :) = [cos(2*pi*(i-1)/num_hydrophones), sin(2*pi*(i-1)/num_hydrophones)] * delta_lambda * (i-1);
lfm_signal = chirp(t, f_start, T, f_end, 'linear');
distances = zeros(num_hydrophones, num_receivers);
angles = zeros(num_hydrophones, num_receivers);
for i = 1:num_hydrophones
distances(i, j) = norm(hydrophone_coords(i, :) - receiver_coords(j, :));
angles(i, j) = atan2(hydrophone_coords(i, 2) - receiver_coords(j, 2), hydrophone_coords(i, 1) - receiver_coords(j, 1));
phase_delays = distances / lambda;
received_signals = zeros(num_hydrophones, length(lfm_signal));
for i = 1:num_hydrophones
received_signals(i, :) = received_signals(i, :) + lfm_signal .* exp(1i*(2*pi*f_start + 2*pi*(f_end - f_start)/(2*T)*t - phase_delays(i, j) + angles(i, j)));
imagesc(abs(received_signals));
title('Waterfall Diagram of Phase-Delayed LFM Signals');