‫Now, of course, we are missing one more angle.
‫We're missing the reference Yongle.
‫However, the reference your angle is not relevant to achieving the required position and therefore
‫the reference your angle CI R is determined in the planner and then is sent to the NPC controller.
‫Like this?
‫This is your CI.
‫Ah, it goes from the planner straight into the NPC controller box.
‫And now you might ask yourself, how do we determine this, our how do we create this reference value
‫array?
‫Well, it depends on the objects, your orientation, and that's the convention that we're using here.
‫If you start turning this way and then you can turn up until here, then that means that you'll be turning
‫from zero radiance to two Pi radiance or equivalently 360 degrees.
‫And so this is what we call a positive rotation because it goes counterclockwise.
‫And then if you rotate in the other direction, if you start rotating like this and then you end up
‫being here, then that means that you will rotate from zero radiance up until minus two pi radiance
‫or equivalently minus 360 degrees.
‫That's what we call negative rotation because you go clockwise.
‫In addition, it is coded in such a way that you remember how many rotations you have made.
‫So let's say that you have to fly in a spiral like this.
‫And you end up doing two circles in terms of the upside angle.
‫Right?
‫You start from here.
‫You have made one full circle here in terms of sy angle.
‫So if you look at the spiral from the top, then you start here and then you will make an entire full
‫circle here, just like you go from here up until here.
‫And then you make another circle like this.
‫So that would be when you go from here up until here, then C.R. would range like this.
‫The first rotation would go from zero radiance up until two Pi radiance like this.
‫And then the second rotation would go from two Pi radiance up until four Pi radians.
‫So your air would, in fact range from zero up until four pi radians, and it would be the same thing
‫for negative rotations.
‫Then your air would range from minus four PI radiance until zero radiance.
‫And the reason why it's done like that is to avoid big jumps in the reference values.
‫Remember, you're dealing with a computer.
‫Computers, they don't see circles.
‫They just see an array of numbers.
‫So if you're size up, our array is something like this.
‫It starts from zero and then it's zero point two and then it's 0.4, et cetera, up until you reach
‫two PI Arabians.
‫And then if all of a sudden from two PI Arabians, you go again to zero point two radiance, that is
‫a pretty big jump in comparison to other jumps here, and it might cause problems for the controller.
‫Who knows, maybe it will make the drone not go from here to here in this matter, but maybe it will
‫decide to go there like this.
‫Who knows?
‫So there's just one potential place where you might have problems, and it's better to avoid that.
‫So instead of 0.2 radians, why not put here two pi plus zero point two radiance?
‫And then you go up until four PI radiance.
‫The reference data is smoother that way, which is good, because again, remember for your computer,
‫these are not circles.
‫These are just some kind of numbers in an array.
‫And when your data, in other words, your trajectories smoother, then it's better.
‫Another way to look at it is like this.
‫Imagine that this is your CI are here and this is your time here.
‫So this is your two pi radiance.
‫And then here you have four pi radians right here.
‫So you make a full circle from zero seconds up until this time here, and so you want your sign, our
‫reference trajectory to go like this.
‫That's when you have made one circle.
‫And then when you start another circle, you want your reference trajectory go like this, which would
‫be this case.
‫But if you employ this case instead, then that means that all of a sudden your reference trajectory
‫goes from here to here.
‫And so when your drone is trying to chase this reference trajectory, then from here it will try to
‫go here.
‫And that's when, after one rotation, you might start going back in order to reach this point here.
‫And so what you really want?
‫You want this psi true.
‫This troops high angle that belongs to the drone.
‫You wanted to continue following this trajectory here.
‫Then once you have made one rotation, when you have to go here, it will be logical that you will go
‫like this.
‫Because the computer will not assume that you have to go in the negative direction now.
‫It will just normally follow the path.
‫Of course, you as a human, you understand that there is no difference between two plus zero point
‫two radiance or simply 0.2 radiance.
‫Because by the end of the day, it's a circle.
‫However, for a computer, you really have to make things clear with numbers.
‫Of course, it's only relevant if you make multiple rotations in the trajectory, if your trajectory
‫something else like some kind of wavy straight line, then it doesn't matter.