-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hackrf_sweep: normalized timestamp #1350
hackrf_sweep: normalized timestamp #1350
Conversation
It seems like with this change the timestamp column will be doing double-duty: It will act as a timestamp indicator of the rx_callback, but also as an unofficial sweep_count index. As such, we lose a little bit of accuracy by not having the "exact" timestamp for the row during large sweeps (and I don't know if this would break any existing application that might rely on that behavior) but we gain a column (timestamp) that we can also use for indexing individual sweeps for plotting purposes, is that correct? Is the goal to be able to consume multiple sweeps in a file and plot them all, or plot a single sweep (which maybe can be accomplished with one shot flag and then you don't have to worry about timestamps?) |
I understand that it could be a problem if someone makes use of this data and takes into account this deviation, even if it is minimal, within the same sweep. An extra option could be introduced that handles this change in timestamp handling. I tried rx_tools, the timestamp is set equal within each sweep. @dmaltsiniotis about your questions: the first yes, for the second the goal is plot a graph that is readable |
Hi @matrix, We were a bit wary about changing the There have been some other changes to |
Hi @martinling certainly, I am able to resolve conflicts. Thanks :) |
90788da
to
ac30119
Compare
done but there're some errors with workflows Thanks |
Thanks for the update. The workflow error isn't your fault, that's just broken due to something else that we're fixing. I'll add this to my list to review but I'm about to be away for a bit so it may not be right away. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this out and all looks good, just a couple of things to fix I think:
- There's one
memset
call that I think is superfluous. - Your commit fixing the clang-format errors doesn't seem to have appeased the CI check; I have a commit 91ab2e5 that may work instead.
host/hackrf-tools/src/hackrf_sweep.c
Outdated
if (timestamp_normalized == true) | ||
{ | ||
// set the timestamp of the next sweep | ||
memset(&usb_transfer_time, 0, sizeof (usb_transfer_time)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's any need for this memset
call - the structure is immediately overwritten by the following gettimeofday
call.
if you can make these last changes yourself we will speed up. Let me know if you want to proceed differently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made those changes and will merge this now. Thanks!
Hi,
I think I found a problem on hackrf_sweep, regarding the handling of the timestamp of the detections.
Using the maximum frequency range, 0:7250, you can see that within the same sweep the timestamp of the detections changes.
This change causes the unexpected spectrogram plotted by plotsweep.
how to reproduce the issue:
To solve this issue, I managed the timestamp so that it is updated only at the end of each sweep.
Below is the new graph produced, reusing the same commands as before.
Thanks :)