﻿1
00:00:00,540 --> 00:00:10,350
‫But now, if you look at this red line here, then it's not tilting at all, so how can the U.S. go

2
00:00:10,350 --> 00:00:11,670
‫forward then?

3
00:00:12,510 --> 00:00:20,940
‫How can it go forward if the red beam is not tilting down to provide a horizontal component in the forward

4
00:00:20,940 --> 00:00:21,570
‫direction?

5
00:00:22,410 --> 00:00:31,210
‫Well, remember that we did not model the drag force for the UVs body itself in this simulation.

6
00:00:31,260 --> 00:00:38,160
‫There is no air resistance in the oves body from X, Y and Z direction.

7
00:00:38,940 --> 00:00:43,590
‫That's not the reality, of course, but in this simulation, it's like that.

8
00:00:44,610 --> 00:00:51,690
‫So essentially, the ovei receives one initial push in the forward direction and then it can just keep

9
00:00:51,690 --> 00:01:00,060
‫going in the forward direction without providing any additional force in this horizontal direction to

10
00:01:00,060 --> 00:01:03,100
‫have some kind of tilting of the red beam.

11
00:01:03,900 --> 00:01:07,100
‫We have to add some air resistance.

12
00:01:07,920 --> 00:01:10,910
‫Now, we didn't model the drag force itself.

13
00:01:10,920 --> 00:01:19,680
‫However, I could still add some random values to introduce the drag and see if the red beam starts

14
00:01:19,680 --> 00:01:25,500
‫tilting down in order to produce a horizontal thrust component.

15
00:01:25,890 --> 00:01:33,870
‫So when we talked about the centripetal acceleration, then this one here was your body frame y axis.

16
00:01:34,770 --> 00:01:37,810
‫But now we're talking about going forward.

17
00:01:38,040 --> 00:01:40,860
‫So this is your body frame x axis.

18
00:01:41,880 --> 00:01:50,730
‫The formulas for the drag are these ones F disp equals one 1/2.

19
00:01:51,640 --> 00:02:04,270
‫Then you times the air density row times you squared times a sub you, so that's for the body frame

20
00:02:04,270 --> 00:02:12,550
‫x axis, then this formula here with this sub V letter, that's for your body frame y axis.

21
00:02:13,530 --> 00:02:21,990
‫And then when you have this letter W here, then that's your body from Z axis, we're now trying to

22
00:02:21,990 --> 00:02:30,810
‫estimate the drag that the entirety of his body experiences this drag is not for the propeller's, this

23
00:02:30,810 --> 00:02:32,210
‫is for the UVs body.

24
00:02:33,240 --> 00:02:43,920
‫We will have three drak forces, F.T. Subcu, if these Sub V and F.T. Sub W, so if the wave travels

25
00:02:43,920 --> 00:02:51,960
‫in the body frame X direction, then it experiences this drag here F sub D sub you.

26
00:02:52,830 --> 00:02:59,330
‫If you go in the body frame y direction, then you experience this drag here.

27
00:02:59,370 --> 00:03:00,990
‫If somebody says V.

28
00:03:01,890 --> 00:03:11,640
‫And if you fly in the body, frame the direction, then that's what you experience of DFW, then this

29
00:03:11,640 --> 00:03:16,970
‫valuable see somebody that's your drag coefficient.

30
00:03:17,550 --> 00:03:25,860
‫It depends on the shape of the have a bigger C somebody means that your shape generates more air resistance.

31
00:03:26,340 --> 00:03:31,250
‫A smaller see, somebody means that your shape is more aerodynamic.

32
00:03:31,920 --> 00:03:34,050
‫You generate less air resistance.

33
00:03:34,710 --> 00:03:37,590
‫And so we have three C sub D here.

34
00:03:38,460 --> 00:03:46,440
‫So for example, if you're C, some DFW is bigger than the rest of the two.

35
00:03:47,490 --> 00:03:47,810
‫Right.

36
00:03:47,940 --> 00:04:00,640
‫If this is bigger than this and also bigger than this, then it means that the upper side of your drone.

37
00:04:01,650 --> 00:04:10,580
‫This one here, it generates more air resistance in terms of shape than the size of the other.

38
00:04:10,630 --> 00:04:13,790
‫You like this one here, then you roll.

39
00:04:13,800 --> 00:04:23,490
‫That's your air density roll equals one point two to five kilograms per cubic meter.

40
00:04:24,270 --> 00:04:34,440
‫And so your you variable, the variable and w variable, they are your translational velocities in the

41
00:04:34,440 --> 00:04:39,730
‫body frame, X, Y and Z direction, respectively.

42
00:04:40,590 --> 00:04:49,220
‫And finally, a sub you as a V and a sub W, they are the reverse cross-sectional areas.

43
00:04:50,230 --> 00:04:57,160
‫So a subcu and ASV, they would be something like this, it would be like your side, cross-sectional

44
00:04:57,160 --> 00:05:05,050
‫area and then a W would be something like this, it would be your top cross-sectional area.

45
00:05:05,800 --> 00:05:13,630
‫From the formulas, you see that the drag forces depend on the velocities squared in the respective

46
00:05:13,630 --> 00:05:17,620
‫direction, not velocity, but velocity squared.

47
00:05:18,490 --> 00:05:27,070
‫So you see that as your wave speeds up your drag in the opposite direction, but along the same dimension

48
00:05:27,580 --> 00:05:28,700
‫also goes up.

49
00:05:29,410 --> 00:05:38,350
‫So the faster you go in the body frame X direction, the greater your you velocity here because you

50
00:05:38,350 --> 00:05:41,050
‫is your velocity in the body from X direction.

51
00:05:41,830 --> 00:05:50,320
‫Now just to specify that in reality the drone doesn't really move in the body frame X direction, it

