kopia lustrzana https://github.com/Guenael/rtlsdr-wsprd
chore: wsprd lib update
rodzic
7dc970ee74
commit
df6e87068b
4
Makefile
4
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue