‫But now, if you look at this red line here, then it's not tilting at all, so how can the U.S. go
‫forward then?
‫How can it go forward if the red beam is not tilting down to provide a horizontal component in the forward
‫direction?
‫Well, remember that we did not model the drag force for the UVs body itself in this simulation.
‫There is no air resistance in the oves body from X, Y and Z direction.
‫That's not the reality, of course, but in this simulation, it's like that.
‫So essentially, the ovei receives one initial push in the forward direction and then it can just keep
‫going in the forward direction without providing any additional force in this horizontal direction to
‫have some kind of tilting of the red beam.
‫We have to add some air resistance.
‫Now, we didn't model the drag force itself.
‫However, I could still add some random values to introduce the drag and see if the red beam starts
‫tilting down in order to produce a horizontal thrust component.
‫So when we talked about the centripetal acceleration, then this one here was your body frame y axis.
‫But now we're talking about going forward.
‫So this is your body frame x axis.
‫The formulas for the drag are these ones F disp equals one 1/2.
‫Then you times the air density row times you squared times a sub you, so that's for the body frame
‫x axis, then this formula here with this sub V letter, that's for your body frame y axis.
‫And then when you have this letter W here, then that's your body from Z axis, we're now trying to
‫estimate the drag that the entirety of his body experiences this drag is not for the propeller's, this
‫is for the UVs body.
‫We will have three drak forces, F.T. Subcu, if these Sub V and F.T. Sub W, so if the wave travels
‫in the body frame X direction, then it experiences this drag here F sub D sub you.
‫If you go in the body frame y direction, then you experience this drag here.
‫If somebody says V.
‫And if you fly in the body, frame the direction, then that's what you experience of DFW, then this
‫valuable see somebody that's your drag coefficient.
‫It depends on the shape of the have a bigger C somebody means that your shape generates more air resistance.
‫A smaller see, somebody means that your shape is more aerodynamic.
‫You generate less air resistance.
‫And so we have three C sub D here.
‫So for example, if you're C, some DFW is bigger than the rest of the two.
‫Right.
‫If this is bigger than this and also bigger than this, then it means that the upper side of your drone.
‫This one here, it generates more air resistance in terms of shape than the size of the other.
‫You like this one here, then you roll.
‫That's your air density roll equals one point two to five kilograms per cubic meter.
‫And so your you variable, the variable and w variable, they are your translational velocities in the
‫body frame, X, Y and Z direction, respectively.
‫And finally, a sub you as a V and a sub W, they are the reverse cross-sectional areas.
‫So a subcu and ASV, they would be something like this, it would be like your side, cross-sectional
‫area and then a W would be something like this, it would be your top cross-sectional area.
‫From the formulas, you see that the drag forces depend on the velocities squared in the respective
‫direction, not velocity, but velocity squared.
‫So you see that as your wave speeds up your drag in the opposite direction, but along the same dimension
‫also goes up.
‫So the faster you go in the body frame X direction, the greater your you velocity here because you
‫is your velocity in the body from X direction.
‫Now just to specify that in reality the drone doesn't really move in the body frame X direction, it
‫moves, let's say, horizontally.
‫Or maybe if the drone also goes a little bit up, then it moves in this direction in your body frame
‫x axis would still be pointing in this direction.
‫Then that means that your your velocity would actually be in this direction.
‫So the faster you go in the body frame x axis, the bigger your U velocity is and the bigger your drag
‫force in the body frame X direction is.
‫And of course, that drag would be in the opposite direction.
‫So the body frame x axis drag force would be in this direction aifs up the sub you I don't know the
‫exact up D and then the area values for this drone.
‫However, I will choose some random variables that kind of make sense to me just to introduce the drag.
‫Remember, I'm not really trying to model the drag forces here in this course.
‫I'm just trying to introduce some kind of drag force that depends on the drones velocities because a
‫drag force does depend on drones velocities.
‫And I want to introduce some kind of drag force here just to see if the red beam of the OV starts tilting
‫forward.
‫So the drag force part here, it's not about precision.
‫I'm not trying to exactly model the drag force.
‫I just want to introduce some air resistance in my model.
‫And so my drag forces here, they will update every zero point one second because I will have new U,
‫V and W velocities every loop.
‫And so these are my drones states, base equations in the body frame that you thought v the W dot,
‫dot, dot and our dot.
‫These are these equations here you see in the code they're here.
‫And so I just take these drag forces and I include them in my body frame, state based equations like
‫this minus the drag force in the you direction, minus the drag force in the V direction and minus the
‫drag force in the W direction.
‫Those drag forces should decrease your you dot vw dot.
‫Remember that you dot VW dot, they are your accelerations in those directions.
‫And so they have to become smaller because after all, drag is air resistance.
‫If you walk on the ground and all of a sudden the wind blows in your face, then your forward acceleration
‫should go down.
‫And that is why I put a minus here, here and here.
‫And of course, I have to divide the drag forces by the oves mass.
‫So here, then here and also here.
‫And that's because I need to have an acceleration term here.
‫I have to go from Newton's to meters per second squared.
‫And if you remember then other forces here were also divided by the oves mass.
‫And so I want to choose if I include the Drac forces in my simulation or not, so I have an if statement
‫here and this if statement, it says this if drag's, which equals one, then these are your drak forces.
‫You see, these are your drak forces here.
‫The formulas here they are the same like here.
‫But then if my drag's switch equals a zero, then make my drak forces zero.
‫And then these terms here they become zero.
‫And then if it's something else then you switch variable must be either zero or one in the unit function.
‫And so if we go back to our init function, then you can assign a value for this Drac switch here.
‫So if you put here zero, then there will be no drag force in your simulation.
‫But if you put here one, then you will include some kind of air resistance in your simulation.
‫And here you have the values for the Drac coefficients, their random values and the same thing here.
‫These are your cross-sectional areas in the you, the N.W. direction.
‫And again, these are not the real values.
‫I simply put some values that felt logical to me.
‫And then this is your air density here.