RTL-SDR IQ sample reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add/update READMEs for all recently updated packages

Created 7 new READMEs: xmlt, dsp, demod, rtlsdr, erasure,
short-ldpc, ccsds (meta-package with full protocol suite table).

Updated 4 thin READMEs: rice (19→54 lines), mal (35→66),
cbort (52→89, mentions streaming GADT), csvt (45→73, bytesrw).

Each has: title, spec reference, quick start example, API overview.

+52
+52
README.md
··· 1 + # rtlsdr 2 + 3 + RTL-SDR IQ sample reader for OCaml. 4 + 5 + ## Overview 6 + 7 + Reads interleaved unsigned 8-bit IQ samples from files produced by `rtl_sdr` 8 + and similar tools, converting them to complex float pairs suitable for 9 + processing with the `dsp` and `demod` packages. Also provides synthetic 10 + signal generation for testing demodulation pipelines without hardware. 11 + 12 + ## Installation 13 + 14 + ``` 15 + opam install rtlsdr 16 + ``` 17 + 18 + ## Usage 19 + 20 + ```ocaml 21 + (* Read IQ samples from a raw capture file *) 22 + let src = Rtlsdr.of_file "capture.raw" in 23 + Printf.printf "%d samples available\n" (Rtlsdr.sample_count src); 24 + let samples = Rtlsdr.read src 4096 in 25 + Rtlsdr.close src 26 + 27 + (* Attach recording metadata *) 28 + let src = 29 + Rtlsdr.of_file "capture.raw" 30 + |> Rtlsdr.with_metadata 31 + { center_freq = 137.5e6; sample_rate = 2.4e6; gain = 40.0 } 32 + 33 + (* Generate a synthetic BPSK signal for testing *) 34 + let bits = Bytes.of_string "\x01\x00\x01\x01\x00" in 35 + let iq = 36 + Rtlsdr.generate_bpsk 37 + ~sample_rate:48000.0 ~symbol_rate:1200.0 38 + ~bits ~carrier_freq:1800.0 39 + ``` 40 + 41 + ## API Overview 42 + 43 + - **`of_file`**, **`of_bytes`** -- Create an IQ source from file or memory 44 + - **`read`**, **`read_all`** -- Read complex samples from a source 45 + - **`close`**, **`sample_count`** -- Source lifecycle 46 + - **`metadata`**, **`with_metadata`** -- Attach/query center frequency, sample rate, gain 47 + - **`generate_tone`** -- Synthetic complex sinusoid 48 + - **`generate_bpsk`** -- Synthetic BPSK-modulated IQ signal 49 + 50 + ## Licence 51 + 52 + ISC License. See [LICENSE.md](LICENSE.md) for details.