hfmodem / shrike

PACTOR-4

Chirps for the lowest rate, spread symbols for robust packets, and a single trained carrier for coherent PSK and QAM. The sections below specify packet bytes, channel coding and symbol layouts.

PACTOR-4 support is partial and experimental. Recorded decodes and live protocol observations establish parts of this implementation. They do not establish complete on-air PACTOR-4 mail delivery. The successful PACTOR-3 exchanges are a separate result.

1500 Hz normal-mode centre1800 chips/s outside chirp modeTwo recursive coding componentsCode-derived diagrams, no audio
Offline-rendered PACTOR-4 normal-short spectrum and waveformUpper panel: relative audio power spectrum. Lower panel: actual sample extrema over time, with training locations outlined. This is an illustrative rendering, not received radio audio. Counts, scale and source follow in text.NORMAL-SHORT · OFFLINE RENDER1800 symbols/s · 1500 Hz centre0 Hz1000 Hz1500 Hz2000 Hz3000 Hz3500 Hz0-20-40-60Welch spectrum · dB relative to strongest bin · 11.71875 Hz binsHeaderT1T2T3T4T5T6T7-1010.000 s0.198 s0.396 s0.595 s0.793 sActual rendered sample extrema; dashed bands mark training impulse intervals.
Illustrative waveform rendered offline by the actual packet encoder from PACTOR-4 waveform diagram, status 0, at 48000 samples/s. Upper panel: Hann-windowed Welch spectrum, 4096 samples, 50% overlap. Lower panel: minimum and maximum samples in each display column. Dashed bands show training impulse times; shaping delays and overlaps those intervals. This is not a recording, a measured radio passband or evidence of peer acceptance. No audio plays.
Normal SHORT: 38055 audio samples at 48000 Hz; 0.792813 seconds; normalized peak 1.000; RMS 0.330370. The generated single-carrier spectrum is centred at 1500 Hz.
Rendered waveform — scale, counts and processing
Values describe this generated packet, not RF performance
QuantityValue
Audio samples38055
Duration, seconds0.792813
Peak normalized amplitude1.000000
RMS normalized amplitude0.330370
Relative −26 dB bin range, Hz281.25 – 2718.75
PSD display limits0 – 3500 Hz; −60 – 0 dB relative
Waveform display columns640
PSD frequency spacing, Hz11.71875
Renderer inputPACTOR-4 waveform diagram; status 0

Training starts after the 140-chip measured header, then repeats every 208 symbols. The complete training offsets appear in the frame diagram below. Full waveform samples are neither downloaded nor played.

One protocol, several physical layers

Chirp, robust, normal

PACTOR-4 extends the PACTOR ARQ family, but its normal waveform is different from PACTOR-3’s parallel carriers. A normal P4 packet carries symbols on one carrier at 1800 symbols/s. Robust packets spread a slower differential symbol across 8 or 16 chips at that same chip rate. Chirp mode uses two sweeping carriers with a different symbol clock.

Chirp / SL1

Chirp modulation

Initial tones at 550 and 1530 Hz, sweeping upward at 294 Hz/s. Each carrier uses a 15 ms differential BPSK symbol: 66⅔ symbols/s, with a half-symbol stagger.

Its coding reuses the PACTOR-2 K=9, rate-1/2 path. The 25-byte net field contains 22 data bytes, status and CRC.

Robust / SF16 or SF8

Spreading factors

SF16 gives 112.5 information symbols/s; SF8 gives 225. Spreading is a complex sequence multiplication, not a bank of independent carriers.

Robust short packets and short control words are distinct from data-bearing robust packets. A spreading-factor lock alone does not identify their role or establish a CRC.

Normal / PSK and QAM

Normal-mode modulation

Known 32-symbol sequences alternate with unknown data blocks. They give the equalizer a reference for channel distortion and phase.

Normal bodies use BPSK, QPSK, 8-PSK, 16-QAM or 32-QAM. The packet family, cycle and coding rate determine what those symbols carry.

The robust short renderer’s explicit geometry is 20 header symbols + 1 phase reference + 64 block symbols, all spread by 16: 1360 chips, or 755.556 ms before shaping. Its measured 64-symbol block is a masked Hadamard code carrying a six-bit value, rather than an ordinary user-data field. The value’s relative coding is established; assigning it a protocol meaning is a separate task.

A 27-symbol SF16 control word has 432 chips, 240 ms before shaping. The measured word bank contains distinct response and break-in patterns; these should not be silently replaced by a generic Chu-sequence template. Nominal geometry and a recovered word are different kinds of evidence.

Exact ideal coordinates

Constellation geometry

