﻿1
00:00:00,800 --> 00:00:04,070
‫Now, of course, we are missing one more angle.

2
00:00:04,460 --> 00:00:07,100
‫We're missing the reference Yongle.

3
00:00:07,760 --> 00:00:16,700
‫However, the reference your angle is not relevant to achieving the required position and therefore

4
00:00:17,300 --> 00:00:29,270
‫the reference your angle CI R is determined in the planner and then is sent to the NPC controller.

5
00:00:30,230 --> 00:00:30,890
‫Like this?

6
00:00:31,340 --> 00:00:33,520
‫This is your CI.

7
00:00:33,570 --> 00:00:39,710
‫Ah, it goes from the planner straight into the NPC controller box.

8
00:00:40,770 --> 00:00:48,810
‫And now you might ask yourself, how do we determine this, our how do we create this reference value

9
00:00:48,840 --> 00:00:49,500
‫array?

10
00:00:50,550 --> 00:00:57,300
‫Well, it depends on the objects, your orientation, and that's the convention that we're using here.

11
00:00:58,200 --> 00:01:09,840
‫If you start turning this way and then you can turn up until here, then that means that you'll be turning

12
00:01:09,840 --> 00:01:20,250
‫from zero radiance to two Pi radiance or equivalently 360 degrees.

13
00:01:21,180 --> 00:01:26,910
‫And so this is what we call a positive rotation because it goes counterclockwise.

14
00:01:27,780 --> 00:01:36,000
‫And then if you rotate in the other direction, if you start rotating like this and then you end up

15
00:01:36,000 --> 00:01:46,800
‫being here, then that means that you will rotate from zero radiance up until minus two pi radiance

16
00:01:47,700 --> 00:01:52,260
‫or equivalently minus 360 degrees.

17
00:01:53,280 --> 00:01:58,380
‫That's what we call negative rotation because you go clockwise.

18
00:01:59,460 --> 00:02:06,360
‫In addition, it is coded in such a way that you remember how many rotations you have made.

19
00:02:07,440 --> 00:02:12,060
‫So let's say that you have to fly in a spiral like this.

20
00:02:13,050 --> 00:02:17,130
‫And you end up doing two circles in terms of the upside angle.

21
00:02:17,610 --> 00:02:17,980
‫Right?

22
00:02:18,000 --> 00:02:19,380
‫You start from here.

23
00:02:20,400 --> 00:02:24,960
‫You have made one full circle here in terms of sy angle.

24
00:02:25,980 --> 00:02:33,450
‫So if you look at the spiral from the top, then you start here and then you will make an entire full

25
00:02:33,450 --> 00:02:38,040
‫circle here, just like you go from here up until here.

26
00:02:39,140 --> 00:02:43,070
‫And then you make another circle like this.

27
00:02:43,370 --> 00:02:52,610
‫So that would be when you go from here up until here, then C.R. would range like this.

28
00:02:53,750 --> 00:03:00,140
‫The first rotation would go from zero radiance up until two Pi radiance like this.

29
00:03:01,130 --> 00:03:10,250
‫And then the second rotation would go from two Pi radiance up until four Pi radians.

30
00:03:11,530 --> 00:03:23,680
‫So your air would, in fact range from zero up until four pi radians, and it would be the same thing

31
00:03:23,680 --> 00:03:25,180
‫for negative rotations.

32
00:03:26,330 --> 00:03:34,460
‫Then your air would range from minus four PI radiance until zero radiance.

33
00:03:35,390 --> 00:03:41,860
‫And the reason why it's done like that is to avoid big jumps in the reference values.

34
00:03:42,890 --> 00:03:45,050
‫Remember, you're dealing with a computer.

35
00:03:45,320 --> 00:03:47,240
‫Computers, they don't see circles.

36
00:03:47,630 --> 00:03:51,710
‫They just see an array of numbers.

37
00:03:52,820 --> 00:03:57,260
‫So if you're size up, our array is something like this.

38
00:03:57,440 --> 00:04:08,240
‫It starts from zero and then it's zero point two and then it's 0.4, et cetera, up until you reach

39
00:04:09,050 --> 00:04:10,610
‫two PI Arabians.

