FreeCalypso > hg > freecalypso-tools
diff rfcal/vcxo-manual/genparams.c @ 184:b8599a1d5813
fc-vcxo-param: bug in lin_b2 computation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 13 Apr 2017 04:58:58 +0000 |
parents | 9099a35a705f |
children | 3eb53be9e667 |
line wrap: on
line diff
--- a/rfcal/vcxo-manual/genparams.c Wed Apr 12 07:37:26 2017 +0000 +++ b/rfcal/vcxo-manual/genparams.c Thu Apr 13 04:58:58 2017 +0000 @@ -60,7 +60,7 @@ /* second linear approximation */ lin_a2 = (float)(meas[3].freq_offset - meas[2].freq_offset) / (float)(meas[3].dac_value - meas[2].dac_value); - lin_b2 = (float)meas[3].freq_offset - lin_a * meas[2].dac_value; + lin_b2 = (float)meas[3].freq_offset - lin_a2 * meas[3].dac_value; /* DAC settings */ dac_min = (-13500.0f - lin_b) / lin_a;