-
Notifications
You must be signed in to change notification settings - Fork 40
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
Option to get integer I/Q stream #4
Comments
I had a closer look. My idea is to
|
You will also have to implement the IQ balancer to use integers instead of floats. |
Yes it looks like it and there is a complex multiplication with a fixed value dpending on frequency correction. I am wondering if |
Guys, it costs CPU cycles to get these floats out. Why would anyone convert them back to int16? The post processing of the raw samples involves complex math and part of that math runs on doubles, not even single precision floats, so the cost of using floats/doubles will be there anyway. Use floats. Floats are cheaper than you may think - if implemented properly. |
I don't know why anyone wants int samples, perhaps to reduce the transfer rate on a sub-standard USB connection? |
I do want int16 and why would it cost something? They are already there and converted to floats. All my software works with integers. It seems necessary for you to convert to floats to further apply frequency, DC and IQ corrections and then of course it would have a cost to get back to integers. In my opinion these corrections should be left to the application code but that's your choice... I am not keen to support the cost of this choice in my application code though. Maybe I should reformulate the request: what I actually want is the raw integer samples without any correction and that costs nothing. Actually this is not entirely true because for some reason the I and Q need to be swapped but I can live with this. Moreover I am talking about an option. Usually interface libraries offer a choice of format for the samples. Why wouldn't your library support this? |
Fair enough. The code is released under the most permissive license. You can embed a light version without the IQ correction to accommodate your requirements. You can even remove the DSP thread and the output queue. |
Does this mean you would accept a PR or shall I proceed with this on my own fork only? |
The idea is to not break the existing API, which is already referenced by many applications. All the other applications use floats to represent IQ signals internally. Any suggestions? |
I see only this as an issue: "make samples in airspyhf_transfer_t a void *". I suppose adding another pointer for the raw int samples wouldn't hurt though. One should access the Note1 on "All the other applications use floats to represent IQ signals internally": maybe but that might not be such a great idea. Integer arithmetics will go faster. Note2: Ironically the original Airspy library offers a vast choice of sample formats using more or less the interface initially suggested. |
I think this is going nowhere. I'm still not convinced applications should use raw samples or any internal stuff that is specific to any given hardware. The role of the library is to abstract these details. If you need usable 16bit samples, the first thing to do is to port the IQ correction algo to fractional math and make sure it works properly with 120 dBc of rejection, and only then hack the output buffers. Hacking is easy. Doing it right is not. |
I have working LO, DC and IQ correction in my software, The role of a low level library is to provide the applications with what they need. You are right this is going nowhere because of your stubborness and lack of knowledge and experience in real computing and collaboration. I will use my own copy. |
This is not personal. Your solution doesn't fit our quality standards (or any reasonable quality standards that is). Nothing to do with "collaboration". Many useful contributions were accepted because they solve real problems with elegant solutions. |
Sorry to be a bit bold maybe. I don't find your solution very elegant and I have 25+ years of experience with a software company that raised its revenue from millions to billions. At least you have made the right choice to go for Open Source but you should be more open to change. What you mean by quality standards? If my changes do not meet it then you need to rewrite libairspy because I just applied the same standards. And real problems come from real use cases of your customers. |
Software dev standards have changed since 25 years. This lib is open source because it has to be open source - not because we like software patchwork. |
Real problems come from real use cases of your customers and you don't want to listen to my needs that are perfectly legitimate. You think everyone should use floats? I think this is a bad choice in a high performance SDR application. And even if I'm wrong you should provide me with the option. You think your low level library should do everything and even brew the coffee? Some applications do it better so this should only be an option. Your library libairspy was much better in that sense. If you were in real business you wouldn't go very far. You re thinking I am just an old git telling old stories of old rubbish. Listen more carefully young boy. In those 25+ years I have followed history from mainframes in assembly code to cloud computing client/server applications with nosql DB, Angular io... So I know a little bit what I am talking about. |
Again, this is not personal. You can move on. |
Hello,
would it be possible to have an option to get the I/Q stream as 16 bit integer samples (int16_t). I see there is a conversion function from int to float so the original stream from USB should be integers. This is the format I would like to access.
If you don't have time I can look closer at the code and try to find an elegant (not too ugly) way to do this.
Thank you and best regards.
The text was updated successfully, but these errors were encountered: