Wednesday, September 30, 2015

Log 10

I’m feeling amazing today! Maybe is because I’ve just cracked FUEN1!

Yes, you read right, I’ve just cracked this fucking problem for good! You are probably asking yourselves “how?”, don’t you? I’m gonna tell you how, but first, let’s do a quick previously.

Previously, on “The Aurora Program”: I’ve got this problem that I’ve named FUEN1 (Fucked Up Error Number 1) that appeared during my tests with the guidance computer. I’ve made one algorithm to integrate the kinematics of the orientation quaternion (you remember this guy, don’t you?) in real time (which means my algorithm is processing data as soon as they are acquired from the gyro sensor) so that I can have the current orientation quaternion and, therefore, I can know where the sensor is pointing at. Anyway, I’ve proposed a test to validate my algorithm, which consists in rotate the sensor by 180ยบ around one of the main axis and the expected outcome was the real part of the orientation quaternion going from 1 to 0, while one (and only one) of the imaginary terms doing the opposite. That wasn’t happening.

Now that I reminded you of FUEN1, let me tell you guys how I solved it (“in your face FUEN1!”). Yesterday, when I went to bed, I’ve had this spark in my head: what if the problem is the speed of the calculations? In other words, what if my algorithm is calculating things so slowly that my integration process is accumulating a huge amount of error? (the longer it takes to perform the calculations, the bigger is the time step needed to perform the integration process, and the bigger this step is, more “wrong” is the answer calculated over time!) With this question in my mind, I had only one option: to implement the algorithm using C++ (the programming language), instead of python, and upload it directly in the micro-controller, instead of testing it, first, in a Raspberry Pi. So the main idea is to bypass this test step with the Raspberry Pi and go directly to the micro-controller that is going to be the guidance computer. You already know the outcome of this, it worked just fine! (That’s what I’m talking about!)

So now I’ve made a huge progress in the guidance computer. Not only did I cracked this fucking problem, but also I’ve already implemented the algorithm in the hardware that is going to be the guidance computer. Am I awesome or what?