These are the label-ordered coordinates used by the normal-LONG diagnostic implementation. They are generated from the code, not taken from a received recording. Each signed integer axis is divided by 4096. The 16- and 32-point QAM geometries are specific constructions, not generic square grids.

PACTOR-4 normal-LONG ideal constellation, SL9Actual label-ordered implementation coordinates, not received samples. Every point is listed below.IQ0123456789101112131415SL9 · 16 points4 label bits per body symbolSigned axes / 4096Ideal code-derived geometry.No recorded scatter is shown.
Ideal constellation, with I horizontally and Q vertically. Labels are the implementation’s integer symbol labels; the dashed unit circle provides a scale. No received scatter, noise model or successful high-level dispatch is implied.
SL9: 16 ideal points, 4 bits per normal body symbol. This view is a standalone diagnostic geometry.
Constellation — labels and exact signed axes
Integer axes / 4096; the exact emitted coordinate table
LabelSigned ISigned QI / 4096Q / 4096
0354720480.8659670.500000
1204835470.5000000.865967
2409601.0000000.000000
3106010600.2587890.258789
4-20483547-0.5000000.865967
5040960.0000001.000000
6-35472048-0.8659670.500000
7-10601060-0.2587890.258789
82048-35470.500000-0.865967
90-40960.000000-1.000000
103547-20480.865967-0.500000
111060-10600.258789-0.258789
12-3547-2048-0.865967-0.500000
13-2048-3547-0.500000-0.865967
14-40960-1.0000000.000000
15-1060-1060-0.258789-0.258789

The PSK labels use a Gray phase walk. The 32-QAM construction combines an inner grid with fixed outer points; its three-decimal pre-rounding reproduces the implemented integer table. That is an inferred compatibility rule, not a claim about the original manufacturer’s quantizer.

Normal-LONG — exact level dimensions and capacity
Standalone SL6–10 normal-LONG dimensions. The body always has 4968 symbols; effective rate is 5/6. These rows do not establish live receiver or transmitter coverage at every level.
LevelLabel bitsPointsSystematic bitsNet bytesData-field bytes
SL6124140517514
SL724828010341031
SL8381242015521549
SL94161656020692066
SL105322070025872584

Net bytes include one status byte and two CRC bytes. Data-field capacity still includes any source-coding or application overhead. Short packets at SL5 and SL6 share the 43-byte BPSK variant; the measured 206-byte normal-LONG BPSK path is a different rate-1/3 variant. Body modulation alone cannot distinguish all packet variants.

A channel estimate between blocks

Training and frame layout

The implemented normal layout uses 32 symbols of training before each data block and an additional terminal training. A short body has six 176-symbol blocks; a long body has twenty-four 207-symbol blocks. This figure starts at the first training symbol. It excludes the packet header and shaping tails.

Normal-short training and data layoutData blocks and 32-symbol trainings alternate. Counts and complete start indices follow in the table.Known training · unknown data · terminal trainingT1D1T2D2T3D3T4D4T5D5T6D6T76 data blocks × 176 + 7 trainings × 32 = 1280 symbols0.711111 seconds at 1800 symbols/s, excluding packet header and pulse tails
Code-derived symbol layout. Dashed T blocks are 32-symbol trainings; solid D blocks carry data. The LONG view wraps onto two rows, each with proportional block widths. The table gives the complete symbol offsets, without relying on color.
SHORT: 1056 data symbols + 224 training symbols = 1280 symbols; 0.711111 seconds before the header and pulse tails.
Training layout — all start indices and lengths
Zero-based symbol indices from first training, at 1800 symbols/s
BlockFirst symbolLengthStart, ms
Training 10320.000
Data 13217617.778
Training 220832115.556
Data 2240176133.333
Training 341632231.111
Data 3448176248.889
Training 462432346.667
Data 4656176364.444
Training 583232462.222
Data 5864176480.000
Training 6104032577.778
Data 61072176595.556
Terminal training124832693.333

The training sequence is C[9…16], C[1…16], C[1…8] from a 16-symbol CAZAC sequence, giving 32 symbols. Successive trainings alternate the base sequence and its conjugate. The receiver uses these known values to estimate and equalize the channel; a good training fit alone is not a packet acceptance test.

The published normal-mode pulse is retained as an exact 129-tap array. P4’s recovery helpers use 28800-Hz complex baseband, 16 samples per chip. Their matched-filter delay is 128 samples. At the audio interface, waveform renderers resample to the requested audio rate.

The renderers use measured 140-chip headers. Their nominal pulse-inclusive emission spans are 792.778 ms for SHORT and 3.286111 seconds for LONG; resampling produces the exact audio sample counts shown above. Those durations fit within short and long ARQ cycles of 1.25 and 3.75 seconds; the cycle also includes gaps and the response slot. The page does not equate emission duration with payload throughput.

