0:05

Moving on, the last thing we want to talk about.

Â There's lots of things we could discuss.

Â But given the time, this is a really elegant method that I saw.

Â Malcolm Shuster, in his paper on the survey of attitude parameterization

Â has this cool formula that he shows.

Â The geometric inside, and how you can do direct addition of Euler angles.

Â We've discussed add orientations.

Â The brute force never will fail, the way is simply to map everything to DCMs.

Â 0:34

Multiply the DCMs out correctly.

Â Transpose ones as needed.

Â Get your answer in the DCM.

Â And then you can pull out whatever coordinates you want.

Â This is particularly handy if you have mixed coordinates.

Â If you have some quaternions, adding Euler angles, and

Â the answer has to be in Rodriguez parameters.

Â DCMs, map it, come back.

Â So this is one method where if we have Euler angles of the same type.

Â So let's say we have 3-1-3.

Â They have to be symmetric.

Â 1:01

And if we have 3-1-3 angles, we can use a direct addition.

Â So, we don't have to map to a DCM.

Â Do two three by three multiplications.

Â And then extract from a three by three DCM where we only use

Â about half of the elements.

Â The right inverse tangents and science functions and so forth.

Â This is a way that we can get there directly.

Â And there's some interesting twists with this story as well that you will validate.

Â I'm showing you highlights here.

Â In the homework you will actually process and fully develop this yourself.

Â Doesn't take very long.

Â So the first step is we have to deal with spherical trigonometry, right?

Â So Euclidean geometry, if we're on a flat plane, a triangle.

Â All the inner angles have to add up to 180 degrees.

Â That's no longer true.

Â If you're on a sphere, just think of these triangles now wrapped around the Earth and

Â we forget J2.

Â It's just going to be a perfectly spherical Earth.

Â And you can hike in three straight lines and connect them to make a triangle.

Â But that triangle is curved, wrapped across the surface of that sphere.

Â That's what we're looking at.

Â So what happens here, then, is instead of distances.

Â We have these arc lengths.

Â That say, look, across the globe,

Â I went from 10-degree latitude up to 30 degree latitude.

Â I traveled 20 degrees.

Â You don't say you traveled this many kilometers, or miles,

Â or whatever units you prefer.

Â It's all in an angle form.

Â And then these parts are exactly the same.

Â Those are just the inner angles.

Â Locally, if you go on that plane, look at it.

Â And say, okay, that angle is about 85 degrees.

Â That's what you have.

Â 2:45

Just to review quickly if you have a classic flat triangle you can see

Â the notation.

Â a is the distance here.

Â c is a distance.

Â b is a distance.

Â Big ABC are the inner angles.

Â They really use the same notation.

Â And then this is the classic laws of sines and cosines.

Â In that triangle these ratios of opposite side over the sine of the inner angle and

Â the other end.

Â Have to be the same.

Â And this is what you can use.

Â If you know two, you can find the third, and so forth.

Â Laws of sines.

Â But we have little a's as distances.

Â And if you look at laws of cosines.

Â Very much the same.

Â That's where you have c squared is a squared plus b squared minus ab

Â cosign of the angle.

Â So, c squared is this square.

Â This square minus cosign of the angle opposite of c.

Â And that's how you get there.

Â But a, b, and c are distances.

Â If you have spherical trigonometry.

Â 3:39

Then these As, Bs, and Cs are angular.

Â Not actual meters in distances, but it's angles, degrees, and radius in distances.

Â That's it.

Â But it's the same ratios that are holding across.

Â So if you know how to use laws of sines and cosines for regular triangles.

Â You really know how to use it here.

Â The math is tweaked.

Â There's more sines and cosines in there.

Â That's all.

Â 4:14

Wait, I'm going to go here.

Â The next one.

Â So now I have a favorite symmetric set.

Â 3-1-3 is kind of our poster child of symmetric ones for our astrodynamics.

Â Because, of course, we love orbits and orbits uses 3-1-3s.

Â How can we combine this?

Â So if you're thinking about this, a 3-1-3 and we're adding a 3-1-3.

Â We're really doing a six rotation sequence.

Â 4:47

If we repeat a rotation.

Â If we have two rotations about the same axis, Andrew Before what did that mean?

Â We only had three angles and I would have 1-1-2.

Â I'm repeating about an axis, what happened then?

Â >> You just rotate about that twice and add the angles.

Â >> Yeah, what about if I try to invert the problem?

Â Now going from that final attitude back to angles.

Â >> Well you'd have an ambiguity variable?

Â >> Exactly we'd have ambiguity and so forth.

