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
|
CC = clang
|
||||||
CFLAGS = -O3 -std=gnu17 -Wall
|
CFLAGS = -O3 -std=gnu17
|
||||||
LIBS = -lusb-1.0 -lrtlsdr -lpthread -lfftw3f -lcurl -lm -Wall
|
LIBS = -lusb-1.0 -lrtlsdr -lpthread -lfftw3f -lcurl -lm
|
||||||
|
|
||||||
# Note
|
# Note
|
||||||
# gcc is a bit faster that clang on this app
|
# 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, cdbm, 2);
|
||||||
strncat(call_loc_pow, "\0", 1);
|
strncat(call_loc_pow, "\0", 1);
|
||||||
int nu = ndbm % 10;
|
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);
|
ihash = nhash(callsign, strlen(callsign), (uint32_t)146);
|
||||||
strcpy(hashtab + ihash * 13, callsign);
|
strcpy(hashtab + ihash * 13, callsign);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -164,16 +164,17 @@ int get_wspr_channel_symbols(char *rawmessage, char *hashtab, char *loctab, unsi
|
||||||
int m = 0, ntype = 0;
|
int m = 0, ntype = 0;
|
||||||
long unsigned int n = 0;
|
long unsigned int n = 0;
|
||||||
int i, j, ihash;
|
int i, j, ihash;
|
||||||
unsigned char pr3[162] =
|
unsigned char pr3vector[162] = {
|
||||||
{1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0,
|
1, 1, 0, 0, 0, 0,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-1, 1, 0, -1, 2, 1, 0, -1, 1};
|
||||||
char *callsign, *grid, *powstr;
|
char *callsign, *grid, *powstr;
|
||||||
char grid4[5], message[23];
|
char grid4[5], message[23];
|
||||||
|
@ -297,7 +298,7 @@ int get_wspr_channel_symbols(char *rawmessage, char *hashtab, char *loctab, unsi
|
||||||
interleave(channelbits);
|
interleave(channelbits);
|
||||||
|
|
||||||
for (i = 0; i < 162; i++) {
|
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_call_loc_pow);
|
||||||
free(check_callsign);
|
free(check_callsign);
|
||||||
|
|
Ładowanie…
Reference in New Issue