The normal headers in these renderers were measured chip by chip. Their semantic interpretation remains incomplete. Reproducing a header does not prove that a peer will accept what a newly rendered packet claims.

Bits before symbols

Turbo coding

The turbo code retains the systematic input bits and adds parity from two eight-state recursive systematic convolutional components. C1 sees the bits in their original order. C2 sees the same bits in its own input permutation. After parity selection and packing, a separate symbol permutation controls placement in the waveform.

  1. Net fieldData + status + little-endian CRC; whiten the complete byte field.
  2. C1 and C2Two components from explicit initial states. Only C2 gathers the permuted input.
  3. Pack and mapKeep systematic bits; select parity, assign labels, then permute symbols.
  4. Shape the signalInsert training and headers; spread where required; apply the exact pulse.
state = (s1, s2, s3), newest delay first
u = input XOR s2 XOR s3
parity = u XOR s1 XOR s3
next state = (u, s1, s2)

C1 input[j] = systematic[j]
C2 input[j] = systematic[pi2[j]]

The zero-state transfer is (1 + D + D³) / (1 + D² + D³). Calling the encoder with an octal polynomial pair would leave important conventions unspecified: register ordering, feedback, parity order, state initialization and termination all matter.

Parity retained at component indices zero to nineteenAll systematic positions are retained. Selected C1 and C2 positions are marked with filled boxes; the exact rule appears below.Systematic012345678910111213141516171819C1 parity012345678910111213141516171819C2 parity012345678910111213141516171819
Illustrative 20-position window into the exact component-selection rules. An empty box means omitted parity, not an erased systematic bit. Packet-specific tails and partial groups are outside this window.
Rate 1/3: systematic, all C1 parity, all C2 parity.

At rate 1/2, the implementation keeps C1[0::2] and C2[1::2]. At rate 5/6 it keeps C1[0::10] and C2[4::10]. These are indexed from the start of each component stream. Packet paths define how the tail and padding fit around that selection.

Normal-short BPSK expands a 43-byte net field into 352 systematic bits: 344 field bits, five zero bits and three inputs terminating the first component. Both components start from zero, but C2 is not independently terminated. Full rate-1/3 packing yields 1056 coded bits, one per BPSK body symbol. This is not VARA’s 12-bit dual-tail convention.

An exact table without a literal array

Symbol and component permutations

C2’s input permutation changes which systematic bit enters the second encoder at time j. The symbol permutation acts later, after coding and mapping. Inverting either order changes the operation. A size such as 1056 can appear in both systems without meaning that the two tables are interchangeable.

C2 direct-gather permutation, first 64 positions for N=352Open circles are arithmetic base positions; filled dots are exact corrected positions. The numerical table below gives both.C2 input source index pi2[j]j = 0j = 63N=352; stride=18; 4 ordered correction swaps in the complete reconstruction
First 64 entries of the exact direct gather. Open circles show the arithmetic base walk; filled dots show the corrected table. Vertical position is the source bit index. This is a code-derived permutation diagram, not a probability distribution or a measured error pattern.
N=352; stride 18; 4 ordered correction swaps. C2 input[j] = systematic[pi2[j]].

Canonical u16-LE SHA-256: a96675e46a0e83610c759bf188b1a1829f5ad1bea64c58b79eb7e599624ed0cb

C2 permutation — first 64 gather entries
Position j and source index; complete resources are linked in the derivation note
C2 input jArithmetic baseExact pi2[j]
00341
11818
23636
35454
47272
59090
6108108
7126126
8144144
9162162
10180180
11198198
12216216
13234234
14252252
15270270
16288288
17306306
18324324
19342342
2011
211919
223737
235555
247373
259191
26109109
27127127
28145145
29163163
30181181
31199199
32217217
33235235
34253253
35271271
36289289
37307307
38325325
39343343
4022
412020
423838
435656
447474
459292
46110110
47128128
48146146
49164164
50182182
51200200
52218218
53236236
54254254
55272272
56290290
57308308
58326326
59344344
6033
612121
623939
635757

Runtime reconstruction starts with w = isqrt(N), concatenates range(r, N, w) for r = 0…w−1, then applies ordered index swaps from the compact resource. The constructor checks resource hashes, index bounds, the bijection and the canonical unsigned-16-bit little-endian permutation hash before use.

All thirteen supported tables, including 1160, are exactly reconstructible. The 1160 resource has 22 corrections. These corrections describe the final table relative to the arithmetic walk; they are not a recovered random generator-state doping recipe or the original generator’s accepted-swap trace.