40
00:04:11,740 --> 00:04:20,470
‫And then if all of a sudden from two PI Arabians, you go again to zero point two radiance, that is

41
00:04:20,470 --> 00:04:29,230
‫a pretty big jump in comparison to other jumps here, and it might cause problems for the controller.

42
00:04:30,160 --> 00:04:41,890
‫Who knows, maybe it will make the drone not go from here to here in this matter, but maybe it will

43
00:04:41,890 --> 00:04:44,590
‫decide to go there like this.

44
00:04:45,310 --> 00:04:45,880
‫Who knows?

45
00:04:46,940 --> 00:04:53,540
‫So there's just one potential place where you might have problems, and it's better to avoid that.

46
00:04:54,710 --> 00:05:03,500
‫So instead of 0.2 radians, why not put here two pi plus zero point two radiance?

47
00:05:04,600 --> 00:05:09,100
‫And then you go up until four PI radiance.

48
00:05:10,240 --> 00:05:18,310
‫The reference data is smoother that way, which is good, because again, remember for your computer,

49
00:05:18,730 --> 00:05:20,180
‫these are not circles.

50
00:05:20,200 --> 00:05:24,250
‫These are just some kind of numbers in an array.

51
00:05:24,640 --> 00:05:32,020
‫And when your data, in other words, your trajectories smoother, then it's better.

52
00:05:32,950 --> 00:05:35,110
‫Another way to look at it is like this.

53
00:05:35,500 --> 00:05:41,470
‫Imagine that this is your CI are here and this is your time here.

54
00:05:42,370 --> 00:05:44,710
‫So this is your two pi radiance.

55
00:05:45,040 --> 00:05:50,200
‫And then here you have four pi radians right here.

56
00:05:51,450 --> 00:06:01,140
‫So you make a full circle from zero seconds up until this time here, and so you want your sign, our

57
00:06:01,140 --> 00:06:04,680
‫reference trajectory to go like this.

58
00:06:05,820 --> 00:06:07,980
‫That's when you have made one circle.

59
00:06:08,730 --> 00:06:16,380
‫And then when you start another circle, you want your reference trajectory go like this, which would

60
00:06:16,380 --> 00:06:17,430
‫be this case.

61
00:06:18,300 --> 00:06:25,650
‫But if you employ this case instead, then that means that all of a sudden your reference trajectory

62
00:06:26,130 --> 00:06:29,220
‫goes from here to here.

63
00:06:30,180 --> 00:06:39,510
‫And so when your drone is trying to chase this reference trajectory, then from here it will try to

64
00:06:39,510 --> 00:06:40,440
‫go here.

65
00:06:41,520 --> 00:06:50,700
‫And that's when, after one rotation, you might start going back in order to reach this point here.

66
00:06:51,510 --> 00:06:53,310
‫And so what you really want?

67
00:06:53,730 --> 00:06:56,040
‫You want this psi true.

68
00:06:56,550 --> 00:07:00,480
‫This troops high angle that belongs to the drone.

69
00:07:01,050 --> 00:07:05,700
‫You wanted to continue following this trajectory here.

70
00:07:06,600 --> 00:07:15,390
‫Then once you have made one rotation, when you have to go here, it will be logical that you will go

71
00:07:15,420 --> 00:07:16,290
‫like this.

72
00:07:17,340 --> 00:07:23,280
‫Because the computer will not assume that you have to go in the negative direction now.

73
00:07:24,320 --> 00:07:27,350
‫It will just normally follow the path.

74
00:07:28,400 --> 00:07:36,640
‫Of course, you as a human, you understand that there is no difference between two plus zero point

75
00:07:36,650 --> 00:07:41,690
‫two radiance or simply 0.2 radiance.

76
00:07:42,990 --> 00:07:45,450
‫Because by the end of the day, it's a circle.

77
00:07:45,870 --> 00:07:52,290
‫However, for a computer, you really have to make things clear with numbers.

78
00:07:53,400 --> 00:08:00,950
‫Of course, it's only relevant if you make multiple rotations in the trajectory, if your trajectory

79
00:08:00,960 --> 00:08:08,400
‫something else like some kind of wavy straight line, then it doesn't matter.

