‫Now, how about this variable here, both on the score and X on score, Y equals zero.
‫Well, this is your drone here, but how can you know which side is positive body frame, x axis and
‫which side is positive body frame, y axis?
‫Which one is which and which one is positive and which one is negative?
‫In this simulation, the body frame x axis is the red one and then the body frame y axis is the green
‫one.
‫But again, how do you know which one is positive and which one is negative?
‫So if I make this variable one here and then if I run the simulation, then you see that one side becomes
‫very long.
‫So now it's quite obvious which one is the positive side and which one is the negative side.
‫So the long red side is the positive x axis and then the long green side is the positive Y axis.
‫So you see the positive body frame y axis points to the center of the spiral and then the positive body
‫frame x axis points in the direction of the flight.
‫So this is just an extra feature for convenience.
‫Then this valuable sub underscore loop equals five, that's for animation purposes.
‫It's to make the animation smoother.
‫And now let's talk about this same underscore version variable, if I make this variable, too, then
‫the animation here looks like this.
‫Here you see the tracking of the X, Y and Z dimensions and also the tracking of the Phi Theta and PSI
‫Dimensions.
‫However, I also want to see how my control inputs you want you to use three and you four evolve in
‫time.
‫For that, I'm going to put here one, and so if I run it again, then you see that I have new shop
‫windows here and here you have the control inputs you have you want you to Q3 and Q4.
‫And by the way, I don't want my drone to be that long anymore.
‫So I'm going to make this variable zero POS underscore X or Y.
‫And so my drone looks normal now.
‫And so these are your control inputs here.
‫However, notice that you have two more sub windows here.
‫These two windows show you the orientation of the body frame, Exide, the red one and the orientation
‫of the body frame y side, the green one.
‫So this red one, this is like this red beam and then this green one.
‫This is like the green bean note that these are not actual beams, though, because these links, they
‫are not the lengths of the beams themselves.
‫So they are not the actual beams.
‫They are just here to show the orientation of the red beam and the green beam.
‫But the length of this line here is not equal to the length of this red beam.
‫And the length of this green line is not equal to the length of this green beam.
‫And so in the red case, the left side of the beam is the positive Exide.
‫That's the forward beam and then the Z dimension is up, and in the green case, it is reversed, the
‫positive Y is on the right side here.
‫So this one, this is your positive Y side.
‫This side points into the spiral and then the Z dimension is still up.
‫If you make this viable one again, then it will become apparent which side is which.
‫So you see this long red side here, there's this on the left side, so that's your positive body frame,
‫X-axis and then this one here, that's your positive body frame y axis.
‫So you see that it's here on the right side.
‫So I have to turn off the lone beam feature and so this red line here, it gives you a feeling about
‫the theater angle.
‫This red line here, that's your rotation about the body frame y axis and then the green line gives
‫you a feeling about the fire angle because that's rotation about the body frame x axis, since the fire
‫angles are very small here, in order to see some kind of movement in terms of orientation, you can
‫see that the horizontal and then the vertical axis, they are not up to scale.
‫If they were, it would be very hard to see the orientation here.
‫And so notice that the green one has its positive side down.
‫Why is it like that?
‫Well, you want your drone to go in circles, right?
‫So you need centripetal force for that.
‫And you get it by tilting the UVs body from positive y axis down.
‫So if you imagine that this is the side of your drone and so your thrust force is then in this direction
‫and in this direction here, because your drone is tilted, they can be decomposed like this.
‫This is the vertical component of this thrust force, and this one is the horizontal component of this
‫thrust force and the same thing here.
‫And so the horizontal component here, that's your centripetal force and that component forces your
‫drone to go in circles.