Twelve original CML construction recipes are separately reproducible. They require seeds, prior constructor calls, continuous random state, the neighborhood rule and the accepted-swap budget. The original 1160 seed/history is still unresolved. Some large runtime tables need nearly N swaps: “compact” describes their representation, not a promise that every table differs from the base at only a few positions.

The normal-LONG symbol order is a 24-by-207 product of the published walks: row walk (24, 5) and column walk (207, 23). Normal-SHORT uses a 24-by-44 product with column walk (44, 22). Those 4968- and 1056-symbol tables are generated arithmetically and remain distinct from the C2 input tables.

C2 table construction

PRNG state and call history

Twelve of the thirteen runtime C2 sizes have recovered CML recipes. A recipe specifies the seed, ordered constructor calls, spread parameter and accepted-swap budget. The 1160-entry table is exact at runtime; its original seed and call history remain unresolved.

Initialize once

ran2 combines two modular recurrences and a 32-entry shuffle array. Initialize the state, then discard the first complete draw.

Draw two positions

For each proposal, draw i then j using floor(N × u). Rejections and equal positions consume both draws.

Test the old array

Both incoming values must pass the half-open neighborhood test before either position changes.

Keep the state

Stop at the accepted-swap budget. A later call resets the column walk, but continues the same PRNG stream.

The two recurrence moduli are 2147483563 and 2147483399, with multipliers 40014 and 40692. The shuffle result is scaled in double precision and clamped to 1 − 1.2e−7. Integer modulo is not an equivalent position selector.

Output sizeSeedOrdered calls (N, S, accepted swaps)
35281(352, 17, 7040)
165699(2484, 38, 49680) → (2484, 40, 49680) → (1656, 32, 33120)
2070051(8280, 55, 165600) → (12420, 65, 248400) → (20700, 85, 414000)
1160UnresolvedNo original-generator recipe claimed

The first seed-99 call is discarded, but cannot be skipped. The recovered recipes use 20N accepted swaps; upstream CML defaults to 10N. These are offline table constructors, separate from the per-packet whitener and from the stored swaps used by the runtime.

Exact recurrence, initialization and acceptance rules · All thirteen runtime tables, twelve recovered recipes and verification commands

A CRC boundary, then a host boundary

Packet framing and status

The net packet is source-coded data, one status byte and two little-endian CRC-16/X-25 bytes. Whitening covers that complete byte field and resets for every packet. The implementation XORs the register’s low byte, then advances eight right-shift Galois steps using seed 0x00B770CD and feedback 0x48000000. Channel-code tails are outside that byte transform.

Bit 7      Bits 6–5       Bits 4–2        Bits 1–0
E          S1 S0          M2 M1 M0        C1 C0
extended   protocol       source mode    packet counter

The two protocol bits form one enumeration, not two independent PACTOR-3 flags. The implementation names normal, CLOSE, CHANGEOVER and speed-up values; the speed-up meaning lacks a recorded instance. Header type, packet status, receive timing and the session state must agree before a field can authorize an acknowledgement.

A CRC-valid field still contains source-coded bytes. It is not automatically a Winlink message. Extended status does not authorize removing an unknown prefix. One bounded recorded extension is handled explicitly; other unrecognized extensions remain refused. The raw frame is preserved independently of any host transformation.

The turn machine separates proposals from actual emissions: queued bytes advance on a keyed result, and settlement requires accepted associated response evidence. Waveform detection, CRC acceptance, ARQ acknowledgement, host delivery and completed mail transfer are separate outcomes.

What has been established

Implementation coverage

The project has live PACTOR-4 signaling observations, retained foreign waveform decodes and packet-specific round trips. Normal-short and normal-long BPSK paths have CRC-valid recorded examples. Chirp framing is checked against four retained Dragon fields. Higher-order normal-short paths have recorded checks; the normal-LONG SL6–10 module shown above is a standalone diagnostic path.

Those results do not establish complete live PACTOR-4 mail delivery or full interoperability across every packet family. The current offline replay reaches a CMS prompt and sends a B2F login/proposal. The implementation evidence describes that narrower result separately from demonstrated PACTOR-3 mail exchanges.

Measured normal-header semantics remain incomplete. Robust-word names and timings are backed by particular observations; their presence is not a complete specification of every control transition. Source framing and fill include documented assumptions. Live receiver dispatch, acknowledgement eligibility, deadline budgets and every higher-rate transmit path require their own evidence.

The geometry on this page remains ideal and code-derived. The constants do not establish interoperability at every speed level.

Reproduce the implementation

Protocol and source references

The detailed notes identify literal arrays, generators, resources, bit order, framing and remaining assumptions. Built source links stay local to this release.

Exact constants and source definitions

The linked protocol notes cite SCS’s technical description, including its published modulation, training, pulse and coding sections. Derived implementation conventions and measured interpretations are identified separately.