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.

EVM430-FR6043程序中USS_runAlgorithmsFixedPoint库函数有详细说明吗?

请问USS_runAlgorithmsFixedPoint函数执行完毕后,获得的结果iq44DeltaTOF并不等于iq40TotalTOF_DNS-iq40TotalTOF_UPS,请问这个库函数有源码吗?或者有没有内部运算的说明?

  • 很抱歉,该算法的源代码是没有公开的。我们仅以lib形式提供。
  • //! \brief The following API calculates Absolute ToF Upstream, Absolute ToF
    //! Downstream, Delta ToF, Volume Flow Rate using fixed point math.
    //! //! \n \n \b IMPORTANT: It is recommend to use this version of the API to
    //! reduce power consumption numbers
    //!
    //! \n \n \b Note1: USS_initAlgorithms must be called prior to calling this
    //! function.
    //!
    //! The API expects to have a Up stream (UPS) and Down stream (DNS) of size
    //!	"sampleSize" in contiguous LEA memory where the first capture is assumed to
    //! be UPS capture and the second capture is assumed to be DNS capture.
    //!	Therefore, UPS and DNS capture depends on the type of capture the
    //!	user select via sequenceSelection member in USS_Measurement_Configuration structure
    //! For example: if sequenceSelection == USS_measurement_capture_sequence_ch0_ch1
    //! then USS CH0 is assumed to be UPS capture and CH1 is assumed to be DNS capture
    //! and vice versa for USS_measurement_capture_sequence_ch1_ch0
    //! If API return message code USS_message_code_valid_results, then algorithms
    //! result are valid.
    //!
    //!
    //! \param[in] config  is a pointer to the USS SW Library user configuration
    //! \param[in] results  is a pointer to the USS Algoriithms Result structure
    //!
    //! \return USS_message_code
    
    extern USS_message_code USS_runAlgorithmsFixedPoint(
    		USS_SW_Library_configuration *config,
    		USS_Algorithms_Results_fixed_point *results);

  • //! \brief Contains USS SW Lib Algorithms Results
    //!
    typedef struct _USS_Algorithms_Results_fixed_point_
    {
    USS_message_code messageCode;
    int32_t iq44DeltaTOF;
    //!< Delta Time Of Flight calculation result
    int32_t iq40TotalTOF_UPS;
    //!< Upstream total Time Of Flight calculation result
    int32_t iq40TotalTOF_DNS;
    //!< Downstream total Time Of Flight calculation result
    int32_t iq16VolumeFlowRate;
    //!< Volume flow rate calculation result
    int32_t iq16VolumeFlowRateNoCalib;
    //!< Volume flow rate calculation result without VFR calibration
    //!< (only used for VFR calibration)
    int32_t iq16Temperature;
    //!< Temperature calculation result
    }USS_Algorithms_Results_fixed_point;

    iq40TotalTOF_DNS应该是顺流时间
    iq40TotalTOF_UPS应该是逆流时间
    iq44DeltaTOF我理解是时间差,为什么不是逆流时间和顺流时间的差值呢?

  • 不是从TOF_UPS-TOF_DNS来计算deltaTOF的。它使用基于相关的方法对ADC捕获数据进行计算。因为这对于volume accuracy至关重要。deltaTOF = TOF_UPS-TOF_DNS只是一个粗略的结果。 有关更多详细信息,请参见

    www.ti.com/.../sway007.pdf
  • 谢谢,我先看看资料