Repository navigation
Conversation
Implement has/set/getFrequencyCorrection so clients such as SatNOGS can compensate for HackRF reference clock error. - Apply the correction as freq * (1.0 + ppm * 0.000001), matching gr-osmosdr's hackrf source/sink so existing ppm values carry over - Correct only the LO; getFrequency still reports the requested frequency - Share one correction between RX and TX, and retune when it changes - Route all tuning through a tuneFrequency() helper - Require SoapySDR 0.6.0, which introduced the frequency correction API Fixes pothosware#32 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BxbvUpdbUDsNz18oPZFCP1
Member
|
This looks quite complete. Testing would be scanning through some PPM values and verify that the effect is as intended (maybe check that signal moves as expected in a waterfall). I don't know about the sample rate suggestion, wouldn't that affect downstream processing? |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Hello, as discussed in #32 I took a stab at implementing the has/set/getFrequencyCorrection functions. Please let me know what kind of testing plan would be helpful.
I used Claude Opus to help get familiar with the codebase. Claude's summary of the PR is below for reference.
Design notes:
(real_freq = freq * (1.0 + ppm * 0.000001)), so a ppm value
calibrated in gr-osmosdr based tools carries over unchanged.
argument is ignored), since both paths use the same reference oscillator.
skip the correction.
frequency correction API.
Potential improvements (intentionally left out for now):
same reference oscillator as the LO.
sane bound such as ±1000 ppm); a value of -1e6 or below currently makes
the corrected frequency zero or negative before the cast to uint64_t.
positive correction near the top of the band does not request an
out-of-range frequency.
Testing: builds cleanly; the correction math was checked against a
stubbed libhackrf. Not yet verified on hardware across the band.
Fixes #32
🤖 Generated with Claude Code