52
00:05:50,320 --> 00:05:52,240
‫moves, let's say, horizontally.

53
00:05:53,200 --> 00:06:01,570
‫Or maybe if the drone also goes a little bit up, then it moves in this direction in your body frame

54
00:06:01,930 --> 00:06:06,550
‫x axis would still be pointing in this direction.

55
00:06:07,570 --> 00:06:13,210
‫Then that means that your your velocity would actually be in this direction.

56
00:06:14,140 --> 00:06:23,020
‫So the faster you go in the body frame x axis, the bigger your U velocity is and the bigger your drag

57
00:06:23,020 --> 00:06:27,040
‫force in the body frame X direction is.

58
00:06:27,940 --> 00:06:30,610
‫And of course, that drag would be in the opposite direction.

59
00:06:30,620 --> 00:06:42,730
‫So the body frame x axis drag force would be in this direction aifs up the sub you I don't know the

60
00:06:42,730 --> 00:06:48,550
‫exact up D and then the area values for this drone.

61
00:06:48,970 --> 00:06:56,070
‫However, I will choose some random variables that kind of make sense to me just to introduce the drag.

62
00:06:56,890 --> 00:07:02,950
‫Remember, I'm not really trying to model the drag forces here in this course.

63
00:07:03,850 --> 00:07:13,180
‫I'm just trying to introduce some kind of drag force that depends on the drones velocities because a

64
00:07:13,180 --> 00:07:16,000
‫drag force does depend on drones velocities.

65
00:07:16,810 --> 00:07:25,660
‫And I want to introduce some kind of drag force here just to see if the red beam of the OV starts tilting

66
00:07:25,660 --> 00:07:26,320
‫forward.

67
00:07:27,040 --> 00:07:29,950
‫So the drag force part here, it's not about precision.

68
00:07:29,950 --> 00:07:32,770
‫I'm not trying to exactly model the drag force.

69
00:07:33,580 --> 00:07:37,180
‫I just want to introduce some air resistance in my model.

70
00:07:38,050 --> 00:07:47,170
‫And so my drag forces here, they will update every zero point one second because I will have new U,

71
00:07:47,560 --> 00:07:50,860
‫V and W velocities every loop.

72
00:07:51,670 --> 00:07:59,590
‫And so these are my drones states, base equations in the body frame that you thought v the W dot,

73
00:07:59,890 --> 00:08:01,990
‫dot, dot and our dot.

74
00:08:02,800 --> 00:08:08,170
‫These are these equations here you see in the code they're here.

75
00:08:08,950 --> 00:08:17,770
‫And so I just take these drag forces and I include them in my body frame, state based equations like

76
00:08:17,770 --> 00:08:28,480
‫this minus the drag force in the you direction, minus the drag force in the V direction and minus the

77
00:08:28,480 --> 00:08:31,300
‫drag force in the W direction.

78
00:08:32,200 --> 00:08:37,930
‫Those drag forces should decrease your you dot vw dot.

79
00:08:38,710 --> 00:08:45,160
‫Remember that you dot VW dot, they are your accelerations in those directions.

80
00:08:45,850 --> 00:08:50,890
‫And so they have to become smaller because after all, drag is air resistance.

81
00:08:51,190 --> 00:08:58,810
‫If you walk on the ground and all of a sudden the wind blows in your face, then your forward acceleration

82
00:08:58,810 --> 00:08:59,680
‫should go down.

83
00:09:00,460 --> 00:09:05,500
‫And that is why I put a minus here, here and here.

84
00:09:06,400 --> 00:09:11,650
‫And of course, I have to divide the drag forces by the oves mass.

85
00:09:11,650 --> 00:09:16,270
‫So here, then here and also here.

86
00:09:17,230 --> 00:09:20,650
‫And that's because I need to have an acceleration term here.

87
00:09:21,430 --> 00:09:26,890
‫I have to go from Newton's to meters per second squared.

88
00:09:27,760 --> 00:09:33,910
‫And if you remember then other forces here were also divided by the oves mass.

89
00:09:34,930 --> 00:09:45,070
‫And so I want to choose if I include the Drac forces in my simulation or not, so I have an if statement

90
00:09:45,070 --> 00:09:53,850
‫here and this if statement, it says this if drag's, which equals one, then these are your drak forces.

91
00:09:54,760 --> 00:09:57,420
‫You see, these are your drak forces here.

92
00:09:57,550 --> 00:10:01,800
‫The formulas here they are the same like here.

93
00:10:02,500 --> 00:10:09,790
‫But then if my drag's switch equals a zero, then make my drak forces zero.

94
00:10:10,510 --> 00:10:13,470
‫And then these terms here they become zero.

95
00:10:14,350 --> 00:10:22,300
‫And then if it's something else then you switch variable must be either zero or one in the unit function.

96
00:10:23,080 --> 00:10:32,560
‫And so if we go back to our init function, then you can assign a value for this Drac switch here.

97
00:10:33,280 --> 00:10:38,320
‫So if you put here zero, then there will be no drag force in your simulation.

98
00:10:38,920 --> 00:10:45,900
‫But if you put here one, then you will include some kind of air resistance in your simulation.

99
00:10:46,660 --> 00:10:55,060
‫And here you have the values for the Drac coefficients, their random values and the same thing here.

100
00:10:55,060 --> 00:11:00,400
‫These are your cross-sectional areas in the you, the N.W. direction.

101
00:11:01,270 --> 00:11:03,310
‫And again, these are not the real values.

102
00:11:03,490 --> 00:11:08,050
‫I simply put some values that felt logical to me.

103
00:11:08,980 --> 00:11:11,830
‫And then this is your air density here.