Â Her we won't be having ambiguities because we're actually using six angles.

Â So if you have six, you can say look.

Â We're not doing the inverse.

Â 5:25

Let me take that statement back.

Â We'll get to that in a moment.

Â So let's start looking here.

Â The first rotation is really in dark grey.

Â And I'm going to use the angles theta.

Â Just we run out of letters.

Â If I use gamma, theta, not the stuff, it gets very confusing.

Â So I just have the first rotation is theta one, theta two, theta three, that's it.

Â So I'm doing a 3.

Â Inclination is 1.

Â 3.

Â That gets me there.

Â Now I'm doing another 3-1-3.

Â And I'm calling the second set of angles small phi 1, 2, 3.

Â So you can see I went 3-1-3.

Â Now I'm rotating again about 3.

Â Doing again an inclination change.

Â And a final 3.

Â So that's that first rotation.

Â That's in the same plane as the last one of the prior one.

Â Led me to another plane change in orbit terms.

Â And they may go up to the final orientation.

Â And that will actually align with final frame.

Â So we have the n frame.

Â Then we have the b frame and then the f frame.

Â The f frame is the final one.

Â What we're really after is how do I go from n to f all in one.

Â And again, we can map to DCMs pull them out.

Â Do all that stuff.

Â That works.

Â But if you look at this figure carefully.

Â 6:50

I need to go from here with my first access.

Â We talked about the order.

Â It's very important.

Â This is the first one, then it goes here, then at the end, it has to be up here.

Â So I want to go from here all the way to here.

Â Using still a 3-1-3 rotation to get there.

Â Does somebody see how far?

Â So 3-1-3 we have to rotate first about this axis.

Â Does somebody see how far to rotate on that axis?

Â 7:19

Yeah you're nodding your head, do you want to give it a try?

Â >> [INAUDIBLE] >> What's the angular distance?

Â How far would you have to go?

Â >> [INAUDIBLE] >> Yeah, this is the script phi or

Â [INAUDIBLE] as you call it.

Â Yeah. I'm not sure.

Â I don't know Greek.

Â If I get my Greek letters wrong, it's just my ignorance.

Â I confess.

Â This one, [INAUDIBLE] I think is called [INAUDIBLE] who knows

Â how you pronounce that.

Â So we go this this far about the 3 axis.

Â 7:51

Then we have to do a 1 axis.

Â And now our 1 axis has moved from here to here.

Â This thin line is my new 1 axis.

Â Now you're going to do a one-axis rotation by this angle,

Â which I'm calling script phi 2.

Â And then once you've got this plane,

Â what you have to do is travel all this angular distance up to get here.

Â 8:14

Right, and that will get you the same place.

Â And you can always do this.

Â So if you have two sequences of symmetric angles, three-one-three, three-one-three,

Â you've got this outer triangle,

Â sometimes an inner one, depending on the signs of the angles.

Â There's always this triangle that appears which I've highlighted in the old bold

Â lines there.

Â That's the one you want to look for.

Â And now, we have to figure out what is this distance, in terms of the thetas and

Â the regular phis and the same thing with this angular distance and

Â this angular distance.

Â So we have to figure those things out.

Â That's it.

Â 8:49

We never have to go to the DCM.

Â So if I pull this triangle out, and I'm just drawing it separately,

Â you can see this inner angle Is just theta 2, right?

Â I've drawn that.

Â This angular distance, we know this part, that's theta 1,

Â this angular distance is what we just called script phi 1.

Â That's the one we're looking for.

Â So this distance is the difference between this and

Â this which is just script phi 1- theta 1.

Â So that's this side of it, all right?

Â Then you go on and say, okay, let's see, I need this angle.

Â That's one I have.

Â I know the total angle is 180.

Â So the complement of this angle is going to be pi 180 minus 52.

Â Right, then we've labeled that side.

Â 9:38

This one up here, we said when we go from this plane and we do

Â the last the second three-one-three, the inclination change, we have this angle.

Â So if that's phi 2, this is the one opposite.

Â That's the same.

Â So that angle would be phi 2.

Â This distance, we know this distance.

Â That was phi 3.

Â And so skip phi 3- phi 3 gives you this angular distance.

Â And then, finally, this one, that's where we're doing the three-one.

Â Now we're doing a three and a three rotation twice.

Â And that's what gives us the total arc length that we were talking about earlier.

Â And that's just going to be theta 3 + phi 1, all right?

Â So that's what you want to look for.

Â In the homework, you're doing this for a different set of angles,

Â not three-one-three, just something else.

