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

Zero (or small) angular velocity fix #42

Merged
merged 2 commits into from
Jul 12, 2017
Merged

Zero (or small) angular velocity fix #42

merged 2 commits into from
Jul 12, 2017

Conversation

camejia
Copy link
Contributor

@camejia camejia commented May 29, 2017

Fixes Issue #33.

In DIS_DeadReckoning concrete classes, use alternate calculations if the
magnitude of the angular velocity is less than MIN_ROTATION_RATE.
Add new test cases related to this zero angular velocity fix.
Remove associated comments about "linear motion does not seem to
work..."
Various typo fixes in comments.
Remove definition of float myPI; use Math.PI instead.
@leif81
Copy link
Member

leif81 commented Jul 10, 2017

Hi @camejia , i've delayed commenting on this because I'm not very familiar with the dead reckoning code in open-dis! It all looks reasonable to me, but I'm not an expert in DR.

@mcgredonps what do you think?

@camejia
Copy link
Contributor Author

camejia commented Jul 12, 2017

@leif81 thanks for your review. If you are curious about how the mathematical details... the IEEE Std writes the Dead Reckoning algorithm using integrals of matrix exponentials (wow), then (without any sort of derivation) shows how to evaluate this in a closed form without any integrals--it turns out that this closed form is exact, not an approximation. Fortunately, the Towers & Hines paper does go through the derivation. However, the closed form "blows up" for zero angular velocity. In this case, one can go back to the matrix exponential formulation, and replace the matrix exponential with the identity matrix in the case when the exponent is the zero matrix, and it is fairly easy to write a closed form for this special case. I hope that makes sense.

In general, I think the previous Dead Reckoning DIS_DR_* implementation should be deprecated in favor of the single DIS_DeadReckoning class I recently added. For example, the previous DIS_DR_* implementations have thread safety issues #41. But, for those who wish to continue using these older implementations, this pull request makes them more robust for small angular velocities.

Said differently, the old Dead Reckoning implementations (and the new one) could use some maturation, but I'm pretty confident that this is an improvement for the old Dead Reckoning implementations, and I even threw in some test cases.

@leif81
Copy link
Member

leif81 commented Jul 12, 2017

Thank you @camejia ! Appreciate the extra explanation. Your good grasp on DR is appreciated. I assume this won't be your last pull request in this area :)

@leif81 leif81 merged commit 83c8536 into open-dis:master Jul 12, 2017
@leif81 leif81 linked an issue May 6, 2022 that may be closed by this pull request
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.

Dead Reckoning algorithm RVB 08 linear motion fails
2 participants