suzali

  • *
  • 41
Trim Yaw
« on: March 22, 2016, 05:48:59 pm »
I have set up a 450 helicopter with a standard CC3D (no revo).
Everything works fine. Excellent stabilisation. But:
Heli always (in Rate- and Attitude-Mode) turns slightly to the left.
Have to give a little RC yaw correction every few seconds.
How can I compensate this?


Re: Trim Yaw
« Reply #1 on: March 22, 2016, 08:33:14 pm »
Are you saying you've tried rate and attitude on the Yaw axis?  If so, attitude should not drift.  If it does, you may need to check the neutral value for the rudder/yaw channel on the input screen.  It may need to be adjusted just a couple of points or so.

Highspeed

Tokyo9

  • *
  • 1
Re: Trim Yaw
« Reply #2 on: January 17, 2020, 10:33:38 pm »
Are you saying you've tried rate and attitude on the Yaw axis?  If so, attitude should not drift.  If it does, you may need to check the neutral value for the rudder/yaw channel on the input screen.  It may need to be adjusted just a couple of points or so.

Highspeed

 want to know that can I get meaningful roll,pitch,yaw values via an IMU(accelerometer+gyroscope) and determine exactly in which position is my aircraft is. I think I mix the motions and attitudes. Suppose uav takes off from the runway and all the angles are taken as 0 now. With the following order, pitch 90 deg, roll 180 deg, pitch -90 deg. All these movements resulted in a -180 deg yaw?

Re: Trim Yaw
« Reply #3 on: January 18, 2020, 02:17:06 am »
Quote
With the following order, pitch 90 deg, roll 180 deg, pitch -90 deg. All these movements resulted in a -180 deg yaw?
Yes.

Beware that there is gyro drift that changes for instance with temperature change.  The drift is calculated and compensated for each time you power up a CC3D.  Also, the accels can help to bias/trim the roll and pitch gyros, but cannot help for the yaw gyro (unless you use a Revo class FC that has a magnetometer).  Yaw will drift very slightly.  A quick test of a warmed up CC3D had the yaw drifting about .5 degrees in 2 minutes.  This is best case.  CC3D uses a complementary filter for attitude estimation.  Vigorous maneuvering will cause much higher drift at least in part due to the complementary filter.

Attitude estimation works in all flight modes.  For instance, you can fly in Rate mode, but you still know the aircraft attitude.  You do not have to fly in Attitude mode for the attitude estimation to track your attitude.

As I recall roll and yaw are allowed to be +-180 degrees, but pitch is only allowed to be +-90 degrees.  Also note that the RPY representation becomes unstable close to straight up or down.  In particular when you pull the nose up higher and higher ... when you go past 90 degrees straight up, the roll and yaw suddenly flip 180 degrees, but in a way that makes sense.  Roll going from 0 to 180 just says it should now be considered inverted.  Yaw going from 0 to 180 just says that it should now be considered to be traveling south instead of north.  If pulling the nose up but tilted a little left or right (that is yaw when close to pointed straight up), the roll and yaw will flip more slowly as you rotate through your "almost straight up."

No matter the roll angle, the pitch angle is always the angle the nose is above the horizon.  If you are climbing 5 degrees, pitch will say +5.  If you are climbing inverted 5 degrees it will still say +5.  And roll or yaw attempting to go past 180 jump to -180.

As I recall the standard complementary filter has some singularities at straight up and straight down (i.e. roll and yaw are undefined).  Self leveling flight modes are the only ones affected by this, the other ones only use rate of change and never see the attitude "discontinuities".  Yaw is almost never run in Attitude mode.  If you design an algorithm using this RPY representation to allow an airplane to fly Attitude mode past 90 degrees of pitch, it will never get there.  Instead, when the nose is pointed straight up it will roll randomly.

Revo has a (noisy) magnetometer if long term absolute compass heading is important to you.  Revo can use an EKF with fixed gyro bias (doesn't recalculate gyro bias at each power up) for Attitude Estimation.