﻿1
00:00:00,360 --> 00:00:01,170
‫Welcome back.

2
00:00:01,500 --> 00:00:06,960
‫So here you have the inertia frame and the body frame completely overlap with each other.

3
00:00:07,290 --> 00:00:17,340
‫In the first case, we first rotate the body frame, but the x axis like this, and if you rotate it

4
00:00:17,490 --> 00:00:23,520
‫by 90 degrees or power to radians, then this is what you will get, right?

5
00:00:23,760 --> 00:00:29,760
‫The Z axis will turn here and then this Y axis will turn up.

6
00:00:30,370 --> 00:00:36,870
‫Then you turn 90 degrees at about the Y axis like this and this is what you will get.

7
00:00:37,320 --> 00:00:39,570
‫The Z axis remains where it is.

8
00:00:39,930 --> 00:00:49,170
‫The Y axis goes from here on to the inertial X axis and the body frame x axis will go down, which will

9
00:00:49,170 --> 00:00:53,070
‫be in the opposite direction to the inertia axis.

10
00:00:53,550 --> 00:00:59,280
‫And then we rotate 90 degrees about the inertial Z axis.

11
00:00:59,850 --> 00:01:08,010
‫And this is where you will end up your body from the axis comes here, then the body frame x axis stays

12
00:01:08,010 --> 00:01:12,620
‫where it is, and then the body frame y axis comes here.

13
00:01:12,960 --> 00:01:20,460
‫So this is how your body frame will end up with respect to the inertia frame when you go through this

14
00:01:20,940 --> 00:01:22,680
‫rotation sequence.

15
00:01:23,070 --> 00:01:27,120
‫Now, that's just one way of looking at it, a visual way.

16
00:01:27,450 --> 00:01:34,560
‫The other way would be a vector matrix form, because remember, a rotation matrix is just a matrix

17
00:01:34,710 --> 00:01:40,760
‫that takes the information in the body frame and represents it in the inertial frame.

18
00:01:41,250 --> 00:01:46,200
‫And so this vector matrix form looks like this.

19
00:01:46,620 --> 00:01:48,270
‫This is the inertia frame here.

20
00:01:48,570 --> 00:01:52,080
‫And this is the initial body frame which you have here.

21
00:01:52,710 --> 00:02:01,080
‫If you first rotate about the x axis, then it happens here, then you will have body frame like this.

22
00:02:01,560 --> 00:02:09,170
‫If you then rotate about the y axis, then it happens here and you will end up in this configuration.

23
00:02:09,540 --> 00:02:14,940
‫And finally, the rotation about the axis happens here.

24
00:02:15,450 --> 00:02:24,780
‫You just multiply the R subsea matrix by the previous rotations and that's how you reach your final

25
00:02:24,780 --> 00:02:25,730
‫orientation.

26
00:02:26,220 --> 00:02:32,970
‫And of course, the Fifita angles are all power to radians here or 90 degrees.

27
00:02:34,250 --> 00:02:43,280
‫Now, let's look at the second case where we first rotate about the Z axis by 90 degrees, and you will

28
00:02:43,280 --> 00:02:51,800
‫end up in this configuration, your body from X goes here and then your body frame Y goes here and then

29
00:02:51,800 --> 00:02:54,830
‫your body from Z axis remains in the same place.

30
00:02:55,520 --> 00:03:04,450
‫Now you rotate about the Y axis like this and you will end up having this configuration here.

31
00:03:04,850 --> 00:03:11,540
‫And finally, you rotate about the initial frame x axis and your final body frame configuration will

32
00:03:11,540 --> 00:03:12,620
‫be this one here.

33
00:03:13,130 --> 00:03:19,060
‫As you can see, the body frame ends up with a different attitude compared to the first case.

34
00:03:19,340 --> 00:03:20,510
‫What does that mean?

35
00:03:20,960 --> 00:03:28,100
‫It means that the order of rotation matters and you can also see it in the vector matrix form.

36
00:03:28,490 --> 00:03:33,310
‫Again, this is the inertial frame vector and this is the body frame vector.

37
00:03:33,710 --> 00:03:44,720
‫As you can see, you first rotate about the Z axis, then about the Y axis and only then about the X

38
00:03:44,720 --> 00:03:45,290
‫axis.

39
00:03:45,860 --> 00:03:50,540
‫And then you will reach your desired body frame orientation.

40
00:03:50,870 --> 00:03:58,460
‫As you probably already know, in Matrix Multiplications, the order matters Matrix eight times Matrix

41
00:03:58,460 --> 00:04:06,710
‫B is not guaranteed to be equal to Matrix B times Matrix A and therefore our.

42
00:04:07,940 --> 00:04:11,330
‫Times are sub Y.

43
00:04:11,960 --> 00:04:18,410
‫Times are sub X does not equal to our sub X.

44
00:04:18,860 --> 00:04:21,200
‫Times are sub Y.

