mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-31 23:57:10 -04:00
Correcty unpack both 4 & 6 character grids from WSPR type 3 messages
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7043 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
b2b59df067
commit
c908a1a3ae
@ -300,18 +300,18 @@ int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsig
|
||||
} else if ( ntype < 0 ) {
|
||||
ndbm=-(ntype+1);
|
||||
memset(grid6,0,sizeof(char)*7);
|
||||
strncat(grid6,callsign+5,1);
|
||||
strncat(grid6,callsign,5);
|
||||
size_t len=strlen(callsign);
|
||||
strncat(grid6,callsign+len-1,1);
|
||||
strncat(grid6,callsign,len-1);
|
||||
int nu=ndbm%10;
|
||||
if( (nu == 0 || nu == 3 || nu == 7 || nu == 10) && \
|
||||
(isalpha(grid6[0]) && isalpha(grid6[1]) && \
|
||||
isdigit(grid6[2]) && isdigit(grid6[3]) ) ) {
|
||||
if ((nu != 0 && nu != 3 && nu != 7 && nu != 10) ||
|
||||
!isalpha(grid6[0]) || !isalpha(grid6[1]) ||
|
||||
!isdigit(grid6[2]) || !isdigit(grid6[3])) {
|
||||
// not testing 4'th and 5'th chars because of this case: <PA0SKT/2> JO33 40
|
||||
// grid is only 4 chars even though this is a hashed callsign...
|
||||
// isalpha(grid6[4]) && isalpha(grid6[5]) ) ) {
|
||||
ihash=nhash(callsign,strlen(callsign),(uint32_t)146);
|
||||
strcpy(hashtab+ihash*13,callsign);
|
||||
} else noprint=1;
|
||||
noprint=1;
|
||||
}
|
||||
|
||||
ihash=(n2-ntype-64)/128;
|
||||
if( strncmp(hashtab+ihash*13,"\0",1) != 0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user