Skip to content

Add PEP peak hold indicator to TX power gauge (SmartSDR parity) #2561

Description

@TnxQSO-Admin

Request preparation

  • I used an AI assistant to help structure this request
  • I checked for existing issues covering the same feature

What would you like?

What

Add a peak-hold marker to the TX forward power gauge (FWDPWR)
in TxApplet, showing PEP (Peak Envelope Power) with a 2-second
hold and slow decay. SmartSDR displays both a fast needle and a
slow peak-hold bar; AetherSDR currently shows only the
double-smoothed fast needle.

Why

On SSB, instantaneous power varies rapidly with speech dynamics.
The current double-smoothed display (MeterModel exponential
smoothing + HGauge MeterSmoother) absorbs brief peaks and shows
a running average roughly 1-2 dB below actual PEP. On a 500W
radio, the gauge reads ~400W when a passive VITA-49 sniffer
reading the same FWDPWR meter data shows 502W PEP. This leads
operators to believe they are not reaching rated output when
they actually are.

PEP is the standard power measurement for SSB and the value
operators need to see for regulatory compliance (most license
classes specify max PEP, not average).

How Other Clients Do It

SmartSDR shows a fast-moving needle (current smoothed power)
plus a separate slow peak-hold bar that captures the maximum,
holds for approximately 2 seconds, then decays. The peak-hold
bar is the PEP reading.

Suggested Behavior

The FWDPWR gauge in TxApplet gains a peak-hold tick mark
(white or amber line) in addition to the existing filled bar.
The tick captures the highest instantaneous value, holds for
2 seconds, then decays toward the current smoothed value.

The infrastructure already exists:

  • HGauge::setPeakValue() is implemented (HGauge.h:73-78)
    and renders a static tick (HGauge.h:157-173)
  • PhoneCwApplet already calls setPeakValue() for the mic
    level gauge (PhoneCwApplet.cpp:817)
  • MeterModel already computes m_fwdPowerInstant (the raw
    pre-smoothed sample at MeterModel.cpp:643) but never emits it

The peak-hold tick would appear on the same HGauge that
currently shows only the smoothed value via setValue().

Protocol Hints

No protocol changes needed. FWDPWR meter data already arrives
at ~20 fps via VITA-49 PCC 0x8002. The raw instantaneous value
(m_fwdPowerInstant) is already computed in MeterModel but
discarded before emission.

Acceptance Criteria

  • FWDPWR gauge in TxApplet shows a peak-hold marker during TX
  • Peak hold captures the highest instantaneous FWDPWR value
  • Peak holds for ~2 seconds, then decays toward the current
    smoothed value (matching SmartSDR behavior and the existing
    RX S-meter peak-hold pattern in SMeterWidget)
  • m_fwdPowerInstant (or equivalent) is emitted alongside the
    smoothed value via txMetersChanged
  • TxApplet calls setPeakValue() on the FWDPWR gauge with the
    peak-held value

Implementation sketch

A. MeterModel (MeterModel.cpp):

  • Add m_fwdPowerPeak member
  • After smoothing block (~line 644), capture peak:
    if (watts > m_fwdPowerPeak) m_fwdPowerPeak = watts;
  • Extend signal: emit txMetersChanged(m_fwdPower, m_fwdPowerPeak, m_swr);
  • Add a 50 ms QTimer to decay m_fwdPowerPeak toward
    m_fwdPower after a 2-second hold

B. TxApplet (TxApplet.cpp:498-502):

  • Update slot signature to include peakPower
  • Add: m_fwdGauge->setPeakValue(peakPower);

Affected files

  • src/models/MeterModel.h (add m_fwdPowerPeak, update signal)
  • src/models/MeterModel.cpp (peak capture + decay timer)
  • src/gui/TxApplet.h (update slot signature)
  • src/gui/TxApplet.cpp (call setPeakValue)
  • src/gui/MainWindow.cpp (~line 3110, update signal connection)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceVITA-49VITA-49 UDP streaming: FFT, waterfall, audio, metersenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is taken

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions