A method of determining a time-of-flight of an optical signal between a starting point of an optical path and a reflection point within the optical path, the method comprising the steps of
- (a) supplying to the optical path at least one binary optical probing signal comprising a sequence of pulses according to a binary transmit code sequence, the sequence of pules having a predetermined bit duration, phase and bit rate;
- (b) detecting at least one electrical return signal according to at least one optical return signal returning from the optical path in response to a corresponding one of the at least one optical probing signals using direct detection;
- (c) deriving at least one receive code sequence by sampling and slicing the at least one electrical return signal, wherein a sampling rate corresponding to the bit rate of the sequence of pulses of the at least one optical probing signal is used;
- (d) determining a correlation function by correlating the transmit code sequence and the at least one receive code sequence;
- and
- (e) identifying a main peak of the correlation function that corresponds to the reflection point and a time position of the main peak, and determining the time-of-flight as the time position of the main peak;
- wherein
- (f) two or more receive code sequences are derived
- (i) from one or more electrical return signals, wherein at least two receive code sequences are generated by sampling and slicing the same one of the one or more electrical return signals at different phase positions, and/or
- (ii) from two or more electrical return signals, wherein at least two receive code sequences are generated by sampling and slicing different ones of the two or more electrical return signals at different phase positions,
- (g) that a multi-phase correlation function is determined by
- (i) calculating, for each receive code sequence that has been determined for a given phase position, values of a discrete correlation function by correlating the respective receive code sequence and the transmit code sequence of the corresponding optical probing signal, and
- (ii) interleaving the values of the at least two discrete correlation functions according to their respective phase position, or by
- (iii) if required, interleaving the receive code sequences that have been determined for different phase positions according to their respective phase position in order to create an interleaved receive code sequence, and creating an interleaved transmit code sequence by interleaving a number of transmit code sequences that corresponds to the number of different phase positions, and
- (iv) correlating the interleaved receive code sequence and the interleaved transmit code sequence, and
- (h) that the multi-phase correlation function is used to identify the main peak that corresponds to the reflection point.