Finding the phase and frequency of a tone with Doppler. What is wrong in the code?
Your FFT method of finding the phase of a single tone is only valid if your 's' signal contains an exact integer number of cycles. I.E., no spectral leakage. And that is NOT the case for your 's' signal.