PN code acquisition using smart antennas and adaptive thresholding for spread spectrum communications