DRVeyl / RealAntennas

KSP Mod to add better antenna / link calculations to CommNet.
29 stars 22 forks source link

Wrong Unit of N0 in the "Noise" Section of Debugger? #88

Open SaberCF opened 1 year ago

SaberCF commented 1 year ago

I found that the unit of N0 in "Noise" section is dB/Hz, and I think it should be dBm/Hz, just like the N0 in the "Min Link Channel Noise Power" below.

https://github.com/DRVeyl/RealAntennas/blob/90fb5450105e6ebebfb3dfb620b4881181c9addb/src/RealAntennasProject/Network/ConnectionDebugger.cs#L111

SaberCF commented 1 year ago

Well, the "Min Link Channel Noise Power" seems also have some faults. The two "dB" in {RATools.LogScale(data.minSymbolRate):F1} dB and {channelNoise:F1} dB" should be "dBm" I think. The unit of "Channel Noise power" in the "Min Link Eb/N0" below is "dBm". https://github.com/DRVeyl/RealAntennas/blob/90fb5450105e6ebebfb3dfb620b4881181c9addb/src/RealAntennasProject/Network/ConnectionDebugger.cs#L127 https://github.com/DRVeyl/RealAntennas/blob/90fb5450105e6ebebfb3dfb620b4881181c9addb/src/RealAntennasProject/Network/ConnectionDebugger.cs#L129

DRVeyl commented 1 year ago

Appears I was a little sloppy with units in crafting the debugger. Thanks for the dimensional analysis. I'll keep this open and make a change on next release... which has no timeline currently. [Maybe if Egg's Skopos gets some progress, he has some things he wants to PR, and I might return enough for another bugfix update and merge his things.]

You're correct, N0 will be dBm/Hz. Channel noise power should be dBm. Line 129 looks correct. Line 127 I will keep minSymbolRate in dB [it's just the log scale of the bandwidth] but channelNoise at the very end is dBm.