A method of demodulating a wireless signal modulated by phase-shift keying received from a space vehicle in a global navigation satellite system, the signal comprising a plurality of symbols, the method comprising: obtaining a first sequence of samples based on the signal; converting (320, 720) the first sequence of samples to a first sequence of frequency domain samples; selecting, as a decision variable, the sample that has the maximum magnitude among the first sequence of frequency domain samples; and identifying (340, 740) a symbol or a symbol-transition based on the decision variable, wherein the first sequence of samples starts at the start of a symbol period, the method further comprising: obtaining a second sequence of samples based on the signal, wherein the second sequence of samples ends at the start of said symbol period; reversing the second sequence of samples relative to the first sequence of samples; converting the reversed second sequence of samples to a second sequence of frequency domain samples; and selecting, as a reference variable, the sample that has the maximum magnitude among the second sequence of frequency domain samples, wherein identifying the symbol or the symbol-transition comprises comparing the decision variable with the reference variable, wherein each of the first sequence of samples and the second sequence of samples represents a whole symbol period or part of a symbol period, wherein the first sequence of samples and second sequence of samples comprise complex samples output from a correlation operation, wherein the correlation operation is a correlation between the signal and a local replica of a spreading code. obtaining a first sequence of samples based on the signal; converting (320, 720) the first sequence of samples to a first sequence of frequency domain samples; selecting, as a decision variable, the sample that has the maximum magnitude among the first sequence of frequency domain samples; and identifying (340, 740) a symbol or a symbol-transition based on the decision variable, wherein the first sequence of samples starts at the start of a symbol period, the method further comprising: obtaining a second sequence of samples based on the signal, wherein the second sequence of samples ends at the start of said symbol period; reversing the second sequence of samples relative to the first sequence of samples; converting the reversed second sequence of samples to a second sequence of frequency domain samples; and selecting, as a reference variable, the sample that has the maximum magnitude among the second sequence of frequency domain samples, wherein identifying the symbol or the symbol-transition comprises comparing the decision variable with the reference variable, wherein each of the first sequence of samples and the second sequence of samples represents a whole symbol period or part of a symbol period, wherein the first sequence of samples and second sequence of samples comprise complex samples output from a correlation operation, wherein the correlation operation is a correlation between the signal and a local replica of a spreading code. obtaining a second sequence of samples based on the signal, wherein the second sequence of samples ends at the start of said symbol period; reversing the second sequence of samples relative to the first sequence of samples; converting the reversed second sequence of samples to a second sequence of frequency domain samples; and selecting, as a reference variable, the sample that has the maximum magnitude among the second sequence of frequency domain samples, wherein identifying the symbol or the symbol-transition comprises comparing the decision variable with the reference variable, wherein each of the first sequence of samples and the second sequence of samples represents a whole symbol period or part of a symbol period, wherein the first sequence of samples and second sequence of samples comprise complex samples output from a correlation operation, wherein the correlation operation is a correlation between the signal and a local replica of a spreading code.