Add new frequency estimation.

This commit is contained in:
Gatsby Van
2024-01-23 15:29:01 +08:00
parent 0f5526736d
commit f4af6a1522
5 changed files with 126 additions and 20 deletions
+4 -4
View File
@@ -224,7 +224,7 @@ int32_t RTT_FsmUpdate(L2_INST *instPtr, L2_TOR_TYPE torType)
DBG_INFO("Preparing data for RTT REQ-2.\n");
rttFsmPtr->isR2Valid = true;
// Update doppler
rttRecord->dopplerR2 = (int32_t)Phy_GetCoarseFreqEst(phyRef);
rttRecord->dopplerR2 = (int32_t)Phy_GetFreqEst(phyRef);
// Update Tr2
RTT_GetFrameStart(instPtr, &(rttRecord->Tr2), torType);
// Calculate TroundA
@@ -292,7 +292,7 @@ int32_t RTT_FsmUpdate(L2_INST *instPtr, L2_TOR_TYPE torType)
DBG_INFO("RTT RSP-2 have been received.\n");
rttFsmPtr->isR4Valid = true;
// Update doppler
double doppler = Phy_GetCoarseFreqEst(phyRef);
double doppler = Phy_GetFreqEst(phyRef);
rttRecord->dopplerR2 = (int32_t)doppler;
// Update Tr4
RTT_GetFrameStart(instPtr, &(rttRecord->Tr4), torType);
@@ -340,7 +340,7 @@ int32_t RTT_FsmUpdate(L2_INST *instPtr, L2_TOR_TYPE torType)
DBG_INFO("Preparing data for RTT RSP-1.\n");
rttFsmPtr->isR2Valid = true;
// Update doppler
rttRecord->dopplerR2 = (int32_t)Phy_GetCoarseFreqEst(phyRef);
rttRecord->dopplerR2 = (int32_t)Phy_GetFreqEst(phyRef);
// Update Tr1
RTT_GetFrameStart(instPtr, &(rttRecord->Tr1), torType);
}
@@ -403,7 +403,7 @@ int32_t RTT_FsmUpdate(L2_INST *instPtr, L2_TOR_TYPE torType)
DBG_INFO("Preparing data for RTT RSP-2.\n");
rttFsmPtr->isR3Valid = true;
// Update doppler
rttRecord->dopplerR2 = (int32_t)Phy_GetCoarseFreqEst(phyRef);
rttRecord->dopplerR2 = (int32_t)Phy_GetFreqEst(phyRef);
// Update Tr3
RTT_GetFrameStart(instPtr, &(rttRecord->Tr3), torType);
// Calculate TroundB