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

feat: data collection now averages data #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charliekush
Copy link
Contributor

No description provided.

@charliekush charliekush linked an issue Nov 29, 2024 that may be closed by this pull request
@ntlhui ntlhui self-requested a review November 30, 2024 03:54
Comment on lines +107 to +121
Ensemble10_data_t &ens10 = ensData.data.ens10;
Ensemble11_data_t &ens11 = ensData.data.ens11;
uint32_t &count = pData->accumulateCount;
ens10.rawTemp = N_TO_B_ENDIAN_2(temp / (0.0078125 * count));
ens10.rawAcceleration[0] = N_TO_B_ENDIAN_2(pData->acc[0] / count);
ens10.rawAcceleration[1] = N_TO_B_ENDIAN_2(pData->acc[1] / count);
ens10.rawAcceleration[2] = N_TO_B_ENDIAN_2(pData->acc[2] / count);
ens10.rawAngularVel[0] = N_TO_B_ENDIAN_2(pData->ang[0] / count);
ens10.rawAngularVel[1] = N_TO_B_ENDIAN_2(pData->ang[1] / count);
ens10.rawAngularVel[2] = N_TO_B_ENDIAN_2(pData->ang[2] / count);
ens10.rawMagField[0] = N_TO_B_ENDIAN_2(pData->mag[0] / count);
ens10.rawMagField[1] = N_TO_B_ENDIAN_2(pData->mag[1] / count);
ens10.rawMagField[2] = N_TO_B_ENDIAN_2(pData->mag[2] / count);
ens11.location[0] = N_TO_B_ENDIAN_4(pData->location[0] / count);
ens11.location[1] = N_TO_B_ENDIAN_4(pData->location[1] / count);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this hides too much the notion that ens10 and ens11 are overlapping memory regions. It probably is best to write this as originally.

We probably also want to delay this until the final count of the average, but that might be best done differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Data Collection Accumulation not implemented correctly
2 participants