diff --git a/Makefile b/Makefile index 2672352..14b689b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CC = clang -CFLAGS = -O3 -std=gnu17 -Wall -LIBS = -lusb-1.0 -lrtlsdr -lpthread -lfftw3f -lcurl -lm -Wall +CFLAGS = -O3 -std=gnu17 +LIBS = -lusb-1.0 -lrtlsdr -lpthread -lfftw3f -lcurl -lm # Note # gcc is a bit faster that clang on this app diff --git a/wsprd/wsprd_utils.c b/wsprd/wsprd_utils.c index 96e54fa..12f8d4b 100644 --- a/wsprd/wsprd_utils.c +++ b/wsprd/wsprd_utils.c @@ -297,7 +297,7 @@ int unpk_(signed char *message, char *hashtab, char *loctab, char *call_loc_pow, strncat(call_loc_pow, cdbm, 2); strncat(call_loc_pow, "\0", 1); int nu = ndbm % 10; - if (nu == 0 || nu == 3 || nu == 7 || nu == 10) { // make sure power is OK + if (nu == 0 || nu == 3 || nu == 7) { // make sure power is OK ihash = nhash(callsign, strlen(callsign), (uint32_t)146); strcpy(hashtab + ihash * 13, callsign); } else diff --git a/wsprd/wsprsim_utils.c b/wsprd/wsprsim_utils.c index 7845cc7..b64118f 100644 --- a/wsprd/wsprsim_utils.c +++ b/wsprd/wsprsim_utils.c @@ -164,16 +164,17 @@ int get_wspr_channel_symbols(char *rawmessage, char *hashtab, char *loctab, unsi int m = 0, ntype = 0; long unsigned int n = 0; int i, j, ihash; - unsigned char pr3[162] = - {1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, - 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, - 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, - 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, - 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, - 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, - 0, 0}; + unsigned char pr3vector[162] = { + 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, + 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, + 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, + 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, + 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, + 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, + 0, 0 }; + int nu[10] = {0, -1, 1, 0, -1, 2, 1, 0, -1, 1}; char *callsign, *grid, *powstr; char grid4[5], message[23]; @@ -297,7 +298,7 @@ int get_wspr_channel_symbols(char *rawmessage, char *hashtab, char *loctab, unsi interleave(channelbits); for (i = 0; i < 162; i++) { - symbols[i] = 2 * channelbits[i] + pr3[i]; + symbols[i] = 2 * channelbits[i] + pr3vector[i]; } free(check_call_loc_pow); free(check_callsign);