Skip to content

Trace Types

The NanoVNA-H firmware supports 30 distinct trace types, each providing a different view of the measured S-parameters. Trace types are organized by applicable channel (S11 reflection or S21 transmission).

Each trace type has associated metadata controlling its display:

  • Name: Short identifier shown on screen
  • Unit: Measurement unit symbol
  • Default Reference Position: Y-axis grid position for the reference level (0-based, NGRIDY=8)
  • Default Scale: Units per vertical division

These trace types display measurements from the CH0 (S11) channel, showing reflection characteristics of the DUT.

TypeNameUnitRef PositionScale/DivDescription
TRC_LOGMAGLOGMAGdB7 (top)10 dBLogarithmic magnitude of reflection coefficient
TRC_PHASEPHASEdeg4 (center)90 degPhase angle of reflection coefficient
TRC_DELAYDELAYs4 (center)1 nsGroup delay
TRC_SMITHSMITH-01.0Smith chart (normalized impedance)
TRC_POLARPOLAR-01.0Polar plot of reflection coefficient
TRC_LINEARLINEAR-00.125Linear magnitude of reflection coefficient
TRC_SWRSWR-00.25Standing Wave Ratio
TRC_REALREAL-4 (center)0.25Real part of reflection coefficient
TRC_IMAGIMAG-4 (center)0.25Imaginary part of reflection coefficient
TRC_RRohm0100 ohmResistance (real part of impedance)
TRC_XXohm4 (center)100 ohmReactance (imaginary part of impedance)
TRC_Z|Z|ohm050 ohmImpedance magnitude
TRC_ZPHASEZ phasedeg4 (center)90 degImpedance phase angle
TRC_GGS010 mSConductance
TRC_BBS4 (center)10 mSSusceptance
TRC_Y|Y|S020 mSAdmittance magnitude
TRC_RpRpohm0100 ohmParallel resistance
TRC_XpXpohm4 (center)100 ohmParallel reactance
TRC_sCsCF4 (center)10 nFSeries capacitance
TRC_sLsLH4 (center)10 nHSeries inductance
TRC_pCpCF4 (center)10 nFParallel capacitance
TRC_pLpLH4 (center)10 nHParallel inductance
TRC_QQ-010Quality factor

These trace types work with both S11 and S21 channels, but some are specifically designed for S21 transmission measurements.

TypeNameUnitRef PositionScale/DivDescription
TRC_LOGMAGLOGMAGdB7 (top)10 dBLogarithmic magnitude
TRC_PHASEPHASEdeg4 (center)90 degPhase angle
TRC_DELAYDELAYs4 (center)1 nsGroup delay
TRC_SMITHSMITH-01.0Smith chart display
TRC_POLARPOLAR-01.0Polar plot
TRC_LINEARLINEAR-00.125Linear magnitude
TRC_REALREAL-4 (center)0.25Real part
TRC_IMAGIMAG-4 (center)0.25Imaginary part
TypeNameUnitRef PositionScale/DivDescription
TRC_RserRserohm4 (center)100 ohmSeries resistance (from S21)
TRC_XserXserohm4 (center)100 ohmSeries reactance (from S21)
TRC_Zser|Zser|ohm4 (center)100 ohmSeries impedance magnitude
TRC_RshRshohm4 (center)100 ohmShunt resistance (from S21)
TRC_XshXshohm4 (center)100 ohmShunt reactance (from S21)
TRC_Zsh|Zsh|ohm4 (center)100 ohmShunt impedance magnitude
TRC_Qs21Q-010Quality factor (from S21)

The four most-used trace formats. Each screenshot is captured directly from the NanoVNA-H LCD.

LOGMAG — Return loss or insertion loss in dB:

LOGMAG trace showing S11 and S21 magnitude from 100 to 200 MHz

SWR — Standing wave ratio for antenna tuning:

SWR trace showing standing wave ratio for S11

Smith Chart — Complex impedance on a normalized grid:

Smith chart display showing S11 impedance trace

Phase — Reflection or transmission phase in degrees:

Phase trace showing S11 phase angle across frequency

Most trace types display on a rectangular grid with frequency on the X-axis:

LOGMAG, PHASE, DELAY, LINEAR, SWR, REAL, IMAG,
R, X, Z, ZPHASE, G, B, Y, Rp, Xp,
sC, sL, pC, pL, Q,
Rser, Xser, Zser, Rsh, Xsh, Zsh, Qs21

These types display on a circular grid:

  • SMITH: Normalized impedance on Smith chart (real axis 0-infinity, imaginary axis -j to +j)
  • POLAR: Complex reflection coefficient (magnitude 0-1, angle 0-360 deg)

These types use nano/pico unit scaling for input values:

DELAY (nanoseconds), sC, sL, pC, pL (nanofarads/nanohenries)

Each trace type has associated format strings for marker readout:

TypeValue FormatDelta FormatExample Output
LOGMAG%.2f dBdelta %.3f dB-3.25 dB
PHASE%.2f degdelta %.2f deg45.00 deg
DELAY%.4F s%.4F s1.234 ns
SWR%.3fdelta %.3f1.500
R, X, Z%.3F ohmdelta %.3F ohm50.0 ohm
G, B, Y%.3F Sdelta %.3F S20.0 mS
sC, pC%.4F Fdelta %.4F F10.00 pF
sL, pL%.4F Hdelta %.4F H100.0 nH

The %F format applies automatic SI prefix scaling (k, M, G, m, u, n, p).

Each trace has the following configuration parameters stored in trace_t:

typedef struct trace {
uint8_t enabled; // 0=disabled, 1=enabled
uint8_t type; // TRC_LOGMAG, TRC_PHASE, etc.
uint8_t channel; // 0=S11, 1=S21
uint8_t smith_format; // Smith chart marker format (MS_LIN, MS_LOG, etc.)
float scale; // Units per division
float refpos; // Reference position (0-NGRIDY)
} trace_t;

Maximum trace count is 4 active traces (TRACES_MAX = 4), plus 1 stored trace (STORED_TRACES = 1).

Trace type definitions are located in:

  • Enum definition: nanovna.h lines 837-847
  • Trace info table: plot.c lines 564-596 (trace_info_list[])
  • Trace structure: nanovna.h lines 989-996