This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DMC 3.2库 第五步

clarke1.As = _IQ15toIQ((int32)ilg2_vdc1.ImeasA);这样操作是什么意思,  ilg2_vdc1.ImeasA是Q15的数据,假设是0x7FF0,那样强制32位后,还是0x7FF0,然后再执行_IQ15toIQ这个是干嘛 用的?

问题一:为什么要强制转换?

问题二:_IQ15toIQ这个是处理什么的,是Q15转为Q0?

  • clarke1.As = _IQ15toIQ((int32)ilg2_vdc1.ImeasA);这样操作是什么意思,  ilg2_vdc1.ImeasA是Q15的数据,假设是0x7FF0,那样强制32位后,还是0x7FF0,然后再执行_IQ15toIQ这个是干嘛 用的?

    问题一:为什么要强制转换?

    Eric: 因为程序里面都是统一Q24的格式,要把采样信号也转成Q24格式。

    问题二:_IQ15toIQ这个是处理什么的,是Q15转为Q0?

    ERIC: 转换成Q24结构。