1
WXK
2023-09-11 a6030824567b93e5416744033a1900a89215533f
Src/application/dw_app.c
@@ -70,8 +70,15 @@
#define FINAL_MSG_RESP_RX_TS_IDX 14
#define FINAL_MSG_FINAL_TX_TS_IDX 18
#define FINAL_MSG_TS_LEN 4
#define _UWB_4G
static dwt_config_t config = {
   5,               /* Channel number. */
#ifdef _UWB_4G
   2,               /* Channel number. */
#else
    5,
#endif
   DWT_PRF_64M,     /* Pulse repetition frequency. */
   DWT_PLEN_64,    /* Preamble length. */
   DWT_PAC8,        /* Preamble acquisition chunk size. Used in RX only. */
@@ -338,7 +345,11 @@
      {
         // exsistbase_list[i]--;
          clockOffsetRatio = anc_clockoffset[i] * (FREQ_OFFSET_MULTIPLIER * HERTZ_TO_PPM_MULTIPLIER_CHAN_5 / 1.0e6) ;
#ifdef _UWB_4G
            clockOffsetRatio = anc_clockoffset[i] * (FREQ_OFFSET_MULTIPLIER * HERTZ_TO_PPM_MULTIPLIER_CHAN_2 / 1.0e6) ;
#else
            clockOffsetRatio = anc_clockoffset[i] * (FREQ_OFFSET_MULTIPLIER * HERTZ_TO_PPM_MULTIPLIER_CHAN_5 / 1.0e6) ;
#endif
          rtd_init = tag_resprx[i] - poll_tx_ts;
          rtd_resp = anc_resptx[i] - anc_pollrx[i];
          tof = ((rtd_init - rtd_resp * (1 - clockOffsetRatio)) / 2.0) * DWT_TIME_UNITS;