Â But you're really following the same steps.

Â 10:31

That's why I'm trying to give you as many hints and tips as I can to do that.

Â Good, so if you have this now, now it's a matter of using laws of sines and

Â cosines, where we can say, well, we know all the theta quantities and

Â we know all the regular phi quantities.

Â How can I come up with ratios of sines or using laws and cosines to find this?

Â All right, and one example would be the law of cosine here.

Â I've got cosine of phi- script phi's a cosine of this angle drawn in red now.

Â It's going to be equal to basically cosine, was it minus cosine of theta 2 and

Â phi 2 to cosine of the other two inner angles, times

Â the sine of these two inner angles, times the cosine of the opposite arc length.

Â So this is kind of equivalence in the laws of cosine.

Â I don't memorize it either.

Â I just go look at the formulas and I go,

Â okay, this is the right terms that go in there.

Â But we know the thetas.

Â We know the phis.

Â So from this, I can get to an inverse cosine and

Â then solve for script phi 2 directly, right?

Â So we can get one of the three with this law of cosine.

Â [COUGH] And that we're doing an inverse cosine is good, right, the second angle.

Â Here's a way to find between 0 and 180.

Â An inverse cosine gives you exactly an angle between 0 and 180,

Â just the calculator does.

Â And it can result in the other multiple answers.

Â 11:55

And that's basically the answer.

Â Now if you want to find the other two,

Â we can use laws of sines or laws of cosines.

Â And I'll let you do the details in the homework.

Â There's no sense me kind of spoonfeeding every little piece to you here.

Â Do this on your own.

Â You'll quickly find these relationships and say,

Â okay, here I have all the thetas and phis.

Â I know script phi 2 already.

Â I've already solved for that.

Â And I could do an inverse sine and find it, or I know all this stuff.

Â And I can do the inverse cosine and find theta 1.

Â 12:32

Yes?

Â >> Are there any other advantages to this approach, just besides the inverse mapping

Â reduction and [INAUDIBLE], or is that the primary reason we would?

Â >> Primary reason is just computational speed.

Â You can do this very, very quickly.

Â 12:45

Yeah, it'll be less math involved in your computer CPU to run this.

Â So if you're really more speed sensitive, and you want to do it directly,

Â it gives you essentially an analytic answer.

Â I have a reasonably compact analytic answer that was here.

Â 13:00

This one.

Â That's it.

Â If you compare that at all to mapping angles to DCMs, carrying it all out,

Â doing this, then you have to reduce it.

Â It takes a lot of math to get there.

Â This is a very compact analytic answer than if you're doing analysis with it,

Â looking at sensitivities,

Â have to take partial derivatives, I can do it analytically very quickly,

Â versus having to use maybe computational numerical methods to get sensitivities.

Â >> Okay. >> No, great question.

Â Now here, back.

Â >> Either one works.

Â 13:29

Can you add any two symmetric sets, or does it have to be the same?

Â >> Has to be the same, because the trick to make all this

Â work is we have a repeated access that stitches them together.

Â I'm doing a three-one-three, three-one-three.

Â That three-three is repeated.

Â If you did a three-one-three and then a two, it doesn't work,

Â which is the main reason why with yaw, pitch, roll, a very popular set for

Â attitude dynamics, it's a three-two-one and then a three-two-one.

Â That three in one, they don't line up, then you don't get this nice.

Â 13:58

There's still analytic answers.

Â You could just run through all the matrix math and then pull out all the stuff.

Â It'll be long and ugly.

Â I don't have the nice spherical trigonometry interpretation of it.

Â I just go to the matrix then.

Â Yes, sir.

Â >> Back to the equation you showed for Cailey.

Â 14:13

>> This one? >> Yes, where did the pi go?

Â >> [INAUDIBLE] change.

Â >> Yeah, I think.

Â >> i minus theta is just cos theta, right?

Â >> Yes, cosine of 180 minus that is the same as cosine of that.

Â And then it goes, yes?

Â The trig is everywhere.

Â [LAUGH] Be aware of that.

Â On the exam sheets, typically I actually give you several trig formulas.

Â This is not a trigonometry class.

Â I expect you to use these things.

Â If you need laws of sines and cosines, I'm giving you that.

Â It's how do you use it.

Â Okay, good, well, so here now, we have two methods to get theta 1.

Â And subscript phi 1 and script phi 3, we can use basically an inverse sine,

Â or we could use the inverse cosine.

Â Which one would you prefer in this situation?

Â 15:27

>> No, think of ascending node, for example.

