FreeCalypso > hg > freecalypso-tools
changeset 185:3eb53be9e667
fc-vcxo-param: use M_PI constant instead of acos(-1.0)
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 13 Apr 2017 05:13:45 +0000 |
parents | b8599a1d5813 |
children | 9968717eedd7 |
files | rfcal/vcxo-manual/genparams.c |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/rfcal/vcxo-manual/genparams.c Thu Apr 13 04:58:58 2017 +0000 +++ b/rfcal/vcxo-manual/genparams.c Thu Apr 13 05:13:45 2017 +0000 @@ -44,8 +44,6 @@ main(argc, argv) char **argv; { - float pi; - if (argc < 2 || argc > 3) { fprintf(stderr, "usage: %s meas-file [outfile]\n", argv[0]); exit(1); @@ -68,9 +66,9 @@ dac_init = -lin_b2 / lin_a2; /* Psi computations */ - pi = acos(-1.0); - Psi_sta = 2.0f * pi * (float)(meas[1].freq_offset - meas[0].freq_offset) - / ((float)(meas[1].dac_value - meas[0].dac_value) * 270833.0f); + Psi_sta = 2.0f * (float)M_PI * + (float)(meas[1].freq_offset - meas[0].freq_offset) / + ((float)(meas[1].dac_value - meas[0].dac_value) * 270833.0f); Psi_st = Psi_sta * 0.8f; /* spit it all out */