Abstract:
The present invention applies in a communication system where - a) two vehicles V A  and V B  transmit data to each other intermittently, b) data transmitted from V A  to V B  is modulated in V A  by a PN code PN 1  having a time varying phase φ MA  and is correlated in V B  by the code PN 1  having a different time varying phase φ CB , and c) data transmitted from V B  to V A  is modulated in V B  by a PN code PN 2  having a time varying phase φ MB  and is correlated in V A  by the code PN 2  having a different time varying phase φ CA . With the present invention, the codes PN 1  and PN 2  can have respective nominal frequencies f 1  =1/T 1  and f 2  =1/T 2  that drift in at least one of the vehicles. This drift, is then compensated for by the present invention by sensing, during the data transmissions, the phase shifts Δφ MA , Δφ MB  and Δφ CB  which respectively occur in said PN codes over a time interval ΔT X  ; calculating a drift rate DR from the sensed phase shifts; measuring a time interval ΔT Y  during which data transmission between V A  and V B  are stopped; and thereafter, compensating for drift before re-establishing data transmissions by phase shifting, in one of the vehicles, code PN 1  by an amount proportional to (DR) (ΔT Y ).

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to communication systems in which data is transmitted between two vehicles via spread spectrum radio signals; and more particularly, it relates to methods and circuits in such communication systems that compensate for drift in the frequency of the PN codes within the spread spectrum signals. 
     When data is transmitted via spread spectrum radio signals, the data in the transmitting vehicle is modulated by a pseudo-random code called a PN code. Then, in the receiving vehicle, the modulated data is multiplied by the PN code in order to recover the original data. 
     For the above modulation - demodulation process to work properly, the frequency and phase of the PN code in the receiving vehicle must be precisely matched to the frequency and phase of the code in the incoming modulated data. However, for various reasons (which are explained in the detailed description) the frequency and phase of the PN code in the transmitting vehicle changes with time. Consequently, the task of generating a PN code in the receiving vehicle which matches the frequency and phase of the PN code in the received modulated data is made difficult. 
     Of particular importance with regard to the present invention is the fact that in both the transmitting vehicle and the receiving vehicle, the PN code is generated in part in response to a clock signal from an oscillator. That oscillator has a predetermined nominal frequency; however, the actual frequency of the clock signal will deviate somewhat from the nominal frequency. In turn, this frequency deviation, herein called drift, will result in a mismatch between the PN code generated in the receiving vehicle and the PN code in the received data. 
     To minimize drift in the prior art, highly accurate atomic oscillators were used instead of crystal oscillators. Two examples of typical atomic oscillators are a Rubidium oscillator and a Caesium beam oscillator. However, the atomic oscillators in comparison to less accurate crystal oscillators are very expensive. For example, the cost of a M3000 Rubidium oscillator from EFRATOM Corporation is about $10,000 whereas the cost of an EMXO crystal oscillator from EFRATOM Corporation is about $1000. 
     Also, atomic oscillators in comparison to crystal oscillators occupy more space, weigh more, and consume more power. For example, the above Rubidion oscillator is 3.25&#34;×3.25&#34;×4.5&#34;, weighs 2.7 LBS, and consumes 15 watts; whereas the above crystal oscillator is 1.3&#34;×1.3&#34;×1.3&#34;, weighs less than 0.1 LBS, and consumes 0.45 watts. 
     Accordingly, a primary object of the invention is to provide a spread spectrum communication system in which PN codes are generated in response to a relatively inaccurate clock signal from a crystal oscillator, and in which a novel method/circuit is used to compensate for drift in the crystal generated clock signal. 
     BRIEF SUMMARY OF THE INVENTION 
     The present invention applies in a communication system where - a) two vehicles V A  and V B  transmit data to each other intermittently, b) data transmitted from V A  to V B  is modulated in V A  by a PN code PN 1  having a time varying phase φ MA  and is correlated in V B  by the code PN 1  having a different time varying phase φ CB , and c) data transmitted from V B  to V A  is modulated in V B  by a PN code PN 2  having a time varying phase φ MB  and is correlated in V A  by the code PN 2  having a different time varying phase φ CA . With the present invention, the codes PN 1  and PN 2  can have respective nominal frequencies f 1  =1/T 1  and f 2  =1/T 2  that drift in at least one of said vehicles. This drift, is then compensated for by the present invention by the steps of: 
     sensing, during the data transmissions, the phase shifts Δφ MA , Δφ CA , Δφ MB  and Δφ CB  which respectively occur in said PN codes over a time interval ΔT X  ; 
     calculating a drift rate DR from the sensed phase shifts where ##EQU1## measuring a time interval ΔT Y  during which data transmission between V A  and V B  are stopped; and thereafter, 
     phase shifting, in one of the vehicles, code PN 1  by an amount C 1  ≈-(DR)ΔT Y  ÷T 1  and code PN 2  by an amount C 2  ≈-(DR)ΔT Y  ÷T 2 . 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     A method and circuit which compensate for oscillator drift in a spread spectrum communication system is described herein in conjunction with the accompanying drawings, wherein: 
     FIG. 1 is a block diagram of a communication system which constitutes one preferred embodiment of the invention; 
     FIG. 2 shows certain phase changes that intentionally occur in the FIG. 1 system when data is not being transmitted and received; 
     FIG. 3 shows certain phase changes that intentionally occur in the FIG. 1 system when data is being transmitted and received; 
     FIG. 4 shows certain phase changes that occur unintentionally in the FIG. 1 system when the oscillators in that system drift in frequency; 
     FIG. 5 is a set of equations which derive an expression for oscillator drift in the FIG. 1 system in terms of the phase changes that occur in FIG&#39;s. 2, 3, 4; 
     FIG. 6 is a numerical example of the phase changes that occur in FIG&#39;s. 2, 3, and 4; 
     FIG. 7 is a set of equations which compute drift in the numerical example of FIG. 6; 
     FIG. 8 is a set of equations which state how drift is compensated for in accordance with the invention when the two stations of FIG. 1 transmit to each other at the same bit rate; 
     FIG. 9 is a set of equations which state how drift is compensated for in accordance with the invention when the two stations of FIG. 1 transmit to each other at different bit rates; and, 
     FIG. 10 shows the internal makeup of two circuit blocks in the FIG. 1 system which utilize the drift compensation equations of FIG&#39;s. 8 and 9 to compensate for drift. 
    
    
     DETAILED DESCRIPTION 
     Referring now to FIG. 1, it shows a block diagram of a communication system which is structured as a preferred embodiment of the present invention. This FIG. 1 communication system is comprised of a vehicle V A  which carries all of the communications circuitry that is shown in the left hand side of FIG. 1, and another vehicle V B  which carries all of the communications circuitry that is shown on the right hand side of FIG. 1. By this circuitry, the two vehicles V A  and V B  transmit data, via spread spectrum radio signals, to each other. 
     Data transmitted from V A  is indicated in FIG. 1 as TD A , and it is sent to a modulator 10 where it is modulated by a PN code PN 1  φ MA . Here, symbol PN 1  represents a particular bit sequence which makes up the code, and φ MA  represents the phase of the code. For example, φ MA  =+1 indicates the code is advanced relative to some predetermined reference point by one code bit; φ MA  =-2 indicates the code is delayed by two code bits; etc. 
     Code PN 1  φ MA  is generated by a PN code generator 11 which has two control inputs 11a and 11b. Input 11a receives a control signal Sƒ MA  which specifies a frequency for the code PN 1  φ MA , and input 11b receives a control signal Sφ MA0  which specifies incremental phase changes for the code PN 1  φ MA . Additional details on how these signals Sƒ MA  and Sφ MA0  are generated will be described herein shortly. 
     From the modulator 10, the modulated data passes to an antenna 12 where it is transmitted to vehicle V B . In FIG. 1, the symbols x, x+1, ... x+N represent respective bits of the code PN 1  that were used by the modulator 10 in its modulation process. Then, in vehicle V B , the modulated data is received by an antenna 20 and passed to a correlator 21. 
     To demodulate the signals from antenna 20, the correlator 21 multiplies those signals by a PN code PN 1  φ CB . Here the symbol PN 1  indicates the same bit sequence that is used by the modulator 10 of vehicle V A , and the symbol φ CB  indicates the phase of the code to the correlator 21. To properly demodulate the transmitted data, the frequency and phase of code PN 1  φ CB  must correspond to the frequency and phase of the code that is received by antenna 20. 
     Code PN 1  φ CB  is generated by a PN code generator 22 which has two control inputs 22a and 22b. Input 22a receives a control signal Sƒ CB  which specifies a frequency of the code PN 1  φ CB , and input 22b receives a control signal Sφ CB0  which specifies incremental phase changes for the code PN 1  φ CB . Additional details on how these signals Sƒ CB  and Sφ CB0  are generated will be described herein shortly. 
     Similarly, data transmitted from V B  to V A  is indicated in FIG. 1 as TD B , and it is sent to a modulator 30 where it is modulated by a PN code PN 2  φ MB . Here, symbol PN 2  represents a particular bit sequence which makes up the code, and φ MB  represents the phase of the code. 
     Code PN 2  φ MB  is generated by a PN code generator 31 which has two control inputs 31a and 31b. Input 31a receives a control signal Sƒ MB  which specifies a frequency for the code PN 2  φ MB , and input 31b receives a control signal Sφ MB0  which specifies incremental phase changes for the code PN 2  φ MB . Additional details on how these signals Sƒ MB  and Sφ MB0  are generated will be described herein shortly. 
     From the modulator 30, the modulated data passes to an antenna 32 where it is transmitted to vehicle V A . In FIG. 1, the symbols y, y+1, ... y+N represent respective bits of the code PN 2  that were used by the modulator 30 in its modulation process. Then, in vehicle V A , the modulated data is received by an antenna 40 and passed to a correlator 41. 
     To demodulate the signals from antenna 40, the correlator 41 multiplies those signals by a PN code PN 2  φ CA . Here the symbol PN 2  indicates the same bit sequence that is used by the modulator 30 of vehicle V B , and the symbol φ CA  indicates the phase of the code to the correlator 41. To properly demodulate the transmitted data TD B , the frequency and phase of code PN 2  φ CA  must correspond to the frequency and phase of the code that is received by antenna 40. 
     Code PN 2  φ CA  is generated by a PN code generator 42 which has two control inputs 42a and 42b. Input 42a receives a control signal Sƒ CA  which specifies a frequency for the code PN 2  φ CA  and input 42b receives a control signal Sφ CA0  which specifies incremental phase charges for the code PN 2  φ CA . 
     In vehicle V A , the control signal Sφ MA0  is formed by an adder 13 as the sum of two phase other control signals Sφ MA1  and Sφ MA2 . Likewise, the control signal Sφ CA0  is formed by an adder 43 as the sum of two control signals Sφ CA1  and Sφ CA2 . Each of these signals specify incremental phase changes for the PN codes. Also, of particular importance in the present invention, are the two control signals Sφ MA2  and Sφ CA2 , since it is those signals which specify phase changes that compensate for drift. 
     In vehicle V A , the signals Sφ MA1 , Sφ MA2 , Sφ CA1 , Sφ CA2 , and Sƒ CA  are generated by a crystal oscillator 50, a lock control circuit 51, and a PN control circuit 52. These components are interconnected as shown. Oscillator 50 generates a clock signal CK A  with a frequency that nominally is ƒ A . Lock control circuit 51 generates a signal UD A  during data transmission which indicates whether the frequency of the PN code from generator 42 needs to speed up or slow down in order to be in sync with the code of the incoming modulated data. Signal D B  is the demodulated data that is received from vehicle V B . Also, signal&#39;s P A  and S A  come from external circuits and respectively indicate the position and speed of vehicle V A . 
     Likewise, in vehicle V B , the signals Sφ MB0 , Sƒ MB , Sφ CB0 , and Sƒ CB  are generated by a crystal oscillator 60, a lock control circuit 61, and a PN control circuit 62. Oscillator 60 generates a clock signal CK B  with a frequency that nominally is ƒ B . Lock control circuit 61 generates a signal UD B  during data transmission which indicates whether the frequency of the PN code from generator 22 needs to speed up or slow down in order to be in sync with the code of the incoming modulated data. Signal D A  is the demodulated data from vehicle V A . Also, signals P B  and S B  come from external circuits and respectively indicate the position and speed of the vehicle V B . 
     As indicated above, the clock signals CK A  and CK B  have nominal frequencies of ƒ A  and ƒ B  respectively. However, the actual frequencies of these clock signals deviate from the nominal value; and, it is the function of the two control signals Sφ MA2  and Sφ CA2  to compensate for this frequency deviation or drift. 
     How the PN control circuits 50 and 60 utilize their input signals to generate the PN generator control signals is illustrated in FIG&#39;s 2, 3 and 4. FIG. 2 shows cases #1 thru #4 which apply when the vehicle V A  and V B  move while data is not being transmitted between them. FIG. 3, shows cases #5 thru #8 which apply when the vehicles V A  and V B  move while data is being transmitted between them. Also, in both FIG&#39;s. 2 and 3, the oscillators 50 and 60 are assumed to have no drift; and in FIG. 4, the effect oscillator drift is addressed in cases #9 thru #12. 
     For all of the cases #1 thru #12, the vehicles V A  and V B  have respective positions at time t 0  of A(t 0 ) and B(t 0 ). Then at a later time t 1 , the position of vehicle V A  is A(t 1 ); and the position of vehicle V B  is B(t 1 ). Also, for the sake of simplicity, in all of the cases #1 thru #12 the codes PN 1  and PN 2  are assumed to have the same nominal frequency (i.e.--same nominal time per bit). Each of these cases will now be described. 
     Case #1--Here, vehicle V A  moves away from vehicle V B  while no data transmissions occur, and the extent of this movement is provided by the vehicle V A  position signal P A . Due to this movement, the number of PN 1  code bits x thru x+N that will exist between the vehicles V A  and V B  during a data transmission increases; and that increase is indicated as N 1 . Likewise, the number of PN 2  code bits y thru y+N that will exist between the vehicles V A  and V B  increases by N 1  bits. To compensate for this case #1 movement of vehicle V A , the PN 1  code phase φ MA  to modulator 10 is advanced by N 1  bits, and the PN 2  code phase φ CA  to correlator 41 is delayed by N 1  bits. These phase adjustments are specified by the control signals Sφ MA1  and Sφ CA1 . 
     Case #2--Here, vehicle V A  moves towards vehicle V B  while no data transmissions occur, and the extent of this movement is provided by the vehicle V A  position signal P A . Due to this movement, the number of PN 1  code bits x thru x+N that will exist between the vehicles V A  and V B  during a data transmission decreases; and that decrease is indicated as N 2 . Likewise, the number of PN 2  code bits y thru y+N that will exist between the vehicles V A  and V B  decreases by N 2  bits. To compensate for this case #2 movement of vehicle V A , the PN 1  code phase φ MA  to modulator 10 is delayed by N 2  bits, and the PN 2  code phase φ CA  to correlator 41 is advanced by N 2  bits. These phase adjustments are specified by the control signals Sφ MA1  and Sφ CA1 . 
     Case #3--Here, vehicle V B  moves away from vehicle V A  while data transmissions occur, and the extent of this movement is provided by the vehicle V B  position signal P B . Due to this movement, the number of PN 1  code bits x thru x+N that will exist between the vehicles V A  and V B  during a data transmission increase; and that increase is indicated as N 3 . Likewise, the number of PN 2  code bits y thru y+N that will exist between the vehicles V A  and V B  increases by N 3  bits. To compensate for this case #3 movement of vehicle V B , the PN 2  code phase φ MB  to modulator 30 is advanced by N 3  bits, and the PN 1  code phase φ CB  to correlator 21 is delayed by N 3  bits. These phase adjustments are specified by the control signals Sφ MB0  and Sφ CB0 . 
     Case #4--Here, vehicle V B  moves towards vehicle V A  while no data transmissions occur, and the extent of this movement is provided by the vehicle V B  position signal P B . Due to this movement, the number of PN code bits x thru x+N that will exist between the vehicles V A  and V B  during a data transmission decrease; and that decrease is indicated as N 4 . Likewise, the number of PN 2  code bits y thru y+N that will exist between the vehicles V A  and V B  decreases by N 4  bits. To compensate for this case #4 movement of vehicle V B , the PN 2  phase φ MB  to modulator 30 is delayed by N 4  bits, and the PN 1  code phase φ CB  to correlator 21 is advanced by N 4  bits. These phase adjustments are specified by the control signals Sφ MBO  and Sφ CB0 . 
     Case #5--Here, vehicle V A  moves away from vehicle V B  while data transmissions occur, and the effect of this movement is tracked by the lock control circuits 51 and 61. Due to this movement, the number of PN 1  code bits x thru x+N between the vehicles V A  and V B  increases; and that increase is indicated as N 5 . Likewise, the number of PN 2  code bits L y thru y+N between the vehicles V A  and V B  increases by N 5  bits. To compensate for this case #5 movement of vehicle V A , the PN 1  code phase φ CB  to correlator 21 is delayed by N 5  bits, and the PN 2  code phase φ CA  to correlator 41 is delayed by N 5  bits. These phase adjustments are made by the frequency control signals Sƒ CA  and Sƒ CB . That is, the frequency of the codes PN 1  and PN 2  is decreased. 
     Case #6--Here, vehicle V A  moves towards vehicle V B  while data transmissions occur, and the effect of this movement is tracked by the lock control circuits 51 and 61. Due to this movement, the number of PN 1  code bits x thru x+N between the vehicles V A  and V B  decreases; and that decrease is indicated as N 6 . Likewise, the number of PN 2  code bits y thru y+N between the vehicles V A  and V B  decreases by N 6  bits. To compensate for this case #6 movement of vehicle V A , the PN 1  code phase φ CB  to correlator 21 is advanced by N 6  bits, and the PN 2  code phase φ CA  to correlator 41 is advanced by N 6  bits. These phase adjustments are made by the frequency control signals Sƒ CA  and Sƒ CB . That is, the frequency of the codes PN 1  and PN 2  is increased. 
     Case #7--Here, vehicle V B  moves away from vehicle V A  while data transmissions occur, and the effect of this movement is tracked by the lock control circuits 51 and 61. Due to this movement, the number of PN 1  code bits x thru x+N between the vehicles V A  and V B  increases; and that increase is indicated as N 7 . Likewise, the number of PN 2  code bits y thru y+N between the vehicles V A  and V B  increases by N 7  bits. To compensate for this case #7 movement of vehicle V B , the PN 1  code phase φ CB  to correlator 21 is delayed by N 7  bits, and the PN 2  code phase φ CA  to correlator 41 is delayed by N 7  bits. These phase adjustments are made by the frequency control signals Sƒ CA  and Sƒ CB . 
     Case #8--Here, vehicle V B  moves toward vehicle V A  while data transmissions occur, and the effect of this movement is tracked by the lock control circuits 51 and 61. Due to this movement, the number of PN 1  code bits x thru x+N between the vehicles V A  and V B  decreases; and that decrease is indicated as N 8 . Likewise, the number of PN 2  code bits y thru y+N between the vehicles V A  and V B  decreases by N 8  bits. To compensate for this case #8 movement of vehicle V A , the PN 1  code phase φ CB  to correlator 21 is advanced by N 8  bits, and the PN 2  code phase φ CA  to correlator 41 is advanced by N 8  bits. These phase adjustments are made by the frequency control signals Sƒ CA  and Sƒ CB . 
     Case #9--Here, vehicle V A  has no movement relative to vehicle V B . However, the clock signal CK A  from oscillator 50 drifts above its nominal frequency. Due to this drift, the number of PN 1  code bits x thru x+N that will exist between the vehicles V A  and V B  during a data transmission increases; and that increase is indicated as N 9 . Likewise, the number of PN 2  code bits from PN generator 42 to correlator 41 in vehicle V A  increases by N 9  bits. To compensate for this case #9 drift in oscillator frequency, the PN 1  code phase φ CB  to correlator 21 is advanced by N 9  bits, and the PN 2  code phase φ CA  to correlator 41 is delayed by N 9  bits. 
     Case #10--Here, vehicle V A  has no movement relative to vehicle V B . However, the clock signal CK A  from oscillator 50 drifts below its nominal frequency. Due to this drift, the number of PN 1  code bits x thru x+N that will exist between the vehicles V A  and V B  during a data transmission decreases; and that decrease is indicated as N 10 . Likewise, the number of PN 2  code bits from PN generator 42 to correlator 41 in vehicle V A  decreases by N 10  bits. To compensate for this case #10 drift in oscillator frequency, the PN 1  code phase φ CB  to correlator 21 is delayed by N 10  bits, and the PN 2  code phase φ CA  to correlator 41 is advanced by N 10  bits. 
     Case #11--Here, vehicle V A  has no movement relative to vehicle V B . However, the clock signal CK B  from oscillator 60 drifts above its nominal frequency. Due to this drift, the number of PN 2  code bits Y thru Y+N that will exist between the vehicles V B  and V A  during a data transmission increases; and that increase is indicated as N 11 . Likewise, the number of PN 2  code bits from PN generator 22 to correlator 21 in vehicle V B  increases by N 11  bits. To compensate for this case #11 drift in oscillator frequency, the PN 1  code phase φ CB  to correlator 21 is delayed by N 11  bits, and the PN 2  code phase φ CA  to correlator 41 is advanced by N 11  bits. 
     Case #12--Here, vehicle V A  has no movement relative to vehicle V B . However, the clock signal CK B  from oscillator 60 drifts below its nominal frequency. Due to this drift, the number of PN 2  code bits Y thru Y+N that will exist between the vehicles V B  and V A  during a data transmission decreases; and that decrease is indicated as N 12 . Likewise, the number of PN 2  code bits from PN generator 22 to correlator 21 in vehicle V B  decreases by N 12  bits. To compensate for this case #12 drift in oscillator frequency, the PN 1  code phase φ CB  to correlator 21 is delayed by N 12  bits, and the PN 2  code phase φ CA  to correlator 41 is advanced by N 12  bits. 
     Now, in any given time interval, several of the cases #1 thru #12 can occur in combination; and, the resulting effect on the phase changes is given superposition. Further, by examining all of the above described cases #1 thru #12, an equation can be derived which expresses the total drift of the oscillators 50 and 60 in terms of the various phase changes which occur. This expression for drift is derived in FIG. 5. 
     Consider first just the cases #9 thru #12. There, the phase change Δφ CA  is produced totally by drift, and the phase change Δφ CB  is also produced totally by drift. Further, these phase changes Δφ CA  and Δφ CB  are equal in magnitude and opposite in polarity Thus, for cases #9 thru #12, the combined drift of the oscillators 50 and 60 can be expressed as equation 1 wherein a &#34;+&#34; value indicates the drift is fast and a &#34;-&#34; value indicates the drift is slow. 
     Next consider the cases #5 thru #8. There, the movement of the vehicles V A  and V B  (rather than oscillator drift) is the cause of the phase changes Δφ CA  and Δφ CB . However, phase changes Δφ CA  and Δφ CB  in cases #5 thru #8 have equal magnitude and the same polarity. Thus, if the phase changes in equation 1 are due partly to vehicle movement of cases #5 thru #8 and partly to oscillator drift of cases #9 thru #12, the portion of phase changes due to vehicle movement will cancel. Consequently, equation 1 is a valid measure of drift for all of the cases #5 thru #12, and this is stated by equation 2. 
     Next, consider the cases #3 and #4. There, the movement of vehicle V B  causes the phase change Δφ CB  ; and it also causes a phase change Δφ MB  which is equal in magnitude but opposite in polarity to the Δφ CB  phase change. Now this phase change Δφ CB  of cases #3 and #4 needs to be subtracted from the total Δφ CB  phase change as produced by all the cases in order to be left with a Δφ CB  phase change of just cases #9 thru #12. To achieve that subtraction, the phase change Δφ MB  need only be added to the total phase change Δφ CB . This is stated by equation 3; and, the resulting new equation for drift is given by equation 4. 
     Lastly, consider the cases #1 and #2. There, the movement of vehicle V A  causes the phase change Δφ CA  ; and it also causes a phase change Δφ MA  which is equal in magnitude but opposite in polarity to the Δφ CA  phase change. This phase change Δφ CA  of cases #1 and #2 needs to be subtracted from the total Δφ ca  phase change as produced by all the cases in order to be left with a Δφ CA  phase change of just cases #9 thru #12. To achieve that subtraction, the phase change Δφ MA  need only be added to the total phase change Δφ CA .This is stated by equation 5; and, the resulting final equation for drift is given by equation 6. 
     Turning now to FIG&#39;s. 6 and 7, they show a numerical example of how drift is determined by equation 6. In FIG. 6, the first line L1 gives the initial value, at time t 0  of the PN 1  code phases φ MA  and φ CB  ; and, line L1 also gives the initial value of PN 2  code phases φ MB  and φ CA . 
     These code phases of line L1 indicate that the vehicles V A  and V B  are separated initially by 100 code bits. That is, the distance between vehicles is (100)(C)(T) where T is the time per bit of the PN code and C is the speed of light. 
     Next in FIG. 6, the lines L2 thru L7 list various events which occur after time t 0  that cause the PN code phases to change. Each of these events corresponds to one of the above described cases #1 thru #12. 
     At line L2, vehicle V A  moves away from vehicle V B  by 50 PN code bits as per case #1. Thus, φ MA  changes from +300 to +350; and, φ CA  changes from +500 to +450. 
     At line L3, vehicle V B  moves away from vehicle V A  by 20 bits as per case #7. Thus, φ CB  changes from +200 to +180; and φ CA  changes from +450 to +430. 
     At line L4, vehicle V A  moves closer to vehicle V B  by 60 bits per case #6. Thus, φ CB  changes from +180 to +240; and, φ CA  changes from +430 to +490. 
     At line L5, vehicle V B  moves closer to vehicle V A  by 10 bits per case #4. Thus, φ CB  changes from +240 to +250; and φ MB  changes from +600 to +590. 
     At line L6, the oscillator in vehicle V A  drifts fast 30 bits as per case #9. Thus, φ CA  changes from +490 to +460; and, φ CB  changes from +250 to +280. 
     At line L7, the oscillator in vehicle V B  drifts slow 15 bits as per case #12. Thus, φ CA  changes from +460 to +445; and, φ CB  changes from +280 to +295. 
     In FIG. 7, equation 10 restates the previously derived equation 5 for drift. Next in FIG. 7, equation 11 is obtained by substituting into equation 10 the numerical values of the total phase changes that occurred in the FIG. 6 example. Then, equation 11 is evaluated as shown by equation 12; and that yields a final value drift of +45. 
     Suppose now that all of the above phase changes of equation 10 occur over a time interval ΔT X . In that case, a drift rate DR can be expressed as stated by equation 20 in FIG. 8. 
     Next, suppose that after the above drift rate DR is determined, all data transmissions between the vehicles V A  and V B  stop for a time interval ΔT Y . This is stated by equation 21. During that time interval ΔT Y , the oscillators 50 and 60 will continue to drift at or near the drift rate DR. Thus, if data transmission between the vehicles V A  and V B  is attempted to be re-established at the end of time interval ΔT Y , the PN code phases φ MA  and φ CB  will be misaligned, and the PN code phases φ MB  and φ CA  and will be misaligned. 
     However, the code phases φ MA  and φ CB  can be realigned by shifting code phase φ MA  by an amount -DR[ΔT Y  ]. Likewise, the code phases φ MB  and φ CA  can be realigned by shifting code phase φ CA  by -DR[ΔT Y  ]. This is stated by equation 22. 
     Note that the amount DR[ΔT Y  ] will in general not be an integer; and so to simplify implementation of the above phase shifts, the amount of the shift preferably is I{DR[ΔT Y  ]} where I{ } indicates the largest integer within the brackets. This is stated in FIG. 8 by equation 23. That equation 23 phase shift will be specified in FIG. 1 by the control signals Sφ MA2  and Sφ CA2 . 
     A primary feature of the above described drift compensation process is that it enables data transmissions between the vehicles V A  and V B  to be re-established very quickly. Suppose, for example, that ΔT X  in equation 20 is 2 seconds and ΔT Y  in equation 21 is 2 hours. In that case, the drift rate for the example of FIG&#39;s 6 and 7 would be 45÷2 bits/sec or 22.5 bits/sec. Thus, the total drift during ΔT Y  would be (2)(60)(60)(22.5) bits or 162,000 bits. 
     Without the present drift compensation, the above 162,000 bit offset would be undetected; and thus, data transmissions can be re-established only by guessing at how much to shift the PN codes to the correlators until proper alignment is achieved through trial and error. But with the present invention, the above 162,000 bit offset is known and completely eliminated by equation 23. 
     Throughout the above description of FIG&#39;s 2 thru 8, it was assumed for the sake of simplicity that the PN codes PN 1  and PN 2  had the same nominal frequency. However, the present invention also applies when the PN codes PN 1  and PN 2  have different nominal frequencies. This is shown in FIG. 9. 
     To begin in FIG. 9, equation 30 gives an expression for drift rate in terms of PN code phase shifts Δφ MA , Δφ CA , Δφ MB , and Δφ CB  as was previously derived in FIG&#39;s. 5 and 8. Recall that equation 30 was derived by analyzing the various phase shift results that occurred in codes #1 thru #12. In case #1, for example, the phase shift Δφ MA  was +N 1  and the phase shift Δφ CA  was -N 1 . Now, if in case #1, the frequency of code PN 1  was twice the frequency of code PN 2 , then the case #1 result will be changed to Δφ MA  =+2N 1  and Δφ CA  =-N 1 . 
     In more general terms, suppose in case #1 that the time period per bit of code PN 1  is T 1  and the time period per bit of code PN 2  is T 2 . Then the result of case #1 will be changed to Δφ MA  T 1  =-Δφ CA  T 2 . 
     Each of the phase shift results in cases #1 thru #12 can be generalized in a similar fashion. Thus, to express equation 30 in more general terms, all that is needed is a substitution of variables as given by equation 31. Making the substitution of equation 31 into equation 30 yields equation 32. 
     If data transmissions stop for the time period ΔT Y , then to compensate for drift, the PN 1  code from PN generator 11 is shifted in time by -DR 2  [ΔT Y  ]; or equivalently, it is shifted in bits by -DR 2  [ΔT Y  ]÷T 1 . Likewise, the PN 2  code from generator 42 is shifted in time by -DR 2  [ΔT Y  ]; or equivalently, it is shifted in bits by -DR 2  [ΔT Y  ]÷T 2 . This is stated by equation 33; and, in FIG. 1, the phase shifts of equation 33 are specified by the control signals Sφ MA2  and Sφ CA2 . 
     Turning now to FIG. 10, it shows the internal makeup of PN control circuits 52 and 62 which generate all of the above control signals. PN Control Circuit 52 includes a clock synthesizer 52a, a difference counter 52b, a phase control circuit 52c, and a clock drift compensation circuit 52d. All of those components are interconnected as illustrated. Similarly, PN control circuit 62 includes a clock synthesizer 62a, a difference counter 62b, and a phase control circuit 62c. 
     Considering first the phase control circuit 52c, it receives the position signal P A  for vehicle V A , and in response, generates the phase control signals Sφ CA1 , and Sφ MA1 . This operation occurs during the previously described cases #1 and #2. For example, in case #1, vehicle V A  moves away from vehicle V B  while no data transmissions occur. In that case, circuit 52c determines the extent of the movement from signal P A  in terms of PN 1  code bits, and the result is indicated in the control signals Sφ CA1  and Sφ MA1 . For example, if vehicle V A  moves 1000 feet away from vehicle V B  and the modulated data from vehicle V A  travels 2 feet during one Bit time of code PN 1 , then signal Sφ MA1  will be +500. 
     Similarly the phase control circuit 62c receives the position signal P B  for vehicle V B , and in response, indicates the distance traveled in terms of PN 2  code bits in the phase control signals Sφ CB  and Sφ MB . This operation occurs during the previously described cases #3 and #4. 
     Next, considering the clock synthesizer 52a, it uses the oscillator clock signal CK A  to internally synthesize another clock CK A  which nominally is at the desired correlation frequency for vehicle V A . That clock signal CK CA  is then processed within circuit 52a in response to the UD A  signal from the lock circuit 51 and the velocity signal V A  ; and, the resulting signal is Sf CA . This signal processing includes shifting the frequency of signal Sf CA  up/down during data transmissions in response to signal UD A  in order to stay locked to incoming data, and shifting the frequency of signal Sf CA  up/down in response to the speed signal S A  in order to compensate for Doppler shifts. 
     Likewise, the clock synthesizer 52a uses the oscillator clock signal CK A  to internally synthesize another clock CK MA  which nominally is at the desired modulation frequency for vehicle V A . That clock signal CK MA  is then processed in response to the speed signal S A  in order to compensate for Doppler shift; and the resulting signal is Sf MA . These two signals Sf CA  and Sf MA  are used in the previously described cases #5 thru #8. 
     Similarly, the clock synthesizer 62a, uses the oscillator clock signal CK B  to internally synthesize another clock CK CB  which nominally is at the desired correlation frequency for vehicle V B . That clock signal CK CB  is then processed during data transmissions in response to the UD B  signal from the lock circuit 61 in order to stay locked to incoming data, and the speed signal S B  in order to compensate for Doppler shift; and, the resulting signal is Sf CB . 
     Likewise, the clock synthesizer 52a uses the oscillator clock signal CK B  to internally synthesize another clock CK MB  which nominally is at the desired modulation frequency for vehicle V B . That clock signal CK MB  is then processed in response to the speed signal S B  in order to compensate for Doppler shift; and the resulting signal is Sf MB . These two signals Sf CB  and Sf MB  are used in the previously described cases #5 thru #8. 
     Considering next the difference counter circuit 52b, it detects the difference in frequency between the signals CK CA  and Sf CA . In FIG. 10, a signal Δf CA  gives this difference in frequency. For example, Δf CA  =+10 indicates the frequency of signal CK CA  is more than the frequency of signal Sf CA  by +10 cycles/sec. Also, circuit 52b detects the difference in frequency between the signal CK MA  and Sf MA , and a signal Δf MA  gives that difference in frequency. For example, Δƒ MA  =-5 indicates the frequency of signal CK MA  is less than the frequency signal Sf MA  by 5 cycles/sec. 
     Likewise, the difference counter circuit 62b detects the difference frequency between the signals CK CB  and Sf CB . In FIG. 10, a signal Δf CB  gives this difference in frequency. Also, circuit 62b detects the difference in frequency between the signal CK MB  and Sf MB , and a signal Δf MB  gives that difference in frequency. 
     One of the causes for the signals Δf CA  and Δf CB  to have non-zero values is the occurrence of the FIG. 3 cases #5 thru #8. In case #5, for example, vehicle V A  moves while data is being transmitted and received; and so in order for the PN codes to the correlators to stay locked to the PN code in the received modulated data, the PN codes to the correlators must change phase. This need for a phase change as sensed in the lock circuits and indicated by the up/down signals UD A  and UD B , which in turn produces a frequency change in the signals Sf CA  and Sf CB . 
     Also, another cause for the signals Δf CA  and Δf CB  to have non-zero values is the occurrence of the FIG. 4 cases #9 thru #12. In case #9, for example, the oscillator clock signal CK A  drifts fast while data is being transmitted. Thus, in order for the PN codes to the correlators to stay locked to the PN code in the received modulated data, the PN codes to the correlators must change phase. That need for a phase change is sensed in the lock circuits and indicated by the up/down signals UD A  and UD B , which in turn produces a frequency change in the signals Sf CA  and Sf CB . 
     Further, a cause for the signals Δf MA  and Δf MB  to have non-zero values is the occurrence of the speed signals S A  and S B  in cases #5 thru #12. This is because in response to the speed signals, the frequency of the modulator signals Sf MA  and Sf MB  is shifted up or down from its nominal value in order to compensate for Doppler effects 
     Now in vehicle V A , both of the signals Δf CA  and Δf MA  are sent to the phase control circuit 52c; and there, the corresponding change in phase is integrated over time. For example, if signal Δf CA  equals +10 cycles per second, circuit 52 will internally store ∫Δf CA  =+10 after 1 second, =+20 after 2 seconds; etc. Likewise, if Δf MA  equals -2 cycles per second, then circuit 52 will store ∫Δf MA  =-2 after 1 second, =-4 after 2 seconds, etc. 
     Also, circuit 52c adds to the above quantities ∫Δf CA  and ∫Δf MA , any phase change that is specified by the signals Sφ MA  and Sφ CA1 . For example, if the signals Sφ CA1  =-5 and Sφ MA  =+5 due to a case #1/#2 type change in position of vehicle V A , then the above integration will be modified to ∫Δf CA  =+-5 or +15 and ∫Δ MA  =-4 +5 or +1. This net result is provided by circuit 52c as &#34;Phase Data A&#34;, and it equals the terms Δφ MA  and Δφ CA  in the previously derived equation 32 of FIG. 9. 
     Likewise, in vehicle V B , both of the signals Δf CB  and Δf MB  are sent to the phase control circuit 62c; and there, the corresponding phase changes are integrated over time. Also, circuit 62c adds to that integration any phase shift that is specified by the signals Sφ CB0  and Sφ MB0  due to a case #3/#4 type change in position of vehicle V B . This net result is provided by circuit 62c as &#34;Phase Data B&#34;, and it equals the terms Δφ MB  and Δφ CB  in equation 32 of FIG. 9. 
     In order to transmit the &#34;Phase Data B&#34; information from vehicle V B  to vehicle V A , a multiplexer 23 is included in vehicle V A  as shown in FIG. 1. Then in vehicle V A , the &#34;Phase Data B&#34; information is received by the FIG. 10 clock drift compensation circuit 52d. That circuit 52d then combines the &#34;Phase Data A&#34; information and &#34;Phase Data B&#34; information in accordance with equation 32 of FIG. 9 to thereby obtain the oscillator drift rate DR. 
     After the drift rate DR is determined, that value is stored in circuit 52d. Thereafter, when data transmissions between the vehicle V A  and V B  stop, circuit 52 measures the time interval ΔT Y  which passes until data transmissions are to be re-established. Then, just prior to starting the new transmissions, circuit 52d determines the values of the phase shift correction terms Δφ MA  and Δφ CA  as given by equation 33 of FIG. 9; and, circuit 52d generates the signals Sφ MA2  and Sφ CA2  with those values. 
     In vehicle V B , the Phase Data B information must be accumulated during the same time internal ΔT X  that the Phase Data A information is accumulated in vehicle V A . Thus, to synchronize this accumulation of data, vehicle V A  sends a command to vehicle V B  which starts the time interval ΔT X  when the command is received. 
     Alternatively, the vehicles V A  and V B  both receive a timing signal for an external source, and the time interval ΔT X  starts upon receipt of that timing signal. For example, the vehicle V A  and V B  receives the time of day from a satellite; and in response the vehicle V A  and V B  starts the time interval ΔT X  every 1-10 minutes. 
     Also, as another alternative, the Phase Data B information that is transmitted to vehicle V A  is the PN code phases φ MB  and φ CA  which occur at the start of time interval ΔT X , and the PN code phases φ MB  and φ CA  which occur at the end of time interval ΔT X . Those four phase values are simply subtracted in vehicle V A  in order to obtain the terms Δφ MB  and Δφ CB  in the drift rate equation 32. 
     Further, as still another modification, only one of the oscillators 50 and 60 in FIG. 1 is a crystal oscillator which drifts; and, the other oscillator is an atomic oscillator. Also, the oscillator which drifts need not be a crystal oscillator; it can be any oscillator which drifts substantially more in frequency than an atomic oscillator. Atomic oscillators are characterized as having a frequency drift of less 10 -9  cycle per cycle over their lifetime, whereas the oscillators 50 and/or 60 can have a drift which is larger by a factor of ten, or a hundred, or a thousand. 
     As still another modification, the phase shift correction terms Δφ MB  and Δφ CA  as given by equation 33 of FIG. 9 can be changed to Δφ MA  ≈-(DR)ΔT Y  ÷T 1  and Δφ CA  ≈(DR)ΔT Y  ÷T 2 . Here, the approximate sign &#34;≈&#34; enables a particular implementation to make minor deviations from equation 33 and still use the basic inventive concept. Preferably, the modified phase corrections as given above are within 10% of the phase correction as given by equation 33. 
     As yet another modification, the phase of code PN 1  φ MA  can be shifted by the correction amount Δφ MA  as given above by utilizing signal Sƒ MA , rather than signal Sφ MA2 , to achieve that shift. For example, if the phase correction Δφ MA  is to be +1000 bits, then signal Sƒ MA  can be increased in frequency by +100 H 3  for 10 seconds. Likewise, the phase of code PN 2  φ CA  can be shifted by the correction amount Δφ CA  as given above by utilizing signal Sƒ CA . For example, if the correction Δφ CA  is -500 bits, then signal Sƒ CA  can be decreased in frequency by +100H 3  for 5 seconds. 
     In view of the above variations and modifications, it is to be understood that the invention is not limited to just the preferred method and circuitry as illustrated in the figures but is defined by the appended claims.