baseband decode: --json output

pull/18/head
Zilog80 2019-08-27 18:06:41 +02:00
rodzic 91a3200905
commit 2c7c60d428
5 zmienionych plików z 13 dodań i 4 usunięć

Wyświetl plik

@ -142,6 +142,7 @@ typedef struct {
typedef struct {
pcm_t pcm;
thd_t thd;
int option_jsn;
} thargs_t;

Wyświetl plik

@ -830,7 +830,7 @@ void *thd_dfm09(void *targs) {
gpx.option.ecc = 1;
gpx.option.aut = 1;
gpx.option.dst = 0;
gpx.option.jsn = 0;
gpx.option.jsn = tharg->option_jsn;
headerlen = strlen(dfm_rawheader);

Wyświetl plik

@ -924,6 +924,7 @@ void *thd_m10(void *targs) { // pcm_t *pcm, double xlt_fq
gpx.option.inv = 0; // irrelevant
gpx.option.vbs = 2;
gpx.option.ptu = 1;
gpx.option.jsn = tharg->option_jsn;
gpx.option.col = 0; //option_color;

Wyświetl plik

@ -1511,9 +1511,9 @@ void *thd_rs41(void *targs) { // pcm_t *pcm, double xlt_fq
gpx.option.vbs = 1;
gpx.option.ptu = 1;
gpx.option.aut = 1;
gpx.option.jsn = 0;
gpx.option.jsn = tharg->option_jsn;
gpx.option.ecc = 1; // turn off for ber-measurement
gpx.option.ecc = 1;
if (gpx.option.ecc) {
rs_init_RS255(&gpx.RS); // RS, GF

Wyświetl plik

@ -85,7 +85,8 @@ int main(int argc, char **argv) {
int xlt_cnt = 0;
double base_fqs[MAX_FQ];
void *rstype[MAX_FQ];
int option_pcmraw = 0;
int option_pcmraw = 0,
option_jsn = 0;
#ifdef CYGWIN
_setmode(fileno(stdin), _O_BINARY); // _fileno(stdin)
@ -138,6 +139,9 @@ int main(int argc, char **argv) {
xlt_cnt++;
}
}
else if (strcmp(*argv, "--json") == 0) {
option_jsn = 1;
}
else if (strcmp(*argv, "-") == 0) {
int sample_rate = 0, bits_sample = 0, channels = 0;
++argv;
@ -197,8 +201,11 @@ int main(int argc, char **argv) {
tharg[k].thd.blk = block_decMB;
tharg[k].thd.max_fq = xlt_cnt;
tharg[k].thd.xlt_fq = -base_fqs[k]; // S(t)*exp(-f*2pi*I*t): fq baseband -> IF (rotate from and decimate)
tharg[k].pcm = pcm;
tharg[k].option_jsn = option_jsn;
rbf1 |= tharg[k].thd.tn_bit;
}