Created
March 6, 2012 06:54
-
-
Save fnoble/1984425 to your computer and use it in GitHub Desktop.
Filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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