Okay, moving on. Deterministic attitude estimation, this is really about that at this instant of time, I've taken at least two observations. And for now we're just going to deal with two. By Tuesday, we're going to talk about what if I have n? What if I have four star trackers on there? If the sponsors paid for four star trackers and you're only using two, they get very pissed because they're like, why do we spend all this money, right? So there has to be techniques that we can blend multiple things, as well. And so this first one we'll do won't have that. And that's called the vector triad method. If you've taken 3200 with me you've probably seen this part already. We'll take it a little bit further, and then we'll get into all these newer methods. So the triad method was actually quite popular. There's all kinds of modifications of this one. There's an end vector triad method out there and other kind of stuff. But it's based on a really nice geometric principle and that means the triad frame. We have two coordinate frames. When have n and we have b. We have some inertial frame or some reference frame and then we have our body frame, and then we try to find the bn matrix essentially, right, that's it. But what we can do is instead of dealing with just two frames as often alive, instead of just going straight forward from here two observations I want my attitudes, sometimes it's easier to take a step back. And we're doing that here mathematically by introducing a third frame, by having this triad of frames, so we have three frames. And this third frame we can define easily in terms of the measured quantities or we can define easily in terms of the known, the n frame components of these quantities and then we use matrix multiplication to tie them all together, all right. So that's kind of in essence, that's the trick of the triad frame, we go to a third frame. So how was this frame defined? We're saying this triad frame, I'm using t's, I have b, and here I'm using i as the inertial frame, I'm introducing this new frame t, the third frame. So the first access, you pick one of your observations and immediately, I’m picking the s, there's a reason for that. We talked about the uncertainties of magnetic field and we talked about the uncertainties in the sun heading. So Shayla, which one is going to be more accurate, the m hat vector or the s hat vector? Your magnetic field knowledge or your sun heading knowledge? >> I'm thinking sun. >> Sun, yeah, no we know the sun heading's way more precise than magnetic field. Magnetic fields wobble and jiggle and it's like jello in space. You know it's kind of hard to track. But it's we know roughly where they are but it's still some significant uncertainties. So the trick with the triad is and you'll see in a second why whichever of the two you think is the better measurement, where did you spend more money on or where do you put your life on the line? What is the better measurement? That's going to be your first axis. because now we're using this s hat information completely. We're saying, okay, this is the sun heading. I'm going to make a new frame that's going to line up my first axis with the sun. Then I have magnetic field, so what I do is my second axis is orthogonal to the sun and orthogonal to the magnetic field. So in this case I had a sun heading, that's t1, magnetic field and it's a little bit hard to see in 3D but you do this one cross this one, gives you a plus t2, right? So we used the magnetic field to give me something orthogonal to the magnetic field and orthogonal to the sun. That's going to be the t2. Once we have 2, the third is trivial. t1 cross t2 has to give you t3. It's a right handed coordinate frame. If you do a left handed coordinate frame, I'm going to be really upset. Okay, so that's how we define it. Now you notice this definition doesn't specify s is given an m or n frame components. It just says it's a vector. The t1 vector is equal to this vector. So we can actually define these frames two different ways. Here's a quick 3D visualization if this helps, I'm not sure. But t1, magnetic was this one, yellow was there. So the sun was there, this crossed this. This one here would be be my t2 then. So that's the t1, t2 and then t3 is orthogonal. Rotating maybe helps but it's just 3D. Yes? >> And what do we do if s and m are colinear in this case? >> You are a trouble maker aren't you? No, absolutely. So, that's an important thing. If somebody tells me I'm in 3D tumbling in a gyroscope in this room, and Warda is to my right and you're to my right, both of you guys are exactly lined up with me, that doesn't help me. because there's still the infinity of orientations that I have. So, that's where these methods breakdown. There is no estimation technique that will take and colinear observations, I'll give you a full 3D attitude. You will only always get a 2D measure of the attitude. You will not know the rotation about the. Yeah, so that's a fundamental thing we have to make sure. So it's also an estimation. That's where rate gyros come in nice, because if you're doing magnetic field, it's possible the magnetic field at some point might line up with the sun at that instant and then it changes again. So you have to account for that in your code, yep. But for now, we are assuming then to non colinear observations. Yes, so that was something usually think people afterwards, but that's good. You're thinking ahead. So this matrix math, or this vector math we did earlier, I can do in matrix components by assigning coordinate frames. We measure s in the d frame, and we know s in the n frame. I know where I am, I know right now in the inertial frame, the sun was in that way. That's it, so I can go through this same matrix math in inertial components and in matrix components. And in defining the t1, 2, 3s in two different ways. And now if you go back and look at the basic DCM definitions, when we had the BN matrix, remember? The BN matrix, or the C matrix as we called it at the time, the first row was nothing but b1 transpose, right? It was something n1, something n2, something n3. That is b1 in n frame components. Or vice versa the first column was n1, n2, n3. So here we have bt, so it's like bn then I had n1, n2, n3. You did your homework on that on Homework 1. Here we need it but instead of n we have t, change letters that's it. So this is going to be t1 in b frame components, the second column is going to be t2 and the third column is t3, all in b frame components. For the nt matrix it's the same stuff. Now the t1s in the n frame components are going to be the first, second and third of this matrix. So, that's kind of the beauty of the triad method. You can now, from the measurement how we define this, we get the coordinate frame express in n, the t axis expressed at n and b frame components. So we could the estimate b relative to t and the inertial t. And the final step is attitude addition. Now I have three frames, right? I know how to go from n to b and b to f, I need n to f directly. That is nothing but matrix multiplication. So I'm looking for the attitude of n to my estimated body, right, that's what I'm trying to go after. And it's going to be nt transpose, because that flips the order and then tb. And that's it. So that's the triad method. And once I have this, you guys are now experts in giving me all our angles, MRPs, whatever you wish, right. You have formulas how you from a DCN and pull out whatever coordinates you need. But that's the triad method that we have. So you saw here, the order was important, because we went from, we used the sun heading information completely. We're setting up t1 to be this. The magnetic field we use to generate something, but we only use it with a cross product form. And there's an infinity of n vectors that will give you the same orthogonal t2, it just has to be kind of in the same plane. So we don't use all of the information of n, that's why it's critical with the triad method do the more accurate answer, make that your first axis. because then we're going to part we're essentially only using half of the information of the magnetic field sensor. We need it in a 3D form but we're only using half of it mathematically. So, it's nice, it's easy, it's quick. You get something but you need to as an engineer you're going, you know, I feel like leaving money on the table, right? I have extra information that I'm not actually using. There must be other ways that we can bind this and use everything. And it'll be the following methods we get into here, but that is this method. So any questions on the triad? Many of you maybe had seen this before. Hopefully every time you see it more and more will stick. Spencer? >> Most important part is that you take your most accurate and most reliable and most trusted instrument measurement. And that's what your first axis [INAUDIBLE]? >> Yes, because then you can use all of the information. Otherwise, you're throwing half of that one away and that's not a good strategy. Yes, absolutely. So for many missions, budget limited ones. You don't all that kind of stuff. This is very good and very simple and very fast, especially if you don't understand full column filtering and other kind of things. You could put this together, measure it very quickly, get some attitudes and make things work. This is actually flying on several different spacecraft for sure simple as it is. >> [INAUDIBLE] >> because it's in a cross product form here. So here s = t1 immediately. I'm locking one of the axis there. For the m, let's say m is just pointing towards the whiteboard for me, and the first one is just pointing forward, make it simple. That's one. It makes no difference if m is pointing here, here, here. As long as it's in this same plane there's an infinity of answers. So with this cross product stuff we're actually losing some information. We're not getting all of the end stuff that's there. >> I see, okay. >> All right, so that's where the mathematics, that's where we're losing something. But it's implied by being the second vector. That's why it's really important make a better vector up here. The second one is used to kind of. Locking that, I know I'm pointing this way. Now the question is how am I oriented and if I go in my righthand side its pointing at you, it kind of locks it in. But it does it as good as it can. Spencer? >> Seems kind of silly to use that kind of designation because in a quickly tumbling like spacecraft, your most reliable measurement could be constantly coming from different censor. So then. >> Why would they become a different censor? Lets say you have a magnetic field and a sun censor, why would tumbling impact that? >> If your sun censors pointing at 180 degrees away from the sun, then it. >> You get multiple sun censors. Yes? It's not the sun's sensors fault you pointing it in the wrong direction. In essence, spacecraft, especially with core sun sensor, I've seen little cube sacs with 18 sensors on there. My God, it's a wiring nightmare, getting all those things hooked up. And as research going in, can we do it with less and less sensors and have less ambiguities. But yeah, so if you do this as a sun sensor source, you'd have to have something else reliable that works no matter what. And so they would make sure you've got four pies to radian coverage with that sensor, absolutely, yeah. So, there's a lot of things implied that you need to have to make something like this work.