My own corner of monopam
2
fork

Configure Feed

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

ocaml-turbo: rewrite README example and fix rate variants

The block had a top-level [match] expression and used [`One_third],
but the [rate] type uses [`R1_3] / [`R1_2] / [`R1_4] / [`R1_6]. Wrap
as [roundtrip data = ...], assert [Bytes.equal] on the decoded data,
and fix the rate constants in the example and the bullet list.

+8 -9
+8 -9
ocaml-turbo/README.md
··· 27 27 ## Usage 28 28 29 29 ```ocaml 30 - (* CCSDS 1784-bit block, rate 1/3 *) 31 - let config = Turbo.ccsds_1784 ~rate:`One_third 32 - (* Encode *) 33 - let encoded = Turbo.encode config data 34 - (* Decode with iterative BCJR *) 35 - match Turbo.decode ~max_iter:10 config encoded with 36 - | Ok decoded -> () 37 - | Error msg -> failwith msg 30 + let roundtrip data = 31 + (* CCSDS 1784-bit block, rate 1/3. *) 32 + let config = Turbo.ccsds_1784 ~rate:`R1_3 in 33 + let encoded = Turbo.encode config data in 34 + match Turbo.decode ~max_iter:10 config encoded with 35 + | Ok decoded -> assert (Bytes.equal decoded data) 36 + | Error msg -> failwith msg 38 37 ``` 39 38 40 39 ### CCSDS Presets 41 40 42 41 - `Turbo.ccsds_1784` / `ccsds_3568` / `ccsds_7136` / `ccsds_8920` 43 - - Rates: `` `One_half ``, `` `One_third ``, `` `One_fourth ``, `` `One_sixth `` 42 + - Rates: `` `R1_2 ``, `` `R1_3 ``, `` `R1_4 ``, `` `R1_6 `` 44 43 45 44 ## Performance 46 45