aethersdr / aethersdr/AetherSDR
Demo (SimBackend) doesn't model the radio-side autopan recenter — panadapter band-follow is unobservable in the simulator
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 221
- Forks
- 117
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 299
Description
Summary
On real Flex hardware, a band-change tune (slice tune <id> <mhz> issued without autopan=0) makes the radio recenter the panadapter on the new frequency and report the new center back to the client. The demo SimBackend does not emulate this: it moves the slice but never moves the pan center. As a result, the panadapter's cross-band band-follow behavior cannot be observed or tested in demo mode — only on hardware.
Observed vs. expected
| Action | Real 6500 | Demo / sim |
|---|---|---|
Cross-band CAT retune (e.g. set_freq 20m→40m) |
Slice moves and pan center follows to the new band | Slice moves, pan center stays put ❌ |
| In-span retune (small offset) | Slice moves, pan holds (autopan=0) | Slice moves, pan holds (matches — but only because nothing recenters) |
Evidence (measured via the automation bridge)
- Demo:
set_freq 14.1 → 7.1→get_freq=7100000, butget_state pan centerMhzstayed14.1. - Real 6500: identical command → pan
centerMhzfollowed14.261 → 7.1(a panadapter screenshot showed the 40m band-plan and the slice cursor at 7.1). Same on the SmartCAT-Flex and TS-2000 CAT planes (→ 21.1, → 28.4).
Root cause
SimBackend::setSliceFrequency()(src/core/backends/sim/SimBackend.cpp) updatesm_sliceFreqMhzand emitssliceChanged, but never touches the pan center. AsetPanCenter()/panCenterBandwidthChangedpath exists in the same file but isn't invoked on a slice tune.- The typed backend seam (
RadioConnection→SimBackend::setSliceFrequency) also strips theautopanflag, so the sim can't distinguish a recentering tune from anautopan=0one even if it wanted to.
Impact
CI and demo-mode testing can only assert the CAT-visible frequency, not the pan-follow — which is the actual behavior of the CAT band-follow feature (RFC #4333). The CAT test suites' §2c already acknowledge this ("pan-follow is CAT-invisible; confirmed visually"). Anyone using the demo to evaluate or develop band-follow will see it appear "broken" when the code is in fact correct — pan-follow currently can only be validated on hardware.
Suggested fix
Have SimBackend model the autopan recenter: on a band-change tune (out-of-span, i.e. no autopan=0), recenter the pan on the new frequency and emit panCenterBandwidthChanged, mirroring how the radio behaves. This needs the seam to carry the autopan flag (or SimBackend to infer out-of-span the way RadioModel::tuneSliceForCat does). Then demo mode + CI could exercise band-follow end-to-end.
Steps to reproduce
- Launch AetherSDR, connect to Demo.
- Note
get_state pancenter and the slice frequency. - Cross-band retune via any CAT port (e.g.
rigctld set_freqto a different band). - Observe: the slice frequency changes; the pan center does not.
- Repeat on real Flex hardware → the pan center follows.
Related sim-fidelity gap (possibly separate issue)
The demo also doesn't model a radio-side CW keyer: SmartCatProtocol::cmdKY returns ?; when !hasRadioSideCwKeyer(), which is the case in demo mode, so the TS-2000 suite's 12.13 KY; check fails against the sim (it asserts KY0/KY1). Same class of gap — the demo doesn't emulate a radio-side capability — noted here for awareness; may warrant its own issue.
🤖 Reported with assistance from Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/core/backends/sim/SimBackend.cpp and trace the RadioConnection seam into SimBackend::setSliceFrequency(). Compare that path with RadioModel::tuneSliceForCat and the existing setPanCenter()/panCenterBandwidthChanged handling. Done means demo cross-band tunes reproduce radio pan-follow while autopan=0 and in-span tunes retain their current behavior, with the relevant CI or CAT coverage updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 57/100