Integrate Magnetometer with Kalman Estimator

Firmware/software/electronics/mechanics
Post Reply
thasu
Beginner
Posts: 14
Joined: Wed Oct 18, 2017 7:16 am

Integrate Magnetometer with Kalman Estimator

Post by thasu » Mon Jun 04, 2018 1:26 pm

After observing the log data of the magnetometer a considerable noise is noticed. When I rotate the CF and come back to the previous heading, it gives different headings in each time. Because of that I have following questions.

1) Does kalman estimator use the onboard magnetometer readings ?
2) Will it be helpful if we cover the magnetometer using a ferrite cover?

malintha
Beginner
Posts: 13
Joined: Thu Dec 07, 2017 4:58 pm

Re: Integrate Magnetometer with Kalman Estimator

Post by malintha » Mon Jun 04, 2018 4:21 pm

Hi thasu,

As far as I understand, currently the magnetometer doesn't play a part in the estimation [1]. If you want to simply find the yaw value, you can use the value from the state variable. It seems to be pretty good. (It doesn't have the sense of north, that'll produce the yaw relative to the initial position at the beginning of each session).

[1] https://github.com/bitcraze/crazyflie-f ... man.c#L386

thasu
Beginner
Posts: 14
Joined: Wed Oct 18, 2017 7:16 am

Re: Integrate Magnetometer with Kalman Estimator

Post by thasu » Wed Jun 06, 2018 1:25 pm

Does the algorithm use magnetometer readings if we pass values from an external magnetometer ?

arnaud
Bitcraze
Posts: 1650
Joined: Tue Feb 06, 2007 12:36 pm

Re: Integrate Magnetometer with Kalman Estimator

Post by arnaud » Mon Jun 11, 2018 2:26 pm

Unfortunatly the kalman filter does not currently implement support for a magnetometer: https://github.com/bitcraze/crazyflie-f ... #L381-L383.

Post Reply