Page tree
Skip to end of metadata
Go to start of metadata

Calculating the angles

So here we calculate our angles. Once again, just like in the acceleration chapter, we need to differ between the angles in the inertial frame and the body frame. For our output we need the body frame angles (angle velocities!), and for our distance calculations we need the inertial frame angles.

This is a very complex set of calculations as seen in Luukkonen. The gist of it is, that we calculate the derivation of the angular velocities (so....angular accelerations) with the help of the following calculation:

and integrate them, to get the new angular velocities. For that we need angular velocities at first (so they are set to 0 in the Integrator). Now we already have angular velocities that we can output to the Arduino. BUT for further intents and purposes we absolutely need the angles.

Calculating the angles

This is once again a conversion from body frame to the inertial frame. Just take it as given (or look it up in Hoeger), I won't explain this right now.

With that we have the angular velocities in the inertial frame. To get the angles, we only need to integrate the velocities. Since we only want values between 0° and 360° (or, as I luckily found out without actually trying, between -180° and 180°, which is much better), we divide the value modulo 360. Now we have happy little angles (in degree) which we convert to radians, to use them in Ptolemy.

 

Update: The same mistake with the same correction applies here as well. Look into acceleration to see further details. 

  • No labels