e-tinkerer

A Place for my train of thought, mainly electronics, mcus and math

  • On filters and AHRS systems

    In this post we go thorough basics of attitude and heading reference systems (AHRS) and dicuss in detail the Madgwick’s algorithm (MA) which is an optimized solution for pose estimation. Note that the use of terms filter and algorithm become intertwined and their differences are left for the reader to decipher.

    Introduction

    In a recent project I was introduced to inertial measurement units (IMU) that eventually led to inspect AHRS in greater detail. An IMU integrated circuit often cosist of accelerometer and a gyroscope. Some ICs include a magnetometer. I will not go into the details of these sensor types here. For the curios I recommend a fantastic python library1 that describes the bigger picture very well.

    Read more…
  • A perspective on test-driven development

    In this post we’ll take a look at a development guideline called test-driven development. To give the discussion a pratical perspective we’ll look at an example in embedded C. Embedded applications are notoriosly challening to test and debug. Here we use TDD framework for a implementing a simple data buffer structure.


    In Theory

    The paradigm

    1. Add a test
    2. Run all the tests
    3. Write some code
    4. Run tests
    5. Refactor code
    6. Repeat

    Motivation

    At first impression test-driven development (TDD) seemed like an excessive display of discipline in programming. Following the “the paradigm” would only to slow down the development process with a promise for “code that behaves the way it was designed to behave”. Every developer is optimistic about their own work so creating “code that works” seems like a silly motivation. Of course our code works!

    Read more…
  • Cases of feature selection

    In this post I share a solution to one school submission on feature selection. Have a good day!


    Submission

    When we train our models with a determined number of features we increase the required computational resources needed to make a prediction. In some cases the features do not provide any meaningful data or the information is already given by another feature. We should discard these features whenever possible. There are multiple methods with which this can be done.

    Read more…