Most of the time.
So, recently we’ve had a project involving x & z motion, using a few servo drives and some controllers.
The problem came up, that we needed to average 3 angles together, to find a proper location to move…
So, this introduces an excellent time for real math…
Lets take for example this:
Average the following Angles: 0,359,1. The expected answer is actually 0 . Not, 120.
Why? because we care about the Direction, Not the Amount of Rotation actually moved.
So… This is where you actually get to use those trig fuctions to turn everything into vectors…
(cos(359),sin(359)) = (0.999, -0.0175)
(cos(0),sin(0)) = (1, 0)
(cos(1),sin(1)) = (0.999, 0.0175)
Now if we add these vectors and divide by 3, we get
(V1+V2+V3)/3 = (2.998/3, 0) = (0.999, 0)
and then find the direction of the vector given.
tan^-1 of 0 = 0;
Therefore we have an Average of 0 Degree’s in vector direction.
The only problem is, when you have two completely opposing directions. Which for my implementation never happened, but it needed to be accounted for if things when haywire.
If have you a Direction of 180, and 0 then those cancel each other. and you have a null vector. This could create a problem for some implements, but just keep track of them, remove them from the average, before vectorizing, and then take the sample count down by 1.
So, there you have it, a use for trig finally on how to average Angles as a Direction.



better. I mean, i remember back in the day, I bought a 1.44mb floppy disk. It was large. I couldn’t really fit much on it, and well honestly… It sucked. Then the CD Burner. It revolutionized personal computing I believe. I mean, look, we don’t even have a floppy drive anymore (unless you need to boot a win98se install for the Fdisk shit…) But, honestly the CD is worthless too… kinda. They allowed us to do simple rewrites, appends and not closing the session. That was somewhat useful, but, never, in my life, did i ever delete the content of a CD-RW and then put completely new stuff on it.