aethersdr / aethersdr/AetherSDR

Demo (SimBackend) doesn't model the radio-side autopan recenter — panadapter band-follow is unobservable in the simulator

Open
#4,841 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement maintainer-review protocol spectrum
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.1get_freq = 7100000, but get_state pan centerMhz stayed 14.1.
  • Real 6500: identical command → pan centerMhz followed 14.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) updates m_sliceFreqMhz and emits sliceChanged, but never touches the pan center. A setPanCenter() / panCenterBandwidthChanged path exists in the same file but isn't invoked on a slice tune.
  • The typed backend seam (RadioConnectionSimBackend::setSliceFrequency) also strips the autopan flag, so the sim can't distinguish a recentering tune from an autopan=0 one 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
  1. Launch AetherSDR, connect to Demo.
  2. Note get_state pan center and the slice frequency.
  3. Cross-band retune via any CAT port (e.g. rigctld set_freq to a different band).
  4. Observe: the slice frequency changes; the pan center does not.
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.