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:
EarlyPromptLateCorrelatorfor GPS L1, GPS L5 (BPSK modulation)VeryEarlyPromptLateCorrelatorfor Galileo E1B (BOC modulation)
Tracking.get_default_correlator — Function
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.
Correlator Types
Tracking.EarlyPromptLateCorrelator — Type
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.
Tracking.VeryEarlyPromptLateCorrelator — Type
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.
Accessing Correlator Values
Tracking.get_early — Function
get_early(correlator)
Get early correlator
Tracking.get_prompt — Function
get_prompt(correlator)
Get prompt correlator
Tracking.get_late — Function
get_late(correlator)
Get late correlator
Tracking.get_accumulators — Function
get_accumulators(correlator)
Get all correlator accumulators
Tracking.get_num_accumulators — Function
get_num_accumulators(correlator)
Get number of accumulators
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 valuesget_num_accumulators(correlator): Return the number of accumulatorsupdate_accumulator(correlator, accumulators): Create a new correlator with updated accumulatorsget_correlator_sample_shifts(correlator, sampling_frequency, code_frequency): Return the sample shifts for each accumulator