Skip to content

Instantly share code, notes, and snippets.

@fnoble
Created March 6, 2012 06:54
Show Gist options
  • Save fnoble/1984425 to your computer and use it in GitHub Desktop.
Save fnoble/1984425 to your computer and use it in GitHub Desktop.
Filters
#define TAU_CROSSOVER 0.5
#define TAU_BIAS (TAU_CROSSOVER*10)
#define A (1e-3/TAU_CROSSOVER)
#define B (1e-3/TAU_BIAS)
double dll_update = chan->dll_pgain*(chan->dll_disc-dll_disc_prev) + chan->dll_igain*chan->dll_disc;
double pll_update = (1.023e6/L1_HZ)*(chan->pll_pgain*(chan->pll_disc-pll_disc_prev) + chan->pll_igain*chan->pll_disc);
// Original:
chan->code_phase_rate += dll_update;
// Ours:
chan->code_phase_rate += pll_update + A*(dll_update - chan->code_phase_rate);
// I think it should be (maybe):
chan->code_phase_rate += pll_update + A*dll_update;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment