function [olap] = packet_overlap(p1, p2)

% overlap(P1, P2) calculates the overlap between the packets P1 and P2. 

olap = sum(sum(conj(p1) .* p2));
