10**() refers to "10 raised to the power of" so 10**(-10/20) is 10 to the power of (-1/2) which is .316.
Do I even have to compute any logs at all? I feel I should have to convert the log magnitudes my scope gives me into a linear scale so the percentages make sense. Am I correct?
Actually no logs are necessary. You would use log(base 10) if you were converting from volts to dB. Since we are going the other way, use powers.
The dB level of a voltage compared to a reference level signal, Vref, is equal to 20 x log[base10](V/Vref). In this case we may assume Vref is 1.
Converting back to Volts then V = Vref x 10**(dB/20).
I assume, for my calculations, I should treat the magnitude of my fundamental as displayed by the scope as "1". So with my -20db fundemental. -20db is "1" in my calcs, yes?
Since we are calculating the RELATIVE amplitudes of harmonics and their total distortion we may assume the fundamental has a Voltage level of 1 (peak, RMS, P-P, it doesn't matter) and figure everything from there. For the purposes of this discussion the actual signal level may be mV, V, KV, it also doesn't matter.
So, the fundamental is assigned the value of 0 dB when we are dealing with this. All of the harmonics are measured relative to that so your 2nd harmonic would sit at -10 dB. The negative sign is important and indicates that the amplitude of the 2nd is LESS than the fundamental. If you have any other harmonics then they would also be measured at some dB level compared to the 0dB fundamental, negative being LESS and positive being MORE.
So, with the fundamental assigned the value of 0 dB and the 2nd Harm at -10dB then we first calculate its voltage level of the 2nd harm. as V2nd = 10**(-10/20) = 0.316 V assuming the fundamental level is 1 V.
We then do similarly with any other harmonics that show up on the FFT, square those values and add up these RELATIVE voltages.
Next take the square root of this total and divide it by the fundamental amplitude (which is as we said before) is 1.
This result is the RMS voltage level of all harmonics combined.
The only thing left to do is multiply by 100 to convert that to a percentage value. This percentage value is the magnitude of the voltage of all harmonics combined as compared to the fundamental.
In your first example, if you had only the 2nd harmonic then you would have 100% x 0.316 = 31.6% harmonic distortion.