<div dir="ltr">I've been working on a receiver project for HPSDR for... a while now.  I've managed to get a waterfall display starting to work, I'm just trying to figure out the proper means of showing something useful to the user.<div>

<br></div><div>If there is any context needed as to what level I am at this, before reviewing KK source I had a completely blank waterfall (rounding down to zero on all pixels), as I didn't realize the waterfall was measured in decibels, not by magnitude or magnitude-squared.</div>

<div><br></div><div style>I'm currently getting numbers between -150 and -200.  I have identified at least two, possibly three places in KK where the numbers are multiplied by some constant where I am not so (at least before any calibration gain is added in) I don't expect any numbers I come up with to be comparable to KK.  The range of numbers I'm seeing I suspect is limited to -10240 (limit of double) through +30 (I haven't scaled the FFT by my window size yet).<br>

</div><div style><br></div><div style>My current goal is to take these range of numbers and somehow scale them to the range of colors (0.0 - 1.0) that make up the waterfall.  Note that at this point I am primarily measuring noise floor.  This means my intended output is a nice blue differentiated waterfall.  The naïve approach in my mind would be to just take the minimum and maximum values over the last N seconds and use them as the bounds; this would cause the noise floor to be measured as almost clipping, which doesn't really sound right.</div>

<div style><br></div><div style>KK appears to use a hardcoded upper bound of -80 and a discovered lower bound.  That upper bound may work once calibrations start translating my dB values into dBm, but before calibration is written in that -80 would need to be adjusted to account for the multiplications that I am not doing in the code.</div>

<div style><br></div><div style>Working through this email I do see possible approaches as (1) just take the min and max and don't care that the noise floor maxes out the display, (2) try to remove the multiplication factors and see what that -80 means to me, (3) point the receiver at 10MHz or something and start making my own magic numbers (4) borrow a signal generator from someone and follow the instructions to calibrate the receiver</div>

<div style><br></div><div style>I'm virtually certain that at least a few people here have worked through similar issues, and there likely is something very obvious that I'm still missing here (realizing I didn't know to take the logarithm to have a readable display was a reality check for me).  I would appreciate any pokes, if nothing else to show that I'm going in about the right direction.</div>

<div style><br></div><div style>Erik</div><div style>KM2G</div></div>