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

sensors without FIFO #1

Closed
PaulStoffregen opened this issue Mar 25, 2016 · 1 comment
Closed

sensors without FIFO #1

PaulStoffregen opened this issue Mar 25, 2016 · 1 comment

Comments

@PaulStoffregen
Copy link

@PaulStoffregen PaulStoffregen commented Mar 25, 2016

availableGyroscope() should be required.

Sensors without a FIFO should have their available functions return 1 when the sensor has produced a new measurement since the most recent read, or 0 if no new measurement has been completed where reading again would give duplicate data.

Filter algorithms which accumulate need to be able to know whether the read is the same data they previously used, so they don't double count anything. This is always done with gyroscope data, so it's really important for the API to not allow a default 1 return for availableGyroscope(). Some advanced algorithms may also accumulate accelerometer data, but Madgwick does not. As far as I know, this isn't important for magnetometer data.

The sampleRateGyroscope() function should probably also be required, without a default. The data just isn't usable if this info is missing.

@PaulStoffregen
Copy link
Author

@PaulStoffregen PaulStoffregen commented Mar 25, 2016

For accelerometers and magnetometers, we should probably allow the defaults.

@cmaglie cmaglie closed this in 9be6359 Mar 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.