Numerical integration RK4 for the given data
Afficher commentaires plus anciens
I have the angular veocity data shown below and wanted to apply
, where. 

w
Columns 1 through 9
5.0468 0.1049 -0.1582 -0.4549 -0.7088 -0.8615 -0.8758 -0.7409 -0.4740
3.2405 0.6230 0.6264 0.5425 0.3348 0.0279 -0.3276 -0.6692 -0.9351
-0.0000 -0.0049 -0.0119 -0.0229 -0.0369 -0.0526 -0.0687 -0.0837 -0.0962
Columns 10 through 18
-0.1169 0.2715 0.6264 0.8889 1.0163 0.9908 0.8218 0.5447 0.2142
-1.0766 -1.0664 -0.9047 -0.6183 -0.2562 0.1194 0.4448 0.6665 0.7518
-0.1053 -0.1100 -0.1100 -0.1053 -0.0962 -0.0837 -0.0687 -0.0526 -0.0369
Columns 19 through 22
-0.1062 -0.3561 -0.4855 5.7553
0.6957 0.5261 0.3291 1.6874
-0.0229 -0.0119 -0.0049 -0.0000
%The skew matrix is given by
W= [ 0,-w(1),-w(2),-w(3);
w(1), 0, omg(3),-w(2);
w(2),-w(3), 0, w(1);
w(3), w(2),-w(1), 0];
Apperciated !
6 commentaires
James Tursa
le 18 Août 2020
Modifié(e) : James Tursa
le 18 Août 2020
It is not clear to me what you are trying to do. Your qk equation above looks more like a quaternion derivative formula than an integrator. And your w data is rapidly changing so even if you were integrating this I'm not sure you would get meaningful results. I'm assuming that omg(3) is supposed to be w(3)? How does RK4 fit into this? Can you clarify?
HN
le 18 Août 2020
James Tursa
le 18 Août 2020
You could interpolate the w sampled data to give you w(t) for your integration. Or if you have finer sampled data you could assume constant rate between sample points for your w(t).
James Tursa
le 18 Août 2020
You stated that w is angular rate and you have that data. You have a formula for quaternion derivative as a function of angular rate w. Why can't you integrate that to give the quaternion as a function of time?
James Tursa
le 18 Août 2020
Modifié(e) : James Tursa
le 18 Août 2020
What are the units of your sampled w? Those numbers look way too large for rad/sec.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Quaternion Math dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!