Â Do you only have ascending nodes 0 to 180,

Â or did your ascending node really travel all the way across the plane?

Â 15:39

>> What's the answer, how many quadrants?

Â >> Four.

Â >> Four, actually.

Â That's why earlier, when we extracted Euler angles from the DCMs for

Â the first and the third, we always look for an inverse tangent, right?

Â And you have to keep the right numerator, denominator.

Â Here, it's the same thing.

Â You could just add an inverse sine.

Â And you might get the right answer if you're lucky because it happens to give it

Â in the right quadrant.

Â But you just have to be lucky.

Â To make it robust, you need to have a sine and a cosine, cause then you can

Â do the ratio of these two and come up with an inverse tangent answer and

Â now you get the correct answer always, in the right quadrant.

Â So that's what we have down here.

Â 16:19

Basically, because I've used it to solve for

Â script v- 1, with an inverse sine,

Â script v -1 pretty most cosine and

Â then the ratio those attention and the fader one.

Â Which one goes where?

Â It's not consistent.

Â MathLab does one way, Mathmatica flips it.

Â I think that's a light Mathmatica, I forget, anyway, but that's the answer.

Â So now we have direct analytic, actually reasonably compact, considering we

Â have to take the angles, map the 3x3's, do all this math,and strap things out again.

Â Lots of reductions,

Â lots of triggered entities to get to this form with spherical trigonometry,

Â we can derive it directly, which is kind of cool and elegant.

Â 17:15

In this homework, you're not doing a three, one, three.

Â You're doing some other sequence, it turns out the math that I'm showing you,

Â 17:25

Is exactly the same regardless of the sequence.

Â If it's a two, one, two, or one, two, one, a three, two,

Â three, whatever it is, these sequences looks different.

Â 17:44

That's a big tip, because that basically means you know what the answer is.

Â The question is can you give me the path to that answer, right?

Â And draw it out.

Â You can use another tip looking at this kind of a things.

Â No matter what the sequence is, I've called this one two or three.

Â 17:58

You can relabel those things.

Â If I'm doing a one, two, one I'd have to rotate here, move around.

Â All of this stuff will all of a sudden shift over, and how can you draw that?

Â If this makes sense to you you can always pick your labels such that why not call

Â one, two and three like that.

Â 18:24

So that's as many tips as I'm going to give you on that one.

Â So you know the answer, which is kind of an elegant thing, regardless of this,

Â it's six sets.

Â Regardless of what the sequence is, as long as you're doing two, one, two, two,

Â one, two, this is the math.

Â So from a programming perspective, I can write one function,

Â give it three sets of angles, another three sets of angles.

Â And if they're symmetric to symmetrics, same type,

Â that function will return the right output.

Â You don't have to write one for two, one, twos and a different function for one,

Â two, ones.

Â It's the same function that actually acts on six sets of coordinates.

Â It does direct additions in a very compact way.

Â So that's kind of a cool, elegant result that we have.

Â How useful in every day life?

Â Well, who knows.

Â That's another question, but it is cool.

Â 19:06

Any questions on spherical trigonometry edition?

Â You're working through a problem in the homework.

Â You're basically duplicating a lot of this, but

Â you're filling in all the blanks.

Â Don't just gives us the steps as seen on the slide.

Â It takes a few steps in between to go okay, not many,

Â that you can show how it all works.

Â This should make sense to you.

Â It's a good skill to have, spherical trigonometry.

Â Works for any symmetric Euler angle sets,

Â you just have to add them of the same type.

Â Subtraction, is really the same process.

Â 19:38

You run through it, you come up with same angles, but what is given and

Â what you're seeking is different.

Â So let's say we have thetas and we have script freeze.

Â That basically means we know to go from n to b and we know how to go from n to f.

Â I want to have the relative attitude from B to F, and with DCMs,

Â we transpose one of them and multiply them out.

Â So it's the same triangle, just to use different formulas now,

Â because now all of a sudden, theta's a given and script phi's a given, and

Â you're looking for regular phis.

Â It's the same process, or vice versa if you have the second rotation and

Â the overall was the first one, now you have to treat the theta's as on this and

Â use the corresponding laws of sines and cosines and there you go.

Â So it's completely analogous, once you can do one I'm not showing

Â the sets to you that's what I expect you to do in your homework,

Â fill it out flash it in once you see the pattern you can be done in ten minutes.

Â Get this going but for some people thinking seeing that if you don't see it

Â in the beginning hopefully these tips will help guide you on the right path or chat

Â with each other, that's always a great way help each other understand this stuff.

Â