A new pre-correlation technique to enhance the Global Navigation Satellite Systems (GNSS) receivers, against the continuous wave interferences (CWI), is presented. Accordingly, the detection and the localisation procedure are constituted of many steps. First, the discrete cosine transform (DCT) is applied on the contaminated signal. Next, the Shannon-energy envelope detector, in the DCT-domain, is accomplished. Then, all envelope magnitudes above a predefined threshold, representing the interference components, are localized in the frequency domain. The following step consists in the use of the discrete Fourier series (DFS) technique to calculate the corresponding contributing harmonics of the CW interferences. Finally, the interference is reduced efficiently by a subtraction of its approximated version from the original contaminated signal. The results provided from the simulation prove that the DFS-based notch filter in terms of signal quality restoration, for both single-tone and multi-tone, is of superior performance compared to the classical notch filtering.