Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LH as ground truth for LH1 #1313

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions src/modules/src/lighthouse/lighthouse_position_est.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,12 @@ static void estimatePositionSweepsLh1(const pulseProcessor_t* appState, pulsePro
sweepInfo.calib = &bsCalib->sweep[0];
sweepInfo.sweepId = 0;

estimatorEnqueueSweepAngles(&sweepInfo);
STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
#ifndef CONFIG_DECK_LIGHTHOUSE_AS_GROUNDTRUTH
estimatorEnqueueSweepAngles(&sweepInfo);

STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
#endif
}

sweepInfo.measuredSweepAngle = measurement->angles[1];
Expand All @@ -315,10 +318,10 @@ static void estimatePositionSweepsLh1(const pulseProcessor_t* appState, pulsePro

#ifndef CONFIG_DECK_LIGHTHOUSE_AS_GROUNDTRUTH
estimatorEnqueueSweepAngles(&sweepInfo);
#endif

STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
#endif
}
}
}
Expand Down Expand Up @@ -347,9 +350,10 @@ static void estimatePositionSweepsLh2(const pulseProcessor_t* appState, pulsePro
sweepInfo.sweepId = 0;
#ifndef CONFIG_DECK_LIGHTHOUSE_AS_GROUNDTRUTH
estimatorEnqueueSweepAngles(&sweepInfo);

STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
#endif
STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
}

sweepInfo.measuredSweepAngle = measurement->angles[1];
Expand All @@ -359,9 +363,10 @@ static void estimatePositionSweepsLh2(const pulseProcessor_t* appState, pulsePro
sweepInfo.sweepId = 1;
#ifndef CONFIG_DECK_LIGHTHOUSE_AS_GROUNDTRUTH
estimatorEnqueueSweepAngles(&sweepInfo);

STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
#endif
STATS_CNT_RATE_EVENT(bsEstRates[baseStation]);
STATS_CNT_RATE_EVENT(&positionRate);
}
}
}
Expand Down