Hi,

I don't know volk_32fc_convert_16 ic. Dunno if it converts between big
and little indians:(
When converting a float to int, you always have to ceil or floor the float.
Ceil sounds as good as any. You can easily change that to floor if you
run into problems.
Since clibs le32to* take ints as arguments, I would first convert
float32 to int32 from gnuradio save to file, and then worry about
the indians when importing to uhd...

HTH
Nikos

On Fri, Jul 1, 2022 at 8:42 AM sp h <stackprogra...@gmail.com> wrote:
>
> I recorded a complex signal file, I did it with HackRFONE,  For sending on 
> USRP I want to use the int16 option as input, My question is how can convert 
> a complex float 32 signal to complex int 16 for USRP?
> what's the relation between complex float 32 and complex int 32 in USRP?
> I know that in USRP numbers are in format complex int 16 and big-endian and 
> in Gnuradio numbers in format complex float 32 and little-endian...
> https://files.ettus.com/manual/page_converters.html
> I used volk lib but the float that I entered as input, is ceiled to bigger 
> integers. Is this a method valid for converting signals...?Or my data will be 
> corrupt!!!
> Thanks in advance.
>
>
>>        lv_16sc_t* outputVector;
>>
>>        lv_32fc_t* inputVector;
>>
>>        inputVector->real(25.55);
>>
>>        inputVector->imag(45);
>>
>>        volk_32fc_convert_16ic(outputVector,inputVector,32);
>>
>>        qDebug()<<outputVector->real()<<"-----";
>
>
> The output:
>>
>> 26 -----
>
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-le...@lists.ettus.com
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to