From 8d3393c0a5696e79808eedbe8d3a820aee8c60f7 Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期二, 24 九月 2024 20:01:56 +0800 Subject: [PATCH] 初步解决加入车载后和标签测距会变大的bug --- keil/dw_app.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keil/dw_app.c b/keil/dw_app.c index 0f00856..5e355d4 100644 --- a/keil/dw_app.c +++ b/keil/dw_app.c @@ -35,7 +35,7 @@ memcpy(&tag_resprx[i],&resprx,4); memcpy(&anc_distoffset[i],distoffset,2); memcpy(&tag_polltx[i],&polltx,4); - //anc_clockoffset[i] = anc_clockoffset_from_MK;//MK8000修改 + anc_clockoffset[i] = freq_offset;//MK8000修改 } void CalculateDists1(int64_t poll_tx_ts) { @@ -108,7 +108,7 @@ // correct antenna delay // tround -= ranging_ant_delays_get(uwb_app_config.ppdu_params.rx_ant_id); // corrected by frequency offset - tround = (int64_t)((double)tround * (1 - (double)freq_offset_filter / ch_center_freq_map[UWB_CH_NUM])); + tround = (int64_t)((double)tround * (1 - (double)anc_clockoffset[i] / ch_center_freq_map[UWB_CH_NUM])); tround_temp=tround; treply_temp=treply; tof_i = (int32_t)(tround - treply) / 2; -- Gitblit v1.9.3