Absolute orientation with magnetometer

Firmware/software/electronics/mechanics
Post Reply
unario
Beginner
Posts: 8
Joined: Fri Jan 12, 2018 11:25 pm

Absolute orientation with magnetometer

Post by unario »

Hi, forum,

The quaternions from the Kalman estimator seem to give the orientation of the drone relative to the initial position of the drone when it was turned on, instead of absolute orientation with respect to a fixed frame of reference, say the earth. I notice that in the Kalman estimator code of the firmware, the fusion with magnetometer has not been implemented yet.

Are there any ways to get the absolute orientation? For example, any existing fusion implementations with the magnetometer data?

Thanks!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Absolute orientation with magnetometer

Post by arnaud »

Not that I know of. Though I would be very interested if someone in the community has made use of the magnetometer for absolute orientation estimation.

The few tries we have done with the magnetometer did not yield good results for absolute orientation purpose. Indoor there is usually too much interference from appliances and equipment to measure the magnetic north.
unario
Beginner
Posts: 8
Joined: Fri Jan 12, 2018 11:25 pm

Re: Absolute orientation with magnetometer

Post by unario »

Hi @arnaud,

I noticed that in another thread someone posted a method to calibrate the magnetometer (https://github.com/ak1394/crazyflie-mag ... alibration). In that thread, the thread said that he is using a Crazyflie 1.0. So I am not sure the method also applies to Crazyflie 2.0.

1. What is the magnetometer that is being used on Crazyflie 2.0? Is it AK8963 in MPU9250?

2. If the above link does not work on Crazyflie 2.0, do you have any other suggestions?

Thanks!
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Absolute orientation with magnetometer

Post by tobias »

We have not tried the calibration method so unfortunate I can't give much help however it feels like it should work on the CF2 as well. Question is how hard it is to port.

1. Yes this is correct, it is the AK8963

2. To get a magnetometer working well I think one needs to design a deck board with the magnetometer mounted away from the battery and electronics. Basically underneath the CF2. Calibration would most likely have to be done here as well so getting the calibration code working is maybe a good start.
Post Reply