diff options
| author | drowe67 <[email protected]> | 2023-07-20 08:59:48 +0930 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-20 08:59:48 +0930 |
| commit | 06d4c11e699b0351765f10398abb4f663a984f36 (patch) | |
| tree | 33e22af0814c5b6c3d676f096ae8c2ac8a3ed9f0 /unittest/tesno_est.c | |
| parent | 6588e77f38bdebd7adffe091b22e7760d95d0ccb (diff) | |
| parent | 4d6c143c0abec15e1d6ed1fd95d36f80e6cb7df8 (diff) | |
Merge pull request #3 from drowe67/dr-cleanup21.2.0
Cleanup Part 2
Diffstat (limited to 'unittest/tesno_est.c')
| -rw-r--r-- | unittest/tesno_est.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/unittest/tesno_est.c b/unittest/tesno_est.c index e198510..8937b1b 100644 --- a/unittest/tesno_est.c +++ b/unittest/tesno_est.c @@ -5,27 +5,28 @@ DATE CREATED: Mar 2021 Test for C port of Es/No estimator. - + \*---------------------------------------------------------------------------*/ #include <assert.h> +#include <math.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> #include "ofdm_internal.h" -int main(int argc, char *argv[]) -{ - FILE *fin = fopen(argv[1],"rb"); assert(fin != NULL); - size_t nsym = atoi(argv[2]); assert(nsym >= 0); - complex float rx_sym[nsym]; - size_t nread = fread(rx_sym, sizeof(complex float), nsym, fin); - assert(nread == nsym); - fclose(fin); - - float EsNodB = ofdm_esno_est_calc(rx_sym, nsym); - printf("%f\n",EsNodB); - - return 0; +int main(int argc, char *argv[]) { + FILE *fin = fopen(argv[1], "rb"); + assert(fin != NULL); + size_t nsym = atoi(argv[2]); + assert(nsym >= 0); + complex float rx_sym[nsym]; + size_t nread = fread(rx_sym, sizeof(complex float), nsym, fin); + assert(nread == nsym); + fclose(fin); + + float EsNodB = ofdm_esno_est_calc(rx_sym, nsym); + printf("%f\n", EsNodB); + + return 0; } |
