ttrftech / NanoVNA

Very Tiny Palmtop Vector Network Analyzer
1.06k stars 297 forks source link

Frequency stepping #78

Closed hugen79 closed 4 years ago

hugen79 commented 4 years ago

Frequency stepping using the uint32_t type is better than the float type. If you use the float type, scan 50k-900MHz, at 900MHz, it will actually scan 900000016Hz, using uint32_t type can avoid this problem. Thank you!

hugen

qrp73 commented 4 years ago

nice finding, but it looks that your fix has rounding error. I suggest to use this one: https://github.com/qrp73/NanoVNA/commit/1c6dc02f422c2d5a84117ba0e63f660920dd4f38

there is also fix for another bug (no frequency update if old frequency equals to a new one, but actual frequencies are different)

hugen79 commented 4 years ago

nice finding, but it looks that your fix has rounding error. I suggest to use this one: qrp73@1c6dc02

there is also fix for another bug (no frequency update if old frequency equals to a new one, but actual frequencies are different)

Yes, we can avoid errors by multiplying first.