A complex-ambiguity function approach to a GPS receiver