‫Welcome back.
‫So here you have the inertia frame and the body frame completely overlap with each other.
‫In the first case, we first rotate the body frame, but the x axis like this, and if you rotate it
‫by 90 degrees or power to radians, then this is what you will get, right?
‫The Z axis will turn here and then this Y axis will turn up.
‫Then you turn 90 degrees at about the Y axis like this and this is what you will get.
‫The Z axis remains where it is.
‫The Y axis goes from here on to the inertial X axis and the body frame x axis will go down, which will
‫be in the opposite direction to the inertia axis.
‫And then we rotate 90 degrees about the inertial Z axis.
‫And this is where you will end up your body from the axis comes here, then the body frame x axis stays
‫where it is, and then the body frame y axis comes here.
‫So this is how your body frame will end up with respect to the inertia frame when you go through this
‫rotation sequence.
‫Now, that's just one way of looking at it, a visual way.
‫The other way would be a vector matrix form, because remember, a rotation matrix is just a matrix
‫that takes the information in the body frame and represents it in the inertial frame.
‫And so this vector matrix form looks like this.
‫This is the inertia frame here.
‫And this is the initial body frame which you have here.
‫If you first rotate about the x axis, then it happens here, then you will have body frame like this.
‫If you then rotate about the y axis, then it happens here and you will end up in this configuration.
‫And finally, the rotation about the axis happens here.
‫You just multiply the R subsea matrix by the previous rotations and that's how you reach your final
‫orientation.
‫And of course, the Fifita angles are all power to radians here or 90 degrees.
‫Now, let's look at the second case where we first rotate about the Z axis by 90 degrees, and you will
‫end up in this configuration, your body from X goes here and then your body frame Y goes here and then
‫your body from Z axis remains in the same place.
‫Now you rotate about the Y axis like this and you will end up having this configuration here.
‫And finally, you rotate about the initial frame x axis and your final body frame configuration will
‫be this one here.
‫As you can see, the body frame ends up with a different attitude compared to the first case.
‫What does that mean?
‫It means that the order of rotation matters and you can also see it in the vector matrix form.
‫Again, this is the inertial frame vector and this is the body frame vector.
‫As you can see, you first rotate about the Z axis, then about the Y axis and only then about the X
‫axis.
‫And then you will reach your desired body frame orientation.
‫As you probably already know, in Matrix Multiplications, the order matters Matrix eight times Matrix
‫B is not guaranteed to be equal to Matrix B times Matrix A and therefore our.
‫Times are sub Y.
‫Times are sub X does not equal to our sub X.
‫Times are sub Y.
‫Times are subset.
‫And so this is a mathematical way to look at Y.
‫In these two cases, the body frames end up in different orientation.
‫So the point that I'm trying to make here is this.
‫If we go back to our original problem, where I asked you if you could determine that drone's position
‫and attitude, if X equals five metres, Y equals three metres and Z equals minus seven meters, and
‫then Phi C, Campsie R zero point two zero point zero point four radians respectively, then now you
‫see why the answer was no.
‫When it comes to determining the attitude, it is not enough to just say the values.
‫You can tell me the angles that you rotated your drawn about a certain axis.
‫But which axis did you rotate about first?
‫Did you first rotate about the x axis, then y axis, then the axis, or vice versa?
‫Or maybe you first rotated your drawn about y axis, then x axis and then the axis.
‫So the order really matters because if you take a different rotation order, then the attitude of the
‫drone with respect to the inertia frame is different.
‫In total, there are 12 conventions, 12 orders of rotation.
‫For example, a convention are sub Y.
‫The X means that you first rotate about the Y axis, then about the Z axis and then about the X axis
‫or are sub the Z.
‫It means that you first rotate about the Z axis, then about the X axis and then again about the Z axis.
‫So as you can see, you can skip rotating about one axis for as long as you make three consecutive rotations
‫in which the third rotation will be about the same axis, like the first rotation and the second rotation
‫is about another axis.
‫And so they are conventions, just like you have a convention to use a right hand rule or a left hand
‫rule, even though, in my opinion, no one uses the left hand rule.
‫But you could if you wanted to.
‫It doesn't make sense because no one really uses it.
‫But in theory, you could use the left hand rule as well.
‫So just like you have a right hand rule and the left hand rule, just like they are conventions, this
‫is also a convention.
‫So when I tell you the values for the angles, then I have to specify the convention.
‫For example, my drone is positioned at X, Y, Z, equal five, three and minus seven meters respectively.
‫With respect to the.
‫Initial frame and its attitude is PHY equals zero point two radians FT equals zero point three radians
‫BPCI equals zero point for radians using the right hand rule and using the convention are sub X, Y,
‫Z.
‫So I choose this convention here and then I should stick to this convention.
‫Once I choose a convention, I shouldn't change my convention because otherwise I will mess up my calculations.
‫It will make sense.
‫And if I choose this convention, then that means that I first rotate zero point two radians about the
‫X axis, then zero point three radians about the Y axis, and then zero point four radians about the
‫Z axis.
‫Only then we know what we are talking about and in vector matrix form it looks like this first X, then
‫Y and then Z.