We study the bright Seyfert 1 galaxy Mrk~509 with the Reflection Grating Spectrometers (RGS) of XMM-Newton using the RGS multi-pointing mode of XMM-Newton for the first time in order to constrain the properties of the outflow in this object. We want to obtain the most accurate spectral properties from the 600 ks spectrum of Mrk 509 which has excellent statistical quality. We derive an accurate relative calibration for the effective area of the RGS, derive an accurate absolute wavelength calibration, improve the method for adding time-dependent spectra and enhance the efficiency of the spectral fitting by two orders of magnitude. We show the major improvement of the spectral data quality due to the use of the new RGS multi-pointing mode of XMM-Newton. We illustrate the gain in accuracy by showing that with the improved wavelength calibration the two velocity troughs observed in UV spectra are resolved.