kopia lustrzana https://github.com/rs1729/RS
baseband decode: --json output
rodzic
91a3200905
commit
2c7c60d428
|
@ -142,6 +142,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
pcm_t pcm;
|
||||
thd_t thd;
|
||||
int option_jsn;
|
||||
} thargs_t;
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue