@e04/ft8ts 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -26
- package/dist/cli.js +806 -610
- package/dist/cli.js.map +1 -1
- package/dist/ft8ts.cjs +813 -617
- package/dist/ft8ts.cjs.map +1 -1
- package/dist/ft8ts.d.ts +1 -0
- package/dist/ft8ts.mjs +813 -617
- package/dist/ft8ts.mjs.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +3 -0
- package/src/ft4/constants.ts +0 -38
- package/src/ft4/decode.ts +297 -338
- package/src/ft4/encode.ts +6 -1
- package/src/ft4/scramble.ts +6 -1
- package/src/ft8/constants.ts +0 -11
- package/src/ft8/decode.ts +530 -270
- package/src/util/constants.ts +0 -4
- package/src/util/decode174_91.ts +61 -55
- package/src/util/fft.ts +97 -37
- package/src/util/waveform.ts +8 -4
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -26,6 +26,7 @@ Decode options:
|
|
|
26
26
|
--low <hz> Lower frequency bound (default: 200)
|
|
27
27
|
--high <hz> Upper frequency bound (default: 3000)
|
|
28
28
|
--depth <1|2|3> Decoding depth (default: 2)
|
|
29
|
+
--max-candidates <n> Max candidate signals to decode (default: 300)
|
|
29
30
|
|
|
30
31
|
Encode options:
|
|
31
32
|
--out <file> Output WAV file (default: output.wav)
|
|
@@ -66,6 +67,8 @@ function runDecode(argv: string[]): void {
|
|
|
66
67
|
options.freqHigh = Number(argv[++i]);
|
|
67
68
|
} else if (arg === "--depth") {
|
|
68
69
|
options.depth = Number(argv[++i]);
|
|
70
|
+
} else if (arg === "--max-candidates") {
|
|
71
|
+
options.maxCandidates = Number(argv[++i]);
|
|
69
72
|
} else {
|
|
70
73
|
throw new Error(`Unknown argument: ${arg}`);
|
|
71
74
|
}
|
package/src/ft4/constants.ts
CHANGED
|
@@ -1,41 +1,3 @@
|
|
|
1
1
|
/** FT4-specific constants (lib/ft4/ft4_params.f90). */
|
|
2
2
|
|
|
3
|
-
import { SAMPLE_RATE } from "../util/constants.js";
|
|
4
|
-
|
|
5
|
-
export const COSTAS_A = [0, 1, 3, 2] as const;
|
|
6
|
-
export const COSTAS_B = [1, 0, 2, 3] as const;
|
|
7
|
-
export const COSTAS_C = [2, 3, 1, 0] as const;
|
|
8
|
-
export const COSTAS_D = [3, 2, 0, 1] as const;
|
|
9
3
|
export const GRAYMAP = [0, 1, 3, 2] as const;
|
|
10
|
-
|
|
11
|
-
// Message scrambling vector (rvec) from WSJT-X.
|
|
12
|
-
export const RVEC = [
|
|
13
|
-
0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1,
|
|
14
|
-
0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0,
|
|
15
|
-
1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1,
|
|
16
|
-
] as const;
|
|
17
|
-
|
|
18
|
-
export const NSPS = 576;
|
|
19
|
-
export const NFFT1 = 4 * NSPS; // 2304
|
|
20
|
-
export const NH1 = NFFT1 / 2; // 1152
|
|
21
|
-
export const NSTEP = NSPS;
|
|
22
|
-
export const NMAX = 21 * 3456; // 72576
|
|
23
|
-
export const NHSYM = Math.floor((NMAX - NFFT1) / NSTEP); // 122
|
|
24
|
-
export const NDOWN = 18;
|
|
25
|
-
export const ND = 87;
|
|
26
|
-
export const NS = 16;
|
|
27
|
-
export const NN = NS + ND; // 103
|
|
28
|
-
|
|
29
|
-
export const NFFT2 = NMAX / NDOWN; // 4032
|
|
30
|
-
export const NSS = NSPS / NDOWN; // 32
|
|
31
|
-
export const FS2 = SAMPLE_RATE / NDOWN; // 666.67 Hz
|
|
32
|
-
export const MAX_FREQ = 4910;
|
|
33
|
-
export const SYNC_PASS_MIN = 1.2;
|
|
34
|
-
export const TWO_PI = 2 * Math.PI;
|
|
35
|
-
|
|
36
|
-
export const HARD_SYNC_PATTERNS = [
|
|
37
|
-
{ offset: 0, bits: [0, 0, 0, 1, 1, 0, 1, 1] as const },
|
|
38
|
-
{ offset: 66, bits: [0, 1, 0, 0, 1, 1, 1, 0] as const },
|
|
39
|
-
{ offset: 132, bits: [1, 1, 1, 0, 0, 1, 0, 0] as const },
|
|
40
|
-
{ offset: 198, bits: [1, 0, 1, 1, 0, 0, 0, 1] as const },
|
|
41
|
-
] as const;
|