Skip to content
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

MiB wrong conversion in hackrf_transfer.c #1425

Open
signalius opened this issue Mar 4, 2024 · 1 comment
Open

MiB wrong conversion in hackrf_transfer.c #1425

signalius opened this issue Mar 4, 2024 · 1 comment
Labels

Comments

@signalius
Copy link

signalius commented Mar 4, 2024

What type of issue is this?

permanent - occurring repeatedly

What issue are you facing?

   fprintf(stderr,
      "%4.1f MiB / %5.3f sec = %4.1f MiB/second, average power %3.1f dBfs",
      (byte_count_now / 1e6f),  << HERE
      time_difference,
      (rate / 1e6f),  << and HERE
      dB_full_scale);

MiB unit is (2^10)^2 and you divide by 10^6 (byte_count_now / 1e6f) so actually you have unit MB not MiB.
There are two solutions:

  1. change MiB to MB,
  2. divide by (2^10)^2

What are the steps to reproduce this?

just to run hackrf_transfer software.

Can you provide any logs? (output, errors, etc.)

not necessary

@martinling martinling added the bug label Mar 13, 2024
@martinling
Copy link
Member

Good point! I think we should just change it to correctly identify the unit as MB, since that keeps the clear relationship where e.g. 10Msps sampling rate results in a 20MB/s transfer rate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@martinling @signalius and others