>> Now, we're going to do this example here. So, we've got a spacecraft flying out there. Actually, we don't use a spacecraft much. What we really care about in this particular example is here, the t frame. That's the topological frame and you can see, I've got an east access. I've got a north axis and an up axis. So if you look down on the up axis, you would see just like a regular map. You open up, I used to say, Rand McNally but who here has actually used a Rand McNally? Excellent. I don't feel that old. Thank you. I appreciate that. But now we have, you've got your maps on your smartphones and your tablets, but it's always typically shown by default, east to the right, north to the top. That's the kind of frame that we're set up here and the sequence, you can see, is east first, that's your x-axis as you would draw it. You always tend to make that the horizontal one, your first axis. The vertical is your second axis and then the third is the one out of the paper. So east, north and up. The inertial frame is to find that the classical or ECI, Earth-centered inertial. It's just means at the center of the Earth. You've got the n3 along the polar axis, n1 is defined toward vernal equinox. It's a celestial thing and that kind of locks in where n2 is going to be. The angle here that you have, how far has your local longitude rotated from vernal equinox is called the ligama? It varies with time. So obviously, as the Earth rotates, that longitude is going to slowly rotate around. One revolution per day, more or less and that's what you need and let's see. So we have gamma and the other angle we have is phi, that's basically your latitude from the equator, so that gets you over to the right longitude where you are right now. Here in boulder and then you have to go up some amount. 30 degrees, 40 degrees, 50, 60, depending on how high up you are on the globe. Two angles and I want to find the DCM that maps from N to T directly. So let's see, next to Russell. What was your name again? >> Brett. >> Brett. How many sequence of rotations do you think we're going to need to go from here all the way up to this T frame? >> There are three angles? >> Which three angles? >> I was just asking if there's was three. >> No, you need this one, that's gamma to go from vernal equinox to basically a line of nodes. That's where your longitude intersects the equator. >> It's just two. >> So, we need two angles. So you're saying with two rotation sequences, you can go from inertial to the T frame. So, the first rotation would be about which axis? You can do about N and three xs with your- >> So, you would rotate about n3. So your frame, you're rotating it over by the amount gamma. Good. And now about, now my one, two and three is lined up this way. Now, about which axis would you rotate to get to T? >> 2 by the latitude. >> And do you rotate in a positive or negative sense? >> Positive. No, negative >> Negative, you put your thumb on that direction. I curl my finger, it turns out going downwards on the equator would actually be a positive with the right hand rule. We're going up. So we're doing a 3, then a minus 2 rotation and that'll get you this frame. Everybody agree with that? >> Tony. >> Yeah, that would work. >> Andrew, you don't look as convinced. >> Aren't your vectors not the right way if you do that? Don't you need to do one more rotation at the top? >> One more? Let's look at it in detail. You're definitely on the right track. If we do this, remember, this is one, two, three. So my fingers, one, two, three. I am doing as with Brett. You did a tthree rotation, positive. That's good. Now you're doing a minus 2. Now my one is pointing in which direction, east, north or up? It's going to be up. My two direction is actually pointing in your east and my three direction is pointing in north. That's not how we defined our frame. We need the first axis to be the east. My first axis is pointing up, so I need additional rotations. How can we get the first axis to point east? >> Three by 90. >> Yeah, you do the three now. But if you just rotate the three axis, that means you're rotating about your current up direction, 90 degrees. Now, you're one axis point east, good. That means things are in sequence, but I have my two axis pointing into the planet and my three's pointing north, so I need one more. What do I rotate now? >> 1 by 90. >> At the 1 plus or minus 90 plus and that should give you east is first. North is second, up is third. So that sequence is very important, even in the current homework. There's one I'm giving you that's BL, BR and BC and I think we have BL as the first axis not BR. And the reason is because that one angle goes to zero, they're the same frame and then you don't have to flip your order over all of the sudden. So when you get in these transformations, it's very tempting to do exactly what Brett did and say, hey, that kind of lines up axis. I have this axis, they line up. But at the last step, always make sure the sequence is correct. Otherwise, you have to do at maximum two extra rotations. With two extra flips, you can get from any sequence to any other sequence at that point. Once you've lined up two axes, the third better lineup or somebody gave you a left-handed frame and a right-handed frame, then you know you're tricked. That would be a good prelim question. I should do that on a prelim oral. That would be so much fun. So, that's the secrets. So, how did we do this mathematically? Lets just talk through that. This is the answer. This is what we're looking for. And is in terms of two angles as we were talking earlier, that's your latitude, that's your locals at time. How far the Earth has rotated? So the Greenwich is typically a reference. Zero longitude is Greenwich, England or just for historical reasons. That is what we picked. And then relative to that, what's your longitude, east or west? That's what big lambda is, but these are all lambda is fixed and MNG varies for time. So just total angle, that's what we care about. You can look at this as a three rotation, but it's the sum of the angles that we really have to track and that's gamma. So, that's what we have there. We're doing a three rotation, positive you plug that into our unitary DCM. We're doing a single primary access rotation. These things ave very handy. We use them all over the place. That will map me from inertial, now to this intermediate frame and I'm not labeling it here. But if this gets confusing to you, these intermediate frames, I do recommend call it. Well, that's my e-frame, an e-frame. Give it a name. If you get comfortable with this, sometimes if all I needed is a stepping stone, I may not even label it. I'll just kind of do it implied, so either way. The second rotation as we're saying correctly has to be, we do the three, we do the two xs, but positive would actually be going into, below the equator, we need to go positive latitude to define above the equator. So we give it a minus rotation about the M2 and then you plug that in, cosine minus v's the same thing as cosine v. It's an even function and the you have sine of minus phi is the same thing as minus sin phi and that gives you all the right SIGNs that you need. The rest of it is these flippings and pretty much what we discussed, once we get there, the one axis was pointing up to make the one axis point east, we do that plus 30 degree rotation about our current three axis and then we had to do one more to get to up to point up and north to point north and that was the one rotation also plus ninety. And so we can see with 90, you get very simple looking matrices which is kind of nice, but you basically this allows you to rearrange this sequence, but we are doing it actually here to go inertial to to the top of rapid frame. We ended up having to do four sequential rotations to get to that even though it's only a two degree of freedom problem, but that ensures we have the right axis alignment and the ends the order. The ordering sometimes is stuff that needs extra steps and is often missed, that would give it to you. So you do this, this is the final answer. We did the three, the two, that gets us roughly with the axis kind of lined up, but they're not in the right order. And then we do two more rotations to kind of, those are typically always 90 or minus 90, depending on what you're doing to get the sequence correct. You finish up the matrix math you're done. This is to me, much easier than trying to do the geometric interpretation of this directly. There's always some students that feel like, man, I just gotta stare at it long enough. Get a glass of beer, glass of wine, tea, coffee, whatever you prefer. This is boulder, water, Fiji water. >> [LAUGH] >> Whatever works and stare at it. But man, that's tough. That's really, really tough. If you can look for the sequence to go easy from this frame to this frame to this frame to this frame no matter how complex the problem, you can always build sequences of rotations and you now are experts on how to add these rotations. Good. Any questions on this part? So, the moral here is check the sequence. Just because the axis line up, it doesn't mean the sequence of the axis is right and that's an important part.