SSTV RX - portapack-mayhem/mayhem-firmware GitHub Wiki
Receives and decodes Slow Scan Television (SSTV) transmissions, displaying the incoming image in real time and saving it as a BMP file to the SD card. It decodes FM SSTV on VHF/UHF and SSB SSTV on HF, recognises the VIS header at the start of a picture, and switches to the mode that is sent.
This is an external app (.ppma file on the SD card).
- Frequency: The frequency to receive on. Adjustable via the encoder knob or on-screen numpad.
- RF Amp (0 or 1): Enables/disables the internal RF amplifier.
- LNA gain (0–40): Low-noise amplifier gain. See Receive Quality Issues.
- VGA gain (0–62): Variable-gain amplifier gain. See Receive Quality Issues.
- Volume: Audio output volume.
- Mode: The SSTV mode to expect. When a picture starts with a VIS header for another mode, the app switches to that mode by itself (see VIS detection).
- Ph (Phase, −50 to +50): Horizontal pixel offset to correct line start alignment. Applied immediately while receiving. Not saved between sessions.
- Slnt (Slant, −100 to +100): Timing drift correction in 0.1% steps. Adjust if the image appears diagonally tilted. Applied immediately while receiving. Not saved between sessions.
-
Mod: How the signal is demodulated:
-
Auto (default): USB below 30 MHz, FM from 30 MHz up. The field shows what Auto chose,
Auto USBorAuto FM, and follows the frequency. - FM, USB or LSB: always that one. SSTV on HF is sent in USB on all bands.
-
Auto (default): USB below 30 MHz, FM from 30 MHz up. The field shows what Auto chose,
| Mode | VIS code | Pixels | Lines | ms/pixel | Colour |
|---|---|---|---|---|---|
| Scottie 1 | 60 | 320 | 256 | 0.432 | RGB |
| Scottie 2 | 56 | 320 | 256 | 0.275 | RGB |
| Scottie DX | 76 | 320 | 256 | 1.080 | RGB |
| Martin 1 | 44 | 320 | 256 | 0.458 | RGB |
| Martin 2 | 40 | 320 | 256 | 0.229 | RGB |
| SC2-180 | 55 | 320 | 256 | 0.734 | RGB |
| Robot 36 | 8 | 320 | 240 | 0.275 (Y) | YCbCr |
| PD90 | 99 | 320 | 256 | 0.532 | YCbCr |
| PD120 | 95 | 640 | 496 | 0.190 | YCbCr |
| PD160 | 98 | 512 | 400 | 0.382 | YCbCr |
| PD180 | 96 | 640 | 496 | 0.286 | YCbCr |
| PD240 | 97 | 640 | 496 | 0.382 | YCbCr |
| PD290 | 94 | 800 | 616 | 0.286 | YCbCr |
The ISS sends its SSTV events in PD120 (sometimes PD180) on 145.800 MHz FM.
- Start begins reception; the button then reads Stop. Each Start runs the baseband afresh and creates a new timestamped BMP file; Stop shuts the baseband down and closes the file.
- Clear empties the picture on the screen. While receiving it also starts over: a new file, and the decoder waits for the next picture.
Images are saved to: SSTV/RX/SSTV_YYYYMMDD_HHMMSS.BMP, in the size of the mode (for example 640 × 496 for PD120).
Every SSTV transmission starts with a VIS header: a 1900 Hz leader followed by a code that names the mode. The app listens for it all the time. When it hears one:
- it starts a new picture at the first line (a new BMP file, the screen cleared), so a picture is never placed halfway down because of noise received before it;
- when the code is for another mode than the one selected, it switches to that mode and the Mode field changes with it;
- it measures the tuning offset from the header (see below).
The status line shows VIS: <mode> for a moment. Without a VIS header (a picture joined halfway), reception starts at the second sync in the mode selected.
With SSB, a few tens of Hz of mistuning shift every tone and so every colour. The app measures the 1200 Hz sync pulses (and the VIS header) and takes the offset off every pixel, so the colours stay right up to about ±140 Hz off. Further off, the syncs are no longer recognised.
The text field below the Mode selector shows the sync detection status during reception: Syncs: n, the suggested phase/slant corrections, and VIS: <mode> when a header is recognised.
The received image is drawn line by line in real time, scaled to fit the display area below the controls with its aspect ratio kept (never enlarged). On a 240-pixel wide screen a 320 × 256 picture shows as 240 × 192; on a 320-pixel wide screen (PortaRF) at full size.
- FM (VHF/UHF, e.g. 144.500 MHz in Europe, 145.800 MHz for the ISS): the audio is FM-demodulated and the tone frequency is measured from it.
- USB / LSB (HF, e.g. 14.230 MHz USB): the tone is taken straight from the received I/Q, without demodulation; the speaker gets the SSTV tones as usual. Tune to the dial frequency as other stations announce it.
The baseband decimates 3.072 MHz to 48 kHz. The tone frequency is estimated for every audio sample: the signal is mixed down around 1900 Hz, low-pass filtered (4th order Butterworth, 1.5 kHz) and the phase step between samples gives the frequency. Each pixel averages the frequencies over its time. Robot 36 and PD send luminance and colour difference (BT.601 YCbCr), which is turned into RGB; Robot 36 sends R-Y and B-Y on alternate lines, told apart by the separator tone between the luminance and colour scans. Finished lines are handed to the application one chunk at a time without the baseband ever waiting, so no samples are lost.
Frequency, gains and Mod are saved to rx_sstv.ini when App Settings is enabled in the global Settings menu.