﻿1
00:00:00,690 --> 00:00:07,220
‫Now, how about this variable here, both on the score and X on score, Y equals zero.

2
00:00:08,230 --> 00:00:20,080
‫Well, this is your drone here, but how can you know which side is positive body frame, x axis and

3
00:00:20,080 --> 00:00:23,330
‫which side is positive body frame, y axis?

4
00:00:24,190 --> 00:00:28,470
‫Which one is which and which one is positive and which one is negative?

5
00:00:29,380 --> 00:00:39,190
‫In this simulation, the body frame x axis is the red one and then the body frame y axis is the green

6
00:00:39,190 --> 00:00:39,490
‫one.

7
00:00:40,060 --> 00:00:45,460
‫But again, how do you know which one is positive and which one is negative?

8
00:00:46,390 --> 00:00:57,190
‫So if I make this variable one here and then if I run the simulation, then you see that one side becomes

9
00:00:57,190 --> 00:00:58,180
‫very long.

10
00:00:59,110 --> 00:01:04,310
‫So now it's quite obvious which one is the positive side and which one is the negative side.

11
00:01:05,140 --> 00:01:14,350
‫So the long red side is the positive x axis and then the long green side is the positive Y axis.

12
00:01:15,340 --> 00:01:24,100
‫So you see the positive body frame y axis points to the center of the spiral and then the positive body

13
00:01:24,100 --> 00:01:29,240
‫frame x axis points in the direction of the flight.

14
00:01:30,160 --> 00:01:33,670
‫So this is just an extra feature for convenience.

15
00:01:34,740 --> 00:01:40,380
‫Then this valuable sub underscore loop equals five, that's for animation purposes.

16
00:01:41,380 --> 00:01:44,080
‫It's to make the animation smoother.

17
00:01:45,380 --> 00:01:55,130
‫And now let's talk about this same underscore version variable, if I make this variable, too, then

18
00:01:55,130 --> 00:01:57,730
‫the animation here looks like this.

19
00:01:58,580 --> 00:02:08,510
‫Here you see the tracking of the X, Y and Z dimensions and also the tracking of the Phi Theta and PSI

20
00:02:08,520 --> 00:02:09,320
‫Dimensions.

21
00:02:10,160 --> 00:02:17,000
‫However, I also want to see how my control inputs you want you to use three and you four evolve in

22
00:02:17,000 --> 00:02:17,540
‫time.

23
00:02:18,600 --> 00:02:27,230
‫For that, I'm going to put here one, and so if I run it again, then you see that I have new shop

24
00:02:27,270 --> 00:02:35,390
‫windows here and here you have the control inputs you have you want you to Q3 and Q4.

25
00:02:36,120 --> 00:02:39,240
‫And by the way, I don't want my drone to be that long anymore.

26
00:02:39,240 --> 00:02:43,920
‫So I'm going to make this variable zero POS underscore X or Y.

27
00:02:44,700 --> 00:02:47,030
‫And so my drone looks normal now.

28
00:02:47,820 --> 00:02:50,260
‫And so these are your control inputs here.

29
00:02:50,460 --> 00:02:54,870
‫However, notice that you have two more sub windows here.

30
00:02:55,710 --> 00:03:06,330
‫These two windows show you the orientation of the body frame, Exide, the red one and the orientation

31
00:03:06,330 --> 00:03:10,000
‫of the body frame y side, the green one.

32
00:03:10,830 --> 00:03:15,960
‫So this red one, this is like this red beam and then this green one.

33
00:03:15,960 --> 00:03:23,730
‫This is like the green bean note that these are not actual beams, though, because these links, they

34
00:03:23,730 --> 00:03:26,420
‫are not the lengths of the beams themselves.

35
00:03:27,150 --> 00:03:29,460
‫So they are not the actual beams.

36
00:03:29,880 --> 00:03:36,330
‫They are just here to show the orientation of the red beam and the green beam.

37
00:03:37,080 --> 00:03:42,390
‫But the length of this line here is not equal to the length of this red beam.

38
00:03:43,260 --> 00:03:48,690
‫And the length of this green line is not equal to the length of this green beam.

39
00:03:49,530 --> 00:03:57,390
‫And so in the red case, the left side of the beam is the positive Exide.

40
00:03:58,300 --> 00:04:06,610
‫That's the forward beam and then the Z dimension is up, and in the green case, it is reversed, the

41
00:04:06,610 --> 00:04:10,520
‫positive Y is on the right side here.

42
00:04:10,540 --> 00:04:13,270
‫So this one, this is your positive Y side.

43
00:04:14,230 --> 00:04:19,950
‫This side points into the spiral and then the Z dimension is still up.

44
00:04:20,920 --> 00:04:28,180
‫If you make this viable one again, then it will become apparent which side is which.

45
00:04:29,150 --> 00:04:37,790
‫So you see this long red side here, there's this on the left side, so that's your positive body frame,

46
00:04:37,790 --> 00:04:45,310
‫X-axis and then this one here, that's your positive body frame y axis.

47
00:04:45,320 --> 00:04:48,500
‫So you see that it's here on the right side.

48
00:04:49,680 --> 00:05:00,690
‫So I have to turn off the lone beam feature and so this red line here, it gives you a feeling about

49
00:05:00,690 --> 00:05:01,910
‫the theater angle.

50
00:05:03,000 --> 00:05:11,520
‫This red line here, that's your rotation about the body frame y axis and then the green line gives

51
00:05:11,520 --> 00:05:20,790
‫you a feeling about the fire angle because that's rotation about the body frame x axis, since the fire

52
00:05:21,220 --> 00:05:29,100
‫angles are very small here, in order to see some kind of movement in terms of orientation, you can

53
00:05:29,100 --> 00:05:35,460
‫see that the horizontal and then the vertical axis, they are not up to scale.

54
00:05:36,150 --> 00:05:39,790
‫If they were, it would be very hard to see the orientation here.

55
00:05:40,740 --> 00:05:47,120
‫And so notice that the green one has its positive side down.

56
00:05:47,550 --> 00:05:48,930
‫Why is it like that?

57
00:05:49,650 --> 00:05:53,080
‫Well, you want your drone to go in circles, right?

58
00:05:53,880 --> 00:05:56,190
‫So you need centripetal force for that.

59
00:05:57,140 --> 00:06:03,230
‫And you get it by tilting the UVs body from positive y axis down.

60
00:06:04,320 --> 00:06:12,390
‫So if you imagine that this is the side of your drone and so your thrust force is then in this direction

61
00:06:13,230 --> 00:06:19,290
‫and in this direction here, because your drone is tilted, they can be decomposed like this.

62
00:06:20,260 --> 00:06:27,370
‫This is the vertical component of this thrust force, and this one is the horizontal component of this

63
00:06:27,370 --> 00:06:30,450
‫thrust force and the same thing here.

64
00:06:31,330 --> 00:06:39,670
‫And so the horizontal component here, that's your centripetal force and that component forces your

65
00:06:39,670 --> 00:06:41,350
‫drone to go in circles.

