A quieter code series can still carry a growing mismatch
A receiver uses carrier phase to smooth its noisier code measurements. The plotted series becomes calmer. That is useful, but it does not prove that every unwanted contribution became smaller. If code and carrier respond differently to a changing ionosphere, a longer smoothing memory can trade reduced random variation for a systematic mismatch.
This guide explains a simple carrier-smoothed-code recursion from first principles. Original fictional sequences show how motion is carried forward, why a constant carrier ambiguity can cancel, how fixed-gain memory differs from a strict sliding window, and what changes when an observation arc is interrupted.
The examples are not receiver settings or field-quality thresholds. They isolate the filter’s mathematical behaviour. Real processing needs compatible signals, validated corrections and an appropriate continuity and uncertainty account; a pleasing plot alone is not an accuracy test.
Geodesy subject guide · Learning that transfers into life · How X Works hub
Choose your reading route
Route 1 · Chapters 1–2: Define code and carrier roles
Route 2 · Chapters 3–5: Work the smoothing recursion
Route 3 · Chapters 6–8: Inspect memory and noise
Translate sample memory into a time interpretation carefully
Route 4 · Chapters 9–10: Test divergence and interruptions
Route 5 · Chapters 11–12: Transfer and report
Full chapter index · Independent worked case · Questions and practical checks
Chapter index
Define code and carrier roles
Separate an observation from its filtered estimate
Define the recursion and its initial state
Work the smoothing recursion
Work a three-epoch sequence with changing range
Show why a constant carrier ambiguity cancels
Distinguish a cumulative average from capped memory
Inspect memory and noise
Translate sample memory into a time interpretation carefully
Propagate code noise under a deliberately restricted model
Restore carrier noise and respect shared terms
Test divergence and interruptions
Introduce opposite ionospheric signs explicitly
Derive the linear-drift divergence and the capped limit
CHAPTER 1 OF 12 · Define code and carrier roles
1. Separate an observation from its filtered estimate
A code pseudorange and a carrier-phase observation describe related signal information, but they have different ambiguity and noise characteristics. Carrier smoothing combines them to estimate a code-aligned quantity with reduced variation under a specified model. The result is a derived observation, not a new independent measurement added to the raw data.
ESA Navipedia presents the Hatch-filter recursion and explains the code–carrier divergence caused by changing ionospheric contributions. This article uses those relationships with original teaching data rather than adopting legacy example smoothing lengths or accuracy values as universal receiver recommendations.
Before smoothing, identify the satellite, signal, units and tracking arc. Code in metres cannot be added directly to carrier phase in cycles. Convert phase with the appropriate wavelength when required and preserve the observation identity. An algebraically valid filter cannot repair a mismatch between different signals or time tags.
Also identify what has already been corrected. Atmospheric and antenna terms, clock contributions and other modelling choices can affect the relationship being smoothed. Our first examples deliberately assume that code and carrier share the same changing range-like contribution apart from a constant carrier offset and stated noise. Later chapters remove the ionospheric simplification.
CHAPTER 2 OF 12 · Define code and carrier roles
2. Define the recursion and its initial state
Let Pk be code in metres, Φk carrier phase expressed in metres, and Sk the smoothed code estimate at epoch k. Write Sk = βkPk+(1−βk)[Sk−1+(Φk−Φk−1)]. The bracket predicts the current code-aligned value by carrying the previous estimate forward with the carrier change. The new code observation then corrects that prediction.
For a growing start-up average, choose βk = 1/k and initialise S1 = P1. In a common capped form, the count grows until a chosen N and then βk stays at 1/N. These define a particular recursion; another smoothing system can use different weighting or state models. The meaning of a parameter called window must be checked from the equation.
The carrier increment is essential. Simply averaging code values from a moving receiver can mix different underlying ranges. Transporting the previous estimate using a compatible carrier increment attempts to align past code information with the current event. This is not the same as claiming that the raw range itself is constant.
The initial value and arc boundary belong to the filter record. A series starting at epoch one and one resumed from an earlier state can have different outputs for the same current observations. Preserve whether a reported estimate was newly initialised, already converged under a model, or carrying history across a gap.
CHAPTER 3 OF 12 · Work the smoothing recursion
3. Work a three-epoch sequence with changing range
Choose fictional true range-like values 100,101 and102 metres. Let code observations be 100.6,100.7 and102.3, containing invented errors +0.6,−0.3 and+0.3. Let carrier observations be 150,151 and152 metres, sharing the same range changes and an arbitrary constant offset of fifty metres, with carrier noise omitted initially.
Initialise S1 = 100.6. At the second epoch, the carrier increment is one metre, so the transported prediction is 101.6. With β2 = 1/2, S2 = 0.5×100.7+0.5×101.6 = 101.15 metres. The current range error is +0.15, the average of the first two code errors.
At the third epoch, the transported prediction is 102.15. With β3 = 1/3, S3 = 102.3/3+2×102.15/3 = 102.2 metres. The error is +0.2, matching the average of +0.6,−0.3,+0.3. The code history was averaged after its range changes were aligned.
Reverse the calculation by subtracting the true range at each epoch. The residual errors become 0.6,0.15,0.2, not an average of the changing raw ranges. This check exposes an implementation that smooths positions or ranges directly without the carrier transport assumed by the recursion. The smoother’s target must remain explicit throughout the calculation.
CHAPTER 4 OF 12 · Work the smoothing recursion
4. Show why a constant carrier ambiguity cancels
During the growing-average stage, the recursion can be written Sk = Φk+mean(Pi−Φi) over the current uninterrupted arc. If Φi = ri+B with constant B and noiseless carrier, then Pi−Φi = code error−B. Adding Φk cancels B and leaves the current range rk plus the average code error.
For the three-epoch example, P−Φ values are −49.4,−50.3 and−49.7. Their average is −49.8. Adding Φ3 = 152 gives 102.2, matching the recursive calculation. The fifty-metre ambiguity offset was arbitrary; it does not become a fifty-metre code error merely because carrier information was used.
Now add another ten metres to every carrier observation. The increments are unchanged, so every recursive output is unchanged. In the alignment form, the mean P−Φ decreases by ten while the current Φ increases by ten. This invariance is a useful synthetic test of constant-offset handling.
The cancellation relies on constancy over the supported arc and on compatible units and observations. A time-varying phase contribution, an ambiguity change or an unmodelled ionospheric difference is not a constant B. Do not generalise the result into a claim that carrier discontinuities or all phase-model errors disappear when smoothing code.
CHAPTER 5 OF 12 · Work the smoothing recursion
5. Distinguish a cumulative average from capped memory
With βk = 1/k throughout, each aligned code sample receives equal weight in the growing average. Once β is held at 1/N, the recursion becomes a fixed-gain filter on the alignment term. Earlier information decays geometrically instead of dropping out abruptly after exactly N samples.
Use fictional N = 4, so β = 0.25 and α = 1−β = 0.75. An isolated +0.4-metre code perturbation introduced after start-up contributes +0.1 to the current output. Its subsequent contributions are +0.075,+0.05625 and+0.0421875 metres, assuming all other inputs are unchanged in the error comparison.
A strict four-sample equal-weight window would instead retain one quarter of that perturbation while it remains in the window and then remove it completely. The two filters can have similar informal window labels while possessing different impulse responses. Read the actual recursion before assigning a finite memory length.
Geometric memory is not a defect; it is a defined weighting choice. The important question is whether its response fits the quantity and time scale being estimated. Preserve the gain, sample spacing and initialisation so another person can reconstruct how old observations contribute to a present value.
CHAPTER 6 OF 12 · Inspect memory and noise
6. Translate sample memory into a time interpretation carefully
For the fixed-gain error response, an old contribution is multiplied by α each sample. With α = 0.75, it falls below half its initial size after about log(0.5)/log(0.75) = 2.409 sample intervals. That is a half-life of this exponential weighting, not a hard cutoff and not the filter’s universal convergence time.
If samples are one second apart, the illustrative half-life is about 2.409 seconds. If samples are ten seconds apart, it is about 24.09 seconds. Reusing N without recording the observation spacing can therefore change the physical time memory substantially. A count is not a duration by itself.
Irregular gaps require particular care. An unchanged fixed gain per update weights by the number of updates, not necessarily by elapsed physical time. A validated system may use time-aware gains or reinitialisation rules. This article does not prescribe which rule is correct for a real receiver; it shows why the timing account matters.
A useful metadata record identifies whether the filter step follows each observation, each accepted observation or a regular output interval. Rejected samples and gaps can change the effective history. A plotted output timestamp alone may not reveal how much information was carried from before an interruption.
CHAPTER 7 OF 12 · Inspect memory and noise
7. Propagate code noise under a deliberately restricted model
Assume independent zero-mean code errors with variance σP², perfect carrier increments and a correct common range model. During the growing-average stage, the smoothed error is the average of k code errors. Its variance is σP²/k. This familiar reduction follows from the stated independence and transport assumptions, not from smoothing as a universal accuracy guarantee.
For fixed β = 1/N, the code-noise error recursion is ek = αek−1+βnk. In steady state under independent input noise, V = α²V+β²σP², so V = β²σP²/(1−α²) = σP²/(2N−1). For fictional N = 4, that is σP²/7, not σP²/4.
The difference from a strict four-sample mean is consistent with the exponential memory derived earlier. With σP = 0.6 metres, the restricted steady-state standard uncertainty is 0.6/√7, approximately 0.226779 metres. This is an invented noise exercise, not a receiver performance claim or a recommendation to use N = 4.
A shared code bias is not reduced by those formulas. If every code error contains the same b, the aligned estimate retains b. An uncertainty budget that includes only independent white-like variation can therefore understate the remaining uncertainty even when its predicted scatter reduction matches the observed plot.
CHAPTER 8 OF 12 · Inspect memory and noise
8. Restore carrier noise and respect shared terms
During growing averaging, write the carrier noise as ηi and code noise as ni. The smoothed error contains mean(ni)+ηk−mean(ηi). The current carrier noise appears twice in that expression, so the terms are not independent. Treating the current carrier and its own average as unrelated would double-count part of their uncertainty.
If code and carrier noises are mutually independent and each sequence is independent across epochs, with variances σP² and σΦ², the growing-stage variance is σP²/k+σΦ²(1−1/k). The carrier contribution approaches σΦ² rather than continuing to zero. This is a conditional algebraic result for the declared simple noise model.
Use fictional σP = 0.6 metres, σΦ = 0.01 metres and k = 4. The variance is 0.36/4+0.0001×0.75 = 0.090075 square metres, with standard uncertainty approximately 0.300125 metres. At k = 100, the variance becomes 0.003699, giving approximately 0.060819 metres.
Real observation noise and multipath can be correlated. Adjacent carrier-noise increments ηk−ηk−1 and ηk+1−ηk share ηk with opposite signs; under the simple independent-η model their covariance is −σΦ². Do not treat all increments as independent merely because they occupy different rows. The filter reuses information, and its uncertainty account must reflect that reuse.
CHAPTER 9 OF 12 · Test divergence and interruptions
9. Introduce opposite ionospheric signs explicitly
Now use a simplified noiseless single-frequency model Pk = rk+Ik and Φk = rk−Ik+B. Here r collects the shared range-like contributions and I is the code ionospheric delay under the chosen model. The carrier ionospheric contribution has the opposite sign. Thus P−Φ = 2I−B, not a constant when I changes.
Substituting into the alignment expression gives Sk = rk+Ik+2[mean(Ii)−Ik] during growing averaging. The extra term is the divergence relative to the current unsmoothed code target rk+Ik. A longer history can retain an older ionospheric level while the current code responds to the present one.
Use fictional constant r = 100 metres, B = 50 metres and I values 0,0.1,0.2 metres. The code is 100,100.1,100.2; carrier is 150,149.9,149.8. The growing smoother gives 100 at each epoch. At the third epoch, its difference from current code is −0.2 metres even though neither sequence contains random noise.
That mismatch is not proof that the receiver moved or that the code observation was wrong. It is the predictable consequence of combining signals with opposite ionospheric responses through this filter. The example makes a quieter output compatible with a growing model mismatch, which is why variance reduction and bias control need separate evidence.
CHAPTER 10 OF 12 · Test divergence and interruptions
10. Derive the linear-drift divergence and the capped limit
Let the fictional ionospheric delay increase by g metres per sample. During growing averaging, the mean of the past delay values lags the current value by g(k−1)/2. The divergence term is therefore −g(k−1). With g = 0.1, it is −0.1 at epoch two and −0.2 at epoch three, matching the worked sequence.
For fixed β = 1/N, let bk denote the smoothed-minus-current-code mismatch with noise omitted. The recursion becomes bk = α[bk−1−2g]. Its steady-state value satisfies b = αb−2αg, hence b = −2(N−1)g. For fictional N = 4 and g = 0.1, that limit is −0.6 metres.
This is not a universal ionospheric error size. It follows from a constant delay increment per sample and the specified fixed gain. Changing the sample interval changes the increment g associated with a given physical delay rate. A time-based interpretation requires both the rate and the actual update timing.
ESA distinguishes divergence-free smoothing from fully first-order ionosphere-free combinations. Removing the additional smoothing divergence does not necessarily remove the ionospheric delay retained in the original code. Use the existing frequency-combination guide for that separate cancellation question rather than assuming that every term called divergence-free means the same observable is free of ionospheric effects.
CHAPTER 11 OF 12 · Transfer and report
11. Treat arc interruptions as model changes
A constant ambiguity cancels only within its supported arc. Suppose a fictional carrier observation jumps by +0.2 metres while code and the shared range-like term do not change. With fixed N = 4, the carrier transport introduces a +0.15-metre contribution into the smoothed output at that update because α = 0.75.
At later epochs, if the new phase offset remains constant and the code is otherwise unchanged, that contamination decays with the filter’s memory. The curve can look like a temporary movement even though the constructed range did not move. The existing carrier-continuity guide develops how observation evidence and metadata help investigate a possible slip.
ESA’s simple algorithm restarts on a detected carrier cycle slip. In an actual system, continuity detection and reset handling must follow validated procedures. A reset prevents unsupported old alignment from being propagated; it does not prove why the phase changed or reconstruct missing observations. Preserve the arc and reset history instead of silently joining the filtered series.
A restart can also increase short-term code scatter because less history remains. That does not automatically mean the reset worsened accuracy. It may have removed an invalid continuity assumption. Evaluate the trade-off with the intended observable, uncertainty and independent evidence rather than choosing whichever output looks smoothest.
CHAPTER 12 OF 12 · Transfer and report
12. Report smoothing gain, memory and surviving terms
A useful report states the code and carrier signals, units, recursion, initialisation, gain or count rule, sampling history, continuity decisions and atmospheric treatment. It distinguishes raw observations from smoothed estimates and states what uncertainty model was propagated. A single label such as smoothed range does not supply that account.
For the fictional moving-range example, carrier transport preserves the changing shared range while averaging the stated code errors. For the fictional changing-ionosphere example, the same recursion can produce a systematic mismatch without random noise. Both outcomes follow from the model, so one favourable noise demonstration cannot validate every application.
Independent checks should examine preservation of the intended signal and sensitivity to continuity and atmospheric assumptions. Held-out or suitably independent reference information can test effects that a training plot cannot. Do not judge success only by reduced scatter in the same observations used to construct the smoother.
The transferable lesson is that memory is an assumption about how past information belongs to the present. Carrier smoothing can be valuable when that relationship is supported. Its limits become understandable when the changing contributions, shared errors and arc boundaries remain visible instead of being hidden beneath a calmer line.
Independent worked case and evidence checks
Work a new fictional sequence with shared ranges 200,202 and204 metres, carrier observations 230,232 and234, and code observations 200.3,201.4 and204.9. The code errors are +0.3,−0.6,+0.9. Growing smoothing gives S1 = 200.3; S2 = [201.4+(200.3+2)]/2 = 201.85; S3 = 204.9/3+2×203.85/3 = 204.2.
Check the aligned form: P−Φ values are −29.7,−30.6,−29.1. Their average is −29.8, and adding the final carrier value234 gives204.2. The final error +0.2 equals the average of the three code errors. The true range changed by four metres, but that change was not averaged away.
Now add seven metres to every carrier observation. Recalculate only the carrier increments and the code-minus-carrier mean to verify that all smoothed outputs remain unchanged. Next add seven metres only at the third carrier sample. That is not a constant offset over the arc; it changes the last increment and invalidates the previous cancellation argument.
For a separate fixed-gain experiment, choose fictional N = 5, so β = 0.2 and α = 0.8. An isolated +0.5-metre code error contributes +0.1 immediately, then +0.08,+0.064 and+0.0512. Its contribution is still nonzero after several updates. Compare that history with a strict five-sample equal-weight window and explain which equation produced each.
If a fictional ionospheric delay increases by0.02 metres per update, the fixed-gain divergence limit is −2×4×0.02 = −0.16 metres under the simple model. The code-noise variance in the restricted perfect-carrier model is σP²/9. These two results describe different effects: reducing one does not prove that the other is negligible.
Finally double the elapsed time between updates while holding the physical ionospheric delay rate fixed. The per-update increment doubles, so the illustrative divergence limit doubles in magnitude if N is unchanged. State the sample timing before transferring a count-based smoothing choice to another dataset.
A further test introduces a shared code error rather than independent noise. Let every code observation in the first three-epoch case be increased by0.8 metres while carrier increments stay unchanged. The recursion increases every smoothed output by0.8. In the aligned form, every P−Φ value increases by0.8, so its mean also increases by0.8. Smoothing has reduced neither the shared contribution nor uncertainty about its source.
Compare that with alternating fictional code errors +0.8 and−0.8 under a growing average and perfect carrier transport. Their average can become small after an even number of samples. A favourable alternating sequence and an unfavourable common-offset sequence can have the same individual error magnitudes but very different filtered outcomes. The error structure, not merely its scale, determines what averaging can remove.
Now investigate a held-out synthetic range step of+2 metres that appears consistently in both code and carrier at one epoch, with other terms unchanged. The carrier increment transports the previous estimate by+2 before blending with the current code, so this shared change need not suffer the lag of a code-only low-pass average. Verify by adding two to the later common range, code and carrier values and reconstructing the update.
Contrast that supported shared step with a+2-metre step occurring only in carrier. The transported prediction changes while the code does not, creating contamination proportional toα. Both cases contain a phase jump, but their observation relationships differ. A smoothing algorithm does not independently decide which physical history occurred; that requires continuity evidence and the complete observation account.
The independent validation question is therefore not simply whether the output is smoother. Test preservation of a known shared change, response to an isolated code error, response to an unsupported carrier discontinuity and response to a changing ionospheric difference. Each synthetic case probes a different assumption. A filter that passes only the easiest noise-reduction case has not demonstrated that it preserves every scientifically relevant signal.
For a simple limiting check, set N =1 in the stated recursion. Then β =1 and α =0, so every output equals the current code observation and carrier transport contributes nothing. The fixed-gain code-noise formula returns σP²/(2×1−1) =σP², as it should. Testing this limit checks the equation without confusing the absence of smoothing with a processing failure.
Worked comparison
| Operation or property | What it can establish | What it does not establish |
|---|---|---|
| Carrier transport | Alignment of shared range changes under a model | Correctness of every phase contribution |
| Constant ambiguity cancellation | Invariance within a supported arc | Continuity through a slip or signal change |
| Reduced code-noise variance | Less variation under the stated noise account | Removal of shared bias or divergence |
| Fixed capped gain | Exponential memory after start-up | A strict finite sliding window |
| Divergence-free smoothing | Control of a specified code–carrier mismatch | Automatic removal of the code’s ionospheric delay |
Questions and practical checks
Why not average code directly?
Changing range would be mixed across epochs. Carrier transport aligns the shared change before averaging code information under the stated model.
Does the unknown carrier ambiguity make smoothed code impossible?
A constant offset cancels in the alignment form within a supported arc. A changing offset or interrupted arc is a different case.
Is the capped Hatch recursion exactly an N-sample moving window?
No. Once its gain is fixed, old contributions decay geometrically rather than vanish at one exact boundary.
Can longer smoothing make a bias larger?
Yes, under the worked changing-ionosphere model. Reduced random variation and reduced systematic mismatch are separate goals.
Does resetting prove the phase jump was a cycle slip?
No. A reset handles continuity assumptions; the cause of a jump still needs observation and metadata evidence.
Continue with the connected subjects
Establish observation and arc identities
Preserve RINEX code, carrier and signal identities
Investigate carrier-phase continuity and possible cycle slips
Check terms that smoothing does not automatically remove
Distinguish first-order ionospheric cancellation from noise and surviving biases
Test repeated multipath geometry and persistent offsets
Keep orientation-related phase models separate from tracking continuity
Sources and scope
ESA Navipedia: the carrier-smoothing recursion and arc initialisation
The numerical cases in this guide are original fictional teaching examples, not measurements from a real site. This is an educational explanation, not a field safety instruction, engineering approval or an official certification. For a real project, use qualified practitioners, current product documentation and site-specific evidence. Sources were checked on 31 October 2026.
Related observation models
Use these companion guides to compare a different observation relationship; each keeps its own units, uncertainty assumptions and limits.
Compare orbit-vector projections and orbit–clock covariance
Compare inter-system offsets and identifiable clock combinations
Compare Doppler range rates, clock drift and velocity geometry