The calibration of a spectrometer is a critical step to obtain high-quality images in SDOCT. The spectra acquired with the spectrometer of an SDOCT are usually linear in wavelength, which should be linearly resampled in wavenumber before Fourier transform. Then the depth axis along each A-scan can be marked based on the wavenumber resolution of the spectrometer. In our project, we propose a novel method to calibrate the spectrometer. An easy and cost-effective way to generate Doppler frequency shift is introduced. Compared with previous methods, our method does not need additional hardware, such as a piezo shifter or a calibration light source. We prove that this Doppler frequency shift can be used to linearize the spectra from the wavelength domain to wavenumber domain. In addition, experiments prove that tissue images can be directly used for calibration without requiring mirror images. In other words, the calibration can be accomplished in situ, which is very useful for some clinical applications as the images can be calibrated by itself during or after imaging without relying on accurate manual calibration before imaging. For retinal imaging, this method may avoid spectrometer calibration using a model eyeball in the sample arm. In the further step, to mark depth axis, an interference signal is generated by coverslip which can provide maximum probing depth.