Coder Social home page Coder Social logo

imu_ekf's Introduction

IMU_EKF

This code repliactes the work presented in the paper "Double Stage Kalman Filter for IMU.pdf" or "A Double-Stage Kalman Filter for Orientation Tracking With an Integrated Processor in 9-D IMU" via a Matlab code.

The matlab code was then converted to C code using Matlab C Coder and then renamed to .cpp just to have it in cpp format.

It receives 9 parameters which must be initialized as follows (description given)

float P[16]; //Covariance Matrix 4x4

float quat[4]; //Quaternion Vector 4x1

float Cov_info[3]={0.00001,0.1,1}; //Noise Covariance Info 3x1 (q,r_acc,r_mag)

                        //(q=noise variance of quaternion (equal for all)
                        
                        //(r_acc=noise variance of accelerometer measurement)
                        
                        //(r_mag=noise variance of magnetometer measurement)

float omega[3]; //Gyroscpe Vector 3x1 (In radians!)

float accel[3]; //Accelerometer Vector 3x1 (It normalizes it, so doesn't matter)

float mag[3]; //Magnetometer Vector 3x1 (It normalizes it, so doesn't matter)

float dt=0.02; //Sampling time (To be measured outside. Can be just constant though...)

int ini=1; //Reset/Initialize Covariance/Quaternion.

                        //You must select 1 this at startup!!! Then 0..

int use_mag=1 //Decide whether to use mag or not. (1=Yes)

Once that is done you can call it as,

IMU_EKF(Pcov,quat,Q_info,R_info,gyro_rad,accel,mag,dt,ini,use_mag);

imu_ekf's People

Contributors

oscarjgv24 avatar

Watchers

James Cloos avatar Mike Sardonini avatar

Forkers

wuyou33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.