Merged master 8748

This commit is contained in:
Jordan Sherer
2018-08-05 11:33:30 -04:00
parent 8f8772f1bd
commit 62899069bf
1222 changed files with 70382 additions and 406763 deletions
@@ -1,431 +0,0 @@
PART 1:
Matrix m1:
0: 0
1: 1
2: 2 3
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10 38
11: 11
12: 12
13: 13
14: 14
15: 15
16: 16
17: 17
18: 18
19: 19
20: 20
21: 21
22: 22
23: 23
24: 24
25: 25
26: 26
27: 27
28: 28
29: 29
30: 30
31: 31
32: 32
33: 33
34: 4 34
Matrix m2, as read from file. Should be same as m1 above.
0: 0
1: 1
2: 2 3
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10 38
11: 11
12: 12
13: 13
14: 14
15: 15
16: 16
17: 17
18: 18
19: 19
20: 20
21: 21
22: 22
23: 23
24: 24
25: 25
26: 26
27: 27
28: 28
29: 29
30: 30
31: 31
32: 32
33: 33
34: 4 34
Test of equality of m1 & m2 (should be 1): 1
Matrix m3, copied from m1 above.
0: 0
1: 1
2: 2 3
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10 38
11: 11
12: 12
13: 13
14: 14
15: 15
16: 16
17: 17
18: 18
19: 19
20: 20
21: 21
22: 22
23: 23
24: 24
25: 25
26: 26
27: 27
28: 28
29: 29
30: 30
31: 31
32: 32
33: 33
34: 4 34
Test of equality of m1 & m3 (should be 1): 1
Matrix m3 again, should now be all zeros.
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
Test of equality of m1 & m3 (should be 0): 0
PART 2:
Transpose of m1.
0: 0
1: 1
2: 2
3: 2 3
4: 4 34
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10
11: 11
12: 12
13: 13
14: 14
15: 15
16: 16
17: 17
18: 18
19: 19
20: 20
21: 21
22: 22
23: 23
24: 24
25: 25
26: 26
27: 27
28: 28
29: 29
30: 30
31: 31
32: 32
33: 33
34: 34
35:
36:
37:
38: 10
39:
Matrix m1 after adding rows 2 and 12 and 3 to 10.
0: 0
1: 1
2: 2 3
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 2 10 12 38
11: 11
12: 12
13: 13
14: 14
15: 15
16: 16
17: 17
18: 18
19: 19
20: 20
21: 21
22: 22
23: 23
24: 24
25: 25
26: 26
27: 27
28: 28
29: 29
30: 30
31: 31
32: 32
33: 33
34: 4 34
Matrix m1 after further adding column 34 to 0.
0: 0
1: 1
2: 2 3
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 2 10 12 38
11: 11
12: 12
13: 13
14: 14
15: 15
16: 16
17: 17
18: 18
19: 19
20: 20
21: 21
22: 22
23: 23
24: 24
25: 25
26: 26
27: 27
28: 28
29: 29
30: 30
31: 31
32: 32
33: 33
34: 0 4 34
PART 3:
Matrix s0.
0:
1: 3 4
2: 0
3: 1
4:
Matrix s1.
0:
1: 3 5
2:
3: 0 1 6
4:
Matrix s2.
0: 0
1: 1
2:
3:
4:
5: 1 2 3
6:
Maxtrix s1 times unpacked vector ( 1 0 0 1 0 1 0 ).
( 0 0 0 1 0 )
Sum of s0 and s1.
0:
1: 4 5
2: 0
3: 0 6
4:
Product of s1 and s2.
0:
1: 1 2 3
2:
3: 0 1
4:
Tried to find (1,2), actually found: (1,2)
Above matrix with (1,2) cleared.
0:
1: 1 3
2:
3: 0 1
4:
Tried to find (1,1), actually found: (1,1)
Matrix with (1,1) cleared as well.
0:
1: 3
2:
3: 0 1
4:
PART 4:
Matrix s1.
0: 3 5
1: 1 6
2: 0
3: 1 2
4: 0 2
5: 6
LU decomposition (returned value was 0).
L=
0: 3
1: 1
2: 0
3: 1 2
4: 0 2 4
5:
U=
0: 0
1: 1 6
2: 2 6
3: 3
4: 6
cols: 0 1 2 3 6 5 4
rows: 2 1 3 0 4 5
Product of L and U.
0: 3
1: 1 6
2: 0
3: 1 2
4: 0 2
5:
Solution of Ly=x with x from ( 0 1 1 0 1 0 ) according to rows selected.
1 1 1 0 1
Returned value from forward_sub was 1
Solution of Uz=y.
1 0 0 0 0 0 1
Returned value from backward_sub was 1
PART 5:
Matrix m1:
0: 3
1: 1
2: 2
3: 0
Matrix m2, copyrows of m1 in order 3,1,2,0 (should be identity)
0: 0
1: 1
2: 2
3: 3
Matrix m3, copycols of m1 in order 3,1,2,0 (should be identity)
0: 0
1: 1
2: 2
3: 3
DONE WITH TESTS.
@@ -1,36 +0,0 @@
<table cellspacing=1>
<tr><td><b>F1 </b></td><td>Online User's Guide</td></tr>
<tr><td><b>Ctrl+F1 </b></td><td>About WSJT-X</td></tr>
<tr><td><b>F2 </b></td><td>Open settings window</td></tr>
<tr><td><b>F3 </b></td><td>Display keyboard shortcuts</td></tr>
<tr><td><b>F4 </b></td><td>Clear DX Call, DX Grid, Tx messages 1-5</td></tr>
<tr><td><b>Alt+F4 </b></td><td>Exit program</td></tr>
<tr><td><b>F5 </b></td><td>Display special mouse commands</td></tr>
<tr><td><b>F6 </b></td><td>Open next file in directory</td></tr>
<tr><td><b>Shift+F6 </b></td><td>Decode all remaining files in directrory</td></tr>
<tr><td><b>F7 </b></td><td>Display Message Averaging window</td></tr>
<tr><td><b>F11 </b></td><td>Move Rx frequency down 1 Hz</td></tr>
<tr><td><b>Ctrl+F11 </b></td><td>Move Rx and Tx frequencies down 1 Hz</td></tr>
<tr><td><b>Shift+F11 </b></td><td>Move Tx frequency down 50 Hz (rounded)</td></tr>
<tr><td><b>F12 </b></td><td>Move Rx frequency up 1 Hz</td></tr>
<tr><td><b>Ctrl+F12 </b></td><td>Move Rx and Tx frequencies up 1 Hz</td></tr>
<tr><td><b>Shift+F12 </b></td><td>Move Tx frequency up 50 Hz (rounded)</td></tr>
<tr><td><b>Alt+1-6 </b></td><td>Set now transmission to this number on Tab 1</td></tr>
<tr><td><b>Ctl+1-6 </b></td><td>Set next transmission to this number on Tab 1</td></tr>
<tr><td><b>Alt+D </b></td><td>Decode again at QSO frequency</td></tr>
<tr><td><b>Shift+D </b></td><td>Full decode (both windows)</td></tr>
<tr><td><b>Ctrl+E </b></td><td>Turn on TX even/1st</td></tr>
<tr><td><b>Shift+E </b></td><td>Turn off TX even/1st</td></tr>
<tr><td><b>Alt+E </b></td><td>Erase</td></tr>
<tr><td><b>Ctrl+F </b></td><td>Edit the free text message box</td></tr>
<tr><td><b>Alt+G </b></td><td>Generate standard messages</td></tr>
<tr><td><b>Alt+H </b></td><td>Halt Tx</td></tr>
<tr><td><b>Ctrl+L </b></td><td>Lookup callsign in database, generate standard messages</td></tr>
<tr><td><b>Alt+M </b></td><td>Monitor</td></tr>
<tr><td><b>Alt+N </b></td><td>Enable Tx</td></tr>
<tr><td><b>Ctrl+O </b></td><td>Open a .wav file</td></tr>
<tr><td><b>Alt+Q </b></td><td>Log QSO</td></tr>
<tr><td><b>Alt+S </b></td><td>Stop monitoring</td></tr>
<tr><td><b>Alt+T </b></td><td>Tune</td></tr>
<tr><td><b>Alt+V </b></td><td>Save the most recently completed *.wav file</td></tr>
</table>
@@ -1,80 +0,0 @@
/* MOD2CONVERT-TEST. C - Program to test mod2convert module. */
/* Copyright (c) 1995-2012 by Radford M. Neal.
*
* Permission is granted for anyone to copy, use, modify, and distribute
* these programs and accompanying documents for any purpose, provided
* this copyright notice is retained and prominently displayed, and note
* is made of any changes made to these programs. These programs and
* documents are distributed without any warranty, express or implied.
* As the programs were written for research purposes only, they have not
* been tested to the degree that would be advisable in any important
* application. All use of these programs is entirely at the user's own
* risk.
*/
/* Correct output for this program is saved in the file mod2convert-test-out */
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "mod2dense.h"
#include "mod2sparse.h"
#include "mod2convert.h"
#include "rand.h"
#define Rows 40 /* Dimensions of matrix to use in test */
#define Cols 13
#define N 100 /* Number of bits to set in test matrix (some may be
duplicates, leading to fewer 1's in matrix */
main(void)
{
mod2sparse *sm1, *sm2;
mod2dense *dm1, *dm2;
int i;
sm1 = mod2sparse_allocate(Rows,Cols);
sm2 = mod2sparse_allocate(Rows,Cols);
dm1 = mod2dense_allocate(Rows,Cols);
dm2 = mod2dense_allocate(Rows,Cols);
printf("\nCreating sparse matrix.\n");
fflush(stdout);
for (i = 0; i<N; i++)
{ mod2sparse_insert(sm1,rand_int(Rows),rand_int(Cols));
}
printf("Converting from sparse to dense.\n");
fflush(stdout);
mod2sparse_to_dense(sm1,dm1);
printf("Converting back to dense again.\n");
fflush(stdout);
mod2dense_to_sparse(dm1,sm2);
printf("Testing for equality of two sparse matrices: %s.\n",
mod2sparse_equal(sm1,sm2) ? "OK" : "NOT OK");
fflush(stdout);
printf("Converting to dense once again.\n");
fflush(stdout);
mod2sparse_to_dense(sm2,dm2);
printf("Testing for equality of two dense matrices: %s.\n",
mod2dense_equal(dm1,dm2) ? "OK" : "NOT OK");
fflush(stdout);
printf("\nDONE WITH TESTS.\n");
exit(0);
}
@@ -1,147 +0,0 @@
subroutine genmsk144(msg0,mygrid,ichk,bcontest,msgsent,i4tone,itype)
! s8 + 48bits + s8 + 80 bits = 144 bits (72ms message duration)
!
! Encode an MSK144 message
! Input:
! - msg0 requested message to be transmitted
! - ichk if ichk=1, return only msgsent
! if ichk.ge.10000, set imsg=ichk-10000 for short msg
! - msgsent message as it will be decoded
! - i4tone array of audio tone values, 0 or 1
! - itype message type
! 1 = standard message "Call_1 Call_2 Grid/Rpt"
! 2 = type 1 prefix
! 3 = type 1 suffix
! 4 = type 2 prefix
! 5 = type 2 suffix
! 6 = free text (up to 13 characters)
! 7 = short message "<Call_1 Call2> Rpt"
use iso_c_binding, only: c_loc,c_size_t
use packjt
use hashing
character*22 msg0
character*22 message !Message to be generated
character*22 msgsent !Message as it will be received
character*6 mygrid
integer*4 i4Msg6BitWords(13) !72-bit message as 6-bit words
integer*4 i4tone(144) !
integer*1, target:: i1Msg8BitBytes(10) !80 bits represented in 10 bytes
integer*1 codeword(128) !Encoded bits before re-ordering
integer*1 msgbits(80) !72-bit message + 8-bit hash
integer*1 bitseq(144) !Tone #s, data and sync (values 0-1)
integer*1 i1hash(4)
integer*1 s8(8)
logical bcontest
real*8 pp(12)
real*8 xi(864),xq(864),pi,twopi
data s8/0,1,1,1,0,0,1,0/
equivalence (ihash,i1hash)
logical first
data first/.true./
save
if(first) then
first=.false.
nsym=128
pi=4.0*atan(1.0)
twopi=8.*atan(1.0)
do i=1,12
pp(i)=sin((i-1)*pi/12)
enddo
endif
if(msg0(1:1).eq.'@') then !Generate a fixed tone
read(msg0(2:5),*,end=1,err=1) nfreq !at specified frequency
go to 2
1 nfreq=1000
2 i4tone(1)=nfreq
else
message=msg0
do i=1,22
if(ichar(message(i:i)).eq.0) then
message(i:)=' '
exit
endif
enddo
do i=1,22 !Strip leading blanks
if(message(1:1).ne.' ') exit
message=message(i+1:)
enddo
if(message(1:1).eq.'<') then
call genmsk40(message,msgsent,ichk,i4tone,itype)
if(itype.lt.0) go to 999
i4tone(41)=-40
go to 999
endif
call packmsg(message,i4Msg6BitWords,itype,bcontest) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent,bcontest,mygrid) !Unpack to get msgsent
if(ichk.eq.1) go to 999
i4=0
ik=0
im=0
do i=1,12
nn=i4Msg6BitWords(i)
do j=1, 6
ik=ik+1
i4=i4+i4+iand(1,ishft(nn,j-6))
i4=iand(i4,255)
if(ik.eq.8) then
im=im+1
i1Msg8BitBytes(im)=i4
ik=0
endif
enddo
enddo
ihash=nhash(c_loc(i1Msg8BitBytes),int(9,c_size_t),146)
ihash=2*iand(ihash,32767) !Generate the 8-bit hash
i1Msg8BitBytes(10)=i1hash(1) !CRC to byte 10
mbit=0
do i=1, 10
i1=i1Msg8BitBytes(i)
do ibit=1,8
mbit=mbit+1
msgbits(mbit)=iand(1,ishft(i1,ibit-8))
enddo
enddo
call encode_msk144(msgbits,codeword)
!Create 144-bit channel vector:
!8-bit sync word + 48 bits + 8-bit sync word + 80 bits
bitseq=0
bitseq(1:8)=s8
bitseq(9:56)=codeword(1:48)
bitseq(57:64)=s8
bitseq(65:144)=codeword(49:128)
bitseq=2*bitseq-1
xq(1:6)=bitseq(1)*pp(7:12) !first bit is mapped to 1st half-symbol on q
do i=1,71
is=(i-1)*12+7
xq(is:is+11)=bitseq(2*i+1)*pp
enddo
xq(864-5:864)=bitseq(1)*pp(1:6) !last half symbol
do i=1,72
is=(i-1)*12+1
xi(is:is+11)=bitseq(2*i)*pp
enddo
! Map I and Q to tones.
i4tone=0
do i=1,72
i4tone(2*i-1)=(bitseq(2*i)*bitseq(2*i-1)+1)/2;
i4tone(2*i)=-(bitseq(2*i)*bitseq(mod(2*i,144)+1)-1)/2;
enddo
endif
! Flip polarity
i4tone=-i4tone+1
999 return
end subroutine genmsk144
@@ -1,50 +0,0 @@
#ifndef FASTGRAPH_H
#define FASTGRAPH_H
#include <QDialog>
#include <QScopedPointer>
namespace Ui {
class FastGraph;
}
class QSettings;
class FastGraph : public QDialog
{
Q_OBJECT
public:
explicit FastGraph(QSettings *, QWidget *parent = 0);
~FastGraph ();
void plotSpec(bool diskData, int UTCdisk);
void saveSettings();
void setTRperiod(int n);
void setMode(QString mode);
signals:
void fastPick(int x0, int x1, int y);
private slots:
void on_gainSlider_valueChanged(int value);
void on_zeroSlider_valueChanged(int value);
void on_greenZeroSlider_valueChanged(int value);
void on_pbAutoLevel_clicked();
protected:
void closeEvent (QCloseEvent *) override;
void keyPressEvent( QKeyEvent *e ) override;
private:
QSettings * m_settings;
float m_ave;
qint32 m_TRperiod;
QScopedPointer<Ui::FastGraph> ui;
};
extern float fast_green[703];
extern int fast_jh;
#endif // FASTGRAPH_H