Correlator

The correlator computes the correlation between the incoming signal and the locally generated replica code at multiple code phase offsets (early, prompt, late, etc.).

Default Correlators

The default correlator depends on the GNSS system and is returned by get_default_correlator:

  • EarlyPromptLateCorrelator for GPS L1, GPS L5 (BPSK modulation)
  • VeryEarlyPromptLateCorrelator for Galileo E1B (BOC modulation)
Tracking.get_default_correlatorFunction
get_default_correlator(gpsl1)
get_default_correlator(gpsl1, num_ants)

Get the default correlator for the given GNSS system. Returns an EarlyPromptLateCorrelator for GPS L1 or a VeryEarlyPromptLateCorrelator for systems like Galileo E1B that use BOC modulation.

source

Correlator Types

Tracking.EarlyPromptLateCorrelatorType

EarlyPromptLateCorrelator holding a user defined number of correlation values. The code is shifted in samples. Hence, the specified code shift is actually a preferred code shift, because depending on sampling frequency and code frequency the specified code shift might not be the actual code shift. It is as close as possible, though. The algorithm makes sure that at least one sample is shifted.

source
Tracking.VeryEarlyPromptLateCorrelatorType

VeryEarlyPromptLateCorrelator holding a user defined number of correlation values. The code is shifted in samples. Hence, the specified code shift is actually a preferred code shift, because depending on sampling frequency and code frequency the specified code shift might not be the actual code shift. It is as close as possible, though. The algorithm makes sure that at least one sample is shifted.

source

Accessing Correlator Values

Custom Correlators

You can implement your own correlator by creating a subtype of AbstractCorrelator and implementing the required functions. See src/correlators/correlator.jl for the interface that needs to be implemented:

  • get_accumulators(correlator): Return the accumulator values
  • get_num_accumulators(correlator): Return the number of accumulators
  • update_accumulator(correlator, accumulators): Create a new correlator with updated accumulators
  • get_correlator_sample_shifts(correlator, sampling_frequency, code_frequency): Return the sample shifts for each accumulator