From 3aba2d55bc17a89edc08d30d26422c5b73e33cf6 Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Fri, 11 May 2018 11:16:11 +0200 Subject: [PATCH] #315 Corrected logging of useful data rate --- src/deck/drivers/src/lpsTdoa3Tag.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/deck/drivers/src/lpsTdoa3Tag.c b/src/deck/drivers/src/lpsTdoa3Tag.c index 5805f28d24..0d21dc77cf 100644 --- a/src/deck/drivers/src/lpsTdoa3Tag.c +++ b/src/deck/drivers/src/lpsTdoa3Tag.c @@ -548,7 +548,6 @@ static bool findSuitableAnchor(anchorInfo_t** otherAnchorCtx, const anchorInfo_t if (candidateAnchorCtx) { if (seqNr[i] == historyGetSeqNr(candidateAnchorCtx) && historyGetTimeOfFlight(anchorCtx, candidateAnchorId)) { *otherAnchorCtx = candidateAnchorCtx; - stats.suitableDataFound++; return true; } } @@ -608,6 +607,7 @@ static bool rxcallback(dwDevice_t *dev) { anchorInfo_t* otherAnchorCtx = 0; if (findSuitableAnchor(&otherAnchorCtx, anchorCtx)) { + stats.suitableDataFound++; float tdoaDistDiff = calcDistanceDiff(otherAnchorCtx, anchorCtx, packet, &arrival); enqueueTDOA(otherAnchorCtx, anchorCtx, tdoaDistDiff); } @@ -700,13 +700,13 @@ uwbAlgorithm_t uwbTdoa3TagAlgorithm = { LOG_GROUP_START(tdoa3) LOG_ADD(LOG_UINT16, stRx, &stats.packetsReceivedRate) LOG_ADD(LOG_UINT16, stEst, &stats.packetsToEstimatorRate) +LOG_ADD(LOG_UINT16, stFound, &stats.suitableDataFoundRate) + LOG_ADD(LOG_UINT16, stCc, &stats.clockCorrectionRate) LOG_ADD(LOG_UINT16, stHit, &stats.contextHitRate) LOG_ADD(LOG_UINT16, stMiss, &stats.contextMissRate) -LOG_ADD(LOG_UINT16, stFound, &stats.suitableDataFound) - LOG_ADD(LOG_FLOAT, cc, &stats.clockCorrection) LOG_ADD(LOG_UINT16, tof, &stats.tof)