S
S
Sencis2020-04-11 18:29:29
Mathematics
Sencis, 2020-04-11 18:29:29

How to get the derivative of a quaternion?

Let's say there is an absolute orientation quaternion (input_1) that shows the current position of the rotation object. There is a second quaternion with a given object position (input_2). If an absolute orientation quaternion is multiplied by an inverted quaternion with a given position, you can get the difference of two quaternions (or it is easier to perform division). But if we divide this difference by dt, nothing happens and the difference remains the same:

Quaternion output;

Quaternion input_1;

 Quaternion input_2; 

 output =  input_1  * (input_1 / input_2) / dt;


A similar result in another version taken from Google:



dq/dt = 0.5 * omega * q

Approximate using the differential quotient:

(q2 - q1) / dt = 0.5 * omega * q1
omega = 2 * (q2 - q1) * conj( q1 ) / dt



Quaternion Omega = (input_1 - input_2).scale( 2.0 ) * input_1.conjugate()  /  dt;  // Замена (input_1 - input_2) на (input_1 / input_2) даёт более точный результат

output =  Omega.scale( 0.5 ) * input_1;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question