Josh Leverette's blog

Josh Leverette's picture

Documentation

Tonight I spent some time documenting and commenting things further, along with updating READMEs and the like. I believe the LSM9DS0 driver's simplicity is a key strength, and I hope others will find it and make use of it for projects, but even now I feel like the documentation on that isn't as complete as I would like it to be.

Josh Leverette's picture

Async testing

Tonight I did some testing to try and get a feel for how the asynchronous polling logic I implemented last night was working, and it appears to be working as expected, which is excellent.

Josh Leverette's picture

Asynchronous polling

I have started laying the groundwork for an asynchronous polling architecture for getting new values from the LSM9DS0, but realistically it might be good to switch this over to a full-on asynchronous interrupt system. Right now, I'm attempting to synchronize the timers to the data update cycle of each subsensor in the LSM9DS0, so, for example, it calls a function every 1600th of a second, and that function will then start polling the LSM9DS0 until a new accelerometer sample has been taken, which should be very soon after the polling starts and then it will return to idle again quickly.

Josh Leverette's picture

Work on acceleration code

I started writing the code that would be needed to start integrating acceleration into the absolute position. I still need to actually rotate the acceleration values into the inertial reference frame, but I'm working on the surrounding code for the moment.

Josh Leverette's picture

Continued writing state code

I continued working on the code to continuously update the quaternion representing orientation. Since none of the three sensors in the LSM9DS0 operate in lock step, I'm currently considering how best to architect this so that it updates total state accurately. I will probably have to do some interpolation, and I might look at setting up interrupts for each sensor so I can act on each piece of data in that way.

Josh Leverette's picture

Continued work

I have continued wrapping my brain around the math and concepts involved. Not much in the way of code progress today, and I'll be out of town all tomorrow so I don't expect to make much tangible progress then either.

Josh Leverette's picture

Computing initial orientation

Tonight I made forward progress on the embedded side of things, implementing most, if not all, of the code I will need to compute the initial orientation quaternion at device powerup.

Josh Leverette's picture

Quaternion Algorithms

Over the weekend, I came across an excellent, old article on quaternions that seems to hold the answer to most of my remaining questions in applying them to spatial rotations. I need to test my ideas, but I think I've got it figured out now. I expect to be able to start applying data in real time in situ on the microcontroller.

Josh Leverette's picture

Continued studying quaternions

This evening, I continued attempting to expand my limited knowledge of quaternions and to experiment with that knowledge in Mathematica, working against the data that I've logged from my nucleo.

Josh Leverette's picture

July 9th, 2015

Today was not a very productive day; I couldn't focus at all. Call it a personal day. I hope to be more focused tomorrow.

Syndicate content