lmsX: baudrate option

pull/11/head
Zilog80 2019-02-26 07:33:55 +01:00
rodzic 3a41bd33af
commit 4b24eae869
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -28,11 +28,12 @@ int option_verbose = 0, // ausfuehrliche Anzeige
option_res = 0, // genauere Bitmessung
wavloaded = 0;
int option_baud = 0;
//int option_nmea = 0;
/* -------------------------------------------------------------------------- */
#define BAUD_RATE 4800
#define BAUD_RATE (4800) // 4797.7 = 4800 / (48023/48000) ?
int sample_rate = 0, bits_sample = 0, channels = 0;
float samples_per_bit = 0;
@ -987,6 +988,7 @@ int main(int argc, char **argv) {
}
else if (strcmp(*argv, "--ecc" ) == 0) { option_ecc = 1; } // RS-ECC
else if (strcmp(*argv, "--vit" ) == 0) { option_vit = 1; } // viterbi-hard
else if (strcmp(*argv, "--baud") == 0) { option_baud = 1; } // test
//else if (strcmp(*argv, "--nmea") == 0) { option_nmea = 1; } // test
else if ( (strcmp(*argv, "-i") == 0) || (strcmp(*argv, "--invert") == 0) ) {
option_inv = 1;
@ -1010,6 +1012,10 @@ int main(int argc, char **argv) {
fclose(fp);
return -1;
}
if (option_baud) {
samples_per_bit *= 48023/48000.0;
fprintf(stderr, "sps corr: %.4f\n", samples_per_bit);
}
if (option_raw == 4) option_ecc = 1;