45
00:04:21,680 --> 00:04:23,600
‫Times are subset.

46
00:04:24,230 --> 00:04:27,980
‫And so this is a mathematical way to look at Y.

47
00:04:28,490 --> 00:04:34,130
‫In these two cases, the body frames end up in different orientation.

48
00:04:34,880 --> 00:04:38,390
‫So the point that I'm trying to make here is this.

49
00:04:38,720 --> 00:04:46,760
‫If we go back to our original problem, where I asked you if you could determine that drone's position

50
00:04:47,270 --> 00:04:54,710
‫and attitude, if X equals five metres, Y equals three metres and Z equals minus seven meters, and

51
00:04:54,710 --> 00:05:04,190
‫then Phi C, Campsie R zero point two zero point zero point four radians respectively, then now you

52
00:05:04,190 --> 00:05:06,490
‫see why the answer was no.

53
00:05:07,010 --> 00:05:13,610
‫When it comes to determining the attitude, it is not enough to just say the values.

54
00:05:14,030 --> 00:05:19,250
‫You can tell me the angles that you rotated your drawn about a certain axis.

55
00:05:19,670 --> 00:05:23,530
‫But which axis did you rotate about first?

56
00:05:23,990 --> 00:05:32,470
‫Did you first rotate about the x axis, then y axis, then the axis, or vice versa?

57
00:05:32,960 --> 00:05:41,990
‫Or maybe you first rotated your drawn about y axis, then x axis and then the axis.

58
00:05:42,470 --> 00:05:50,360
‫So the order really matters because if you take a different rotation order, then the attitude of the

59
00:05:50,360 --> 00:05:54,100
‫drone with respect to the inertia frame is different.

60
00:05:54,770 --> 00:06:00,410
‫In total, there are 12 conventions, 12 orders of rotation.

61
00:06:00,800 --> 00:06:04,760
‫For example, a convention are sub Y.

62
00:06:04,760 --> 00:06:13,070
‫The X means that you first rotate about the Y axis, then about the Z axis and then about the X axis

63
00:06:13,490 --> 00:06:17,020
‫or are sub the Z.

64
00:06:17,480 --> 00:06:26,430
‫It means that you first rotate about the Z axis, then about the X axis and then again about the Z axis.

65
00:06:26,840 --> 00:06:35,660
‫So as you can see, you can skip rotating about one axis for as long as you make three consecutive rotations

66
00:06:36,050 --> 00:06:43,820
‫in which the third rotation will be about the same axis, like the first rotation and the second rotation

67
00:06:43,820 --> 00:06:45,470
‫is about another axis.

68
00:06:45,830 --> 00:06:52,730
‫And so they are conventions, just like you have a convention to use a right hand rule or a left hand

69
00:06:52,730 --> 00:06:56,990
‫rule, even though, in my opinion, no one uses the left hand rule.

70
00:06:57,260 --> 00:06:59,210
‫But you could if you wanted to.

71
00:06:59,210 --> 00:07:02,420
‫It doesn't make sense because no one really uses it.

72
00:07:02,420 --> 00:07:05,810
‫But in theory, you could use the left hand rule as well.

73
00:07:06,230 --> 00:07:12,980
‫So just like you have a right hand rule and the left hand rule, just like they are conventions, this

74
00:07:12,980 --> 00:07:14,900
‫is also a convention.

75
00:07:15,440 --> 00:07:22,370
‫So when I tell you the values for the angles, then I have to specify the convention.

76
00:07:22,760 --> 00:07:31,820
‫For example, my drone is positioned at X, Y, Z, equal five, three and minus seven meters respectively.

77
00:07:32,390 --> 00:07:33,620
‫With respect to the.

78
00:07:33,700 --> 00:07:41,710
‫Initial frame and its attitude is PHY equals zero point two radians FT equals zero point three radians

79
00:07:41,930 --> 00:07:51,610
‫BPCI equals zero point for radians using the right hand rule and using the convention are sub X, Y,

80
00:07:51,610 --> 00:07:51,920
‫Z.

81
00:07:52,270 --> 00:07:58,000
‫So I choose this convention here and then I should stick to this convention.

82
00:07:58,330 --> 00:08:05,380
‫Once I choose a convention, I shouldn't change my convention because otherwise I will mess up my calculations.

83
00:08:05,710 --> 00:08:06,700
‫It will make sense.

84
00:08:07,210 --> 00:08:13,120
‫And if I choose this convention, then that means that I first rotate zero point two radians about the

85
00:08:13,120 --> 00:08:18,040
‫X axis, then zero point three radians about the Y axis, and then zero point four radians about the

86
00:08:18,040 --> 00:08:18,760
‫Z axis.

87
00:08:19,060 --> 00:08:27,850
‫Only then we know what we are talking about and in vector matrix form it looks like this first X, then

88
00:08:27,850 --> 00:08:29,050
‫Y and then Z.

