On 6/9/23 6:19 PM, Anne Ranch wrote:
On Fri, Jun 9, 2023 at 04:46 PM, Roger Need wrote:
The TDR feature in NanoVNA Saver has some issues
Allow me to discourage you from such posting... you will get crucified by "guardians of purity of nanoVNA" , but I assume you are an adult and can take it.
Yes, the nanoVNASaver is a challenge , to put it mildly. ( and I will leave it at that...)
I am still searching for a clue where to find at least some of the TDR code.
I got sidetracked actually calculating the REAL RG6 cable length to act as "in line transformer".
And it is too hot to work on the antenna....
-=-=
The calculations are in ./Windows/TDR.py (not ./Charts/TDR.py, that's what actually does the plotting)
It's pretty straightforward in function updateTDR() - blackman window, ifft, convolution with 1s to turn impulse response into step response, then calculate Z from the step response
self.step_response_Z = 50 * (1 + self.step_response) / (1 - self.step_response)
I posted the source snippet an hour or so ago.
The length you posted seems to be about right, if you had entered 0.66 for the VF and the RG-6 was actually foam dielectric with a VF of 0.84
__init__() sets up the defaults and populates the cable type dropdown with corresponding velocity factors.
the only tricky part is where it concatenates a series of smaller sweep segments.
s11 = []
for d in self.app.data11:
s11.append(np.complex(d.re, d.im))
app.data11 is a list of data sets.
One area where it could foul up is if the points aren't equally spaced, or if the segments have any overlap. The other place where a hiccup could occur is if there's a truncation issue in setting the frequencies of the segments. I've been bitten by that when trying to do log sweeps and the step size at the low end is < minimum step size.