-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Acceleration units are not consistent #455
Comments
I assume the slightly odd unit is used to make it possible to use an int16 instead of a float and thus reduce the number of bytes used from 6 to 2 per axis (hence the name Compressed). This code is contributed by @whoenig, maybe he can shed some more light over this? |
That is fine but then it should not be called mm / sec^2 as it is a different unit (mG) |
There is a pull request (#450) that was merged recently that probably is what you are looking for. |
Yes, I did not see this, consistent with my report, corrects the problem, thank you! Sorry for the superfluous discussion... |
NP :-) |
Closes #456 , Closes bitcraze#455
the state_t variable definition contains the followings:
which is consistent with the StateEstimate.ax, ay, az logs that show the acceleration presumably correctly in G units (max around 0.3-0.4, which is more or less consistent with the acc calculated from StateEstimate.vx,vy,vz logs)
However, the
stateCompressed
andsetpointCompressed
structs define acc values in mm/s/s:and it is calculated from state.acc with a multiplication of 1000, assuming that state.acc is in SI units (m/s/s) instead of G units. E.g.:
The text was updated successfully, but these errors were encountered: