how to insert numerical derivative in function for ode integration
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alessandro Vitiello
el 12 de Ag. de 2020
Comentada: Alessandro Vitiello
el 14 de Ag. de 2020
Hi all,
I computed the traslation dinamics of a re-entry trajecotry.
Now I am adding the attitude , but I have this problem :
from the quaternions (that I compute after found the traslation dynamics) I have to compute the derivative of quaternion, that I will use in the equation of attitude that I will write in the same function ("equation_moto").
In order to find derivate of quaternion, I am using fnite difference, but as far I understood I needed of 2 values in order to compute the "difference", but in ode integration at each step I comput only 1 ( istant value).
I implemented this part, in function "equation_moto", at lines 272-274
%% derivative quaternion
% dq0_c2 = q0_c - q0_c() / t -
dq0_c = diff(c)/diff(t);
dq1_c = diff(q1_c)/diff(t);
dq2_c = diff(q2_c)/diff(t);
dq3_c = diff(q3_c)/diff(t);
Putting a debug point I see that the dq(i) values are empty.
I need to compute the derivatives of quaternions, I found quaternions in the line 260-263.
Once that I have all the parameters I can write the equations in order to integrate also the error different in attitude and angular velocity
someone can help me ?,
many thank for your time and help
kind regards
4 comentarios
James Tursa
el 13 de Ag. de 2020
So, if you already have the attitudes because you have a list of time tagged quaternions, why are you trying to integrate the quaternion derivatives to come up with what you already have? If you did it exactly, won't this just reproduce your time tagged quaternion list? Can't you just interpolate your quaternions to get them at a different time? I am still not following your problem.
Do you need the body rate information for some reason?
Respuestas (0)
Ver también
Categorías
Más información sobre Quaternion Math en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!