angular calculation issue ?

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Paulmann
Posts: 13
Joined: Thu Mar 21, 2013 11:54 pm

angular calculation issue ?

Post by Paulmann »

Hi,

I got my new HK_328 board and uploaded 2.2.
When I move the board around I can find some positions where MultiwiiConf instantly shows a flip of 90 Degrees.
Also the shown motor Outputs react (in angle mode).
Whenever Z-acc is very near zero (simulated extreme manoveure with quad hanging vertical in air) the angular calculation gives an output
as if quad would be in horizontal hovering.
Could someone check If gets the same result.

thx

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: angular calculation issue ?

Post by Sebbi »

That is called gimbal lock and is to be expected. Angles are calculated from a gravity vector and we'll have to live with this problem ... if you plan on doing 3D flying the angle stuff isn't relevant since you'll use gyro only anyways ;-)

Paulmann
Posts: 13
Joined: Thu Mar 21, 2013 11:54 pm

Re: angular calculation issue ?

Post by Paulmann »

Thanks Sebbi,

after I googled gimbal lock, I understand the problem in the following way:

when the Quad is vertical the angular calculation cant decide which path is the best to move back to horizontal position.
It could rotate the quad with any axis in x-y plane. All are equal-valued.

Then 2 new question arise:

could this happen too when Z-Acc is zero by a "ballistic trajectory " :lol: (free fall or after a fast climb up)
could the instant step irritate the PIDs and give a severe overreaction

User avatar
Watz
Posts: 4
Joined: Thu Oct 25, 2012 6:41 am

Re: angular calculation issue ?

Post by Watz »

... when I make a double flip,
my copter goes to one side and can't be controlled any more.
When I only make one flip I have no problem like that.

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: angular calculation issue ?

Post by Sebbi »

could this happen too when Z-Acc is zero by a "ballistic trajectory " (free fall or after a fast climb up)
could the instant step irritate the PIDs and give a severe overreaction


1) this is only a problem if you fly in angle/horizon mode where the copter can't be tilted by more than X degrees ... i don't know what happens if this situation happens though ... just fly in acro mode (gyro only) if you plan on doing acrobatics
2) pitch/roll is only corrected when the magnitude of the accerlation is in a certain area (around 1 G). Otherwise it's just angular rate that determines the angles, so fast climbs or free fall wont use the accelerometer.
3) overreaction? see 1) i don't know what happenes ... has somebody flipped their copter in horizon mode and did it recover by itself then? ;-)

User avatar
Hamburger
Posts: 2559
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: angular calculation issue ?

Post by Hamburger »

Sebbi wrote:3) overreaction? see 1) i don't know what happenes ... has somebody flipped their copter in horizon mode and did it recover by itself then? ;-)

I have successfully used horizon mode via a tx switch to rescue my MWii helicopter when it was upside down in acro mode and I had gotten scared.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: angular calculation issue ?

Post by felixrising »

Is this the same issue I'm seeing? If I roll the quad left or right, as it transitions from 89 to 90 degrees (Roll CW) or -89 to -90 degrees (roll CCW) it momentarily shows a value of -90 degrees from either 90 for roll CW (ie 0 degrees) and -90 for roll CCW (ie -180 degrees) respectively. I don't see how this is Gimbal lock as it's only on a single axis and occurs at both 90 and -90 degree transition.

Post Reply