Page 1 of 1

Absolute yaw, or stopping the yaw re-zeroing?

Posted: Mon Apr 01, 2019 1:23 pm
by al_cf_uom
Hi

When I look at the stabilizer.yaw via the logger it will provide a very accurate measurement, but then over several seconds to a minute will always re-zero the current 'yaw = 0' to wherever value it is currently facing.
For the purposes of my project I require this value to remain accurate even when the CF is stationary.

I have tried to get around this by using the magnometer values on a CF 2.0, the magnometer provides no readings on a CF 2.1 however (Using latest firmware). The magnometer solution is inelegant, and not nearly so precise as the stabilizer.yaw measurements taken from the internal Kalman filter.

Is there some method to disable the re-zeroing in firmware, or an alternative yaw measurement I could extract?
I think there will be some drift with no re-zeroing as from what I can gather the yaw measurement is taken from gyro integration, but this should not be a problem for our purposes.

Thanks

Re: Absolute yaw, or stopping the yaw re-zeroing?

Posted: Mon Apr 01, 2019 2:03 pm
by arnaud
Hi,

This is a 'functionality' of the kalman filter to ensure that the initial YAW is accurate. You can disable is by setting the ROLLPITCH_ZERO_REVERSION contant to 0 in the kalman filter: https://github.com/bitcraze/crazyflie-f ... man.c#L205.

The effect is that you need to start your Crazyflie or reset the kalman filter when the Crazyflie is flat and facing X. This is to ensure that the initial attitude is close enough to the current platform attitude.

Re: Absolute yaw, or stopping the yaw re-zeroing?

Posted: Fri Apr 05, 2019 7:48 pm
by al_cf_uom
This worked- thanks!

However I am still wondering why it is that we cannot get any magnometer data from the crazyflie 2.1?

Is this something that requires a simple firmware change, or is it a difference in the hardware?

Re: Absolute yaw, or stopping the yaw re-zeroing?

Posted: Wed Apr 10, 2019 7:38 am
by tobias
We did not include a magnetometer in CF2.1 as we could not make use of the data in the CF2.0. If magnetometer is needed this would have to be added to a deck, probably in combination with a GPS deck. How are you hoping to use the magnetometer? Indoors this is generally not improving things.