@e04/ft8ts 0.0.1

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 ADDED
@@ -0,0 +1,69 @@
1
+ # ft8ts
2
+
3
+ FT8 encoder and decoder in TypeScript. A port of the Fortran implementation from [WSJT-X](https://wsjt.sourceforge.io/wsjtx.html) v2.7.0.
4
+
5
+ ## Overview
6
+
7
+ FT8 is a digital amateur radio mode designed for weak-signal communication. This library provides pure TypeScript implementations of both encoding and decoding, suitable for use in Node.js or the browser.
8
+
9
+ ## Installation
10
+
11
+ `npm i @e04/ft8ts`
12
+
13
+ ## Usage
14
+
15
+ ### API
16
+
17
+ ```typescript
18
+ import { encodeFT8, decodeFT8 } from "@e04/ft8ts";
19
+
20
+ // Encode a message to audio samples (Float32Array)
21
+ const samples = encodeFT8("CQ JK1IFA PM95", {
22
+ sampleRate: 12000,
23
+ baseFrequency: 1000,
24
+ });
25
+
26
+ // Decode audio samples to messages
27
+ const decoded = decodeFT8(samples, 12000, {
28
+ freqLow: 200,
29
+ freqHigh: 3000,
30
+ depth: 2,
31
+ });
32
+
33
+ for (const d of decoded) {
34
+ console.log(`${d.freq} Hz SNR ${d.snr} dB ${d.msg}`);
35
+ }
36
+ ```
37
+
38
+ ### Decode Options
39
+
40
+ | Option | Default | Description |
41
+ |--------|---------|-------------|
42
+ | `freqLow` | 200 | Lower frequency bound (Hz) |
43
+ | `freqHigh` | 3000 | Upper frequency bound (Hz) |
44
+ | `syncMin` | 1.2 | Minimum sync threshold |
45
+ | `depth` | 2 | Decoding depth: 1=fast BP only, 2=BP+OSD, 3=deep |
46
+ | `maxCandidates` | 300 | Maximum candidates to process |
47
+
48
+ ### CLI (WAV file decoding)
49
+
50
+ ```bash
51
+ npx tsx example/decode-ft8-wav.ts recording.wav [--low 200] [--high 3000] [--depth 2]
52
+ ```
53
+
54
+ ### Browser Demo
55
+
56
+
57
+ ## Build
58
+
59
+ ```bash
60
+ npm run build
61
+ ```
62
+
63
+ ## License
64
+
65
+ GPL-3.0
66
+
67
+ ## References
68
+
69
+ - [WSJT-X](https://wsjt.sourceforge.io/wsjtx.html) — Original Fortran implementation (v2.7.0), licensed under [GPL v3](https://www.gnu.org/licenses/gpl-3.0.html)