Copter suddenly started circling badly during flight

First fix the issues that @Yuri_Rage identified.
Second make sure your current (Ampere) monitoring is correct and accurate.
Then do a second magFit flight to be on the safe side.

Yes, 20 is a good value.

1 Like

hey @amilcarlucas

I don’t see anything which he identified. GPS for yaw configuration is correct and GPS_MB1 & GPS_POS1 are properly set as I explained above, I am waiting for his response or nod on my configuration.

How can I check that?, I have setup the mauch sensor as per instructions so I guess it is reading the correct current & voltage readings.

Thanks! got it. I will do one flight and then perform the magfit calibration.

All I can tell you is what I see in the logs. As an experiment, you might try providing orientation on the X axis. If that works, then it may be possible we have a bug.

EDIT: I was incorrect. There is no bug or issue with this configuration. See follow on discussion.

2 Likes

Hey @Yuri_Rage thanks again for the response.

Okay! I will try to do some 3D print for keeping the GPS on X axis and will update you the results.

But here is the screenshot of the latest flight:


You can see how the GPS heading is fluctuating drastically during the flight. But interesting thing is it still maintain the heading even though I kept GPS as yaw source. How does this work?

Okay! bug with the orientation? I guess keeping the GPS on Y-axis is very common configuration, even wiki post example is Y-axis configuration setup.

What I mean is keep the GPS antennas where they are and commit a little white lie by telling the autopilot they are on the X axis. It’s a troubleshooting step. Don’t bother 3D printing extra stuff.

With that latest log, you might just discontinue use of that GPS module entirely. It seems very unhappy!

EDIT: see below - I was wrong about the GPS orientation.

2 Likes

Sure I will do that and update you. Thanks!

Hello . I read your problems. If you fix this problem please guide me also if not . My suggestion is check labelling all motors,second check gps aero always towards heading,third flight controller orientation .

Hey @Yuri_Rage,

Here are the logs for the ground test: Ground Test Logs - Google Drive

My observation is:
Negative X axis configuration is showing good results in the logs but when I see the drone heading in GCS, it is not showing the correct heading. I checked with the compass in my hand facing along the drone heading direction.

My current configuration, which is negative y-axis is only showing correct drone heading in the GCS but in the log it is showing 90 degree shift between AHRS heading & GPS heading.

Can you please share some screenshot of your drone log with GPS for Yaw enabled? Is the AHRS heading & GPS heading match in your system?

hi @rakeshsahay1,

Thanks for the suggestion,

How do you check that? Is there any proper setup to check it? I currently use the bubble leveler to check it but more interested in knowing some proper precision setup.

See below…I was wrong.

2 Likes

okay! understood. Thanks for the response.

@rmackay9 sir, need your help in this. Thanks!

I tried with the version 4.4.4, still the same thing. I really don’t know whether this is a bug or something. I am looking in forum to find someone’s log who has the GPS for yaw setup to understand.

@rmackay9 Sir, your comment would really help me find the issue. Thanks!

See below…I was wrong.

1 Like

Hey @Yuri_Rage Thanks for the response.

Actually with the correct front facing orientation also it shows the same results:

Still it shows the same 90 degree phase lag.

Ok, disregard all after bonjour! I made a big mistake!

The GPYW.RHD (raw heading) shows the heading between the two antennas, which in your case, is indeed 90 degrees to the direction of travel.

If you look at GPS0.Yaw, this is the corrected yaw, and it does track with the vehicle’s yaw estimate.

Something wasn’t adding up for me, especially since your EKF innovation values aren’t wildly out to lunch. This was it.

I don’t think GPS yaw has a thing to do with the behavior we are seeing here. Your configuration is correct and has been correct the whole time, and we just went down a major rabbit hole as a result of my misinterpretation of the GPYW logged messages.

2 Likes

Hey @Yuri_Rage, Thanks for clearing the thing, Yes now it all makes sense.

I have been trying everything possible to understand and solve this issue. Sorry even I did not cross check about GPYW.RHD

So one thing is clear now that there is no problem with the GPS YAW configuration.

Thanks for all the help.

Yes. I’m afraid I wasted your time by misinterpreting the results here. I do apologize. GPYW is a somewhat new log message set that I have not used extensively. And now I know!

So now that that is settled, we should call @xfacta and @amilcarlucas back for reassessment.

2 Likes

The log has restricted access - dont worry, found my copy

1 Like

No issues @Yuri_Rage,
I can totally understand, It was my fault also. Thanks for your time. I am starting all the config/setup from beginning and report here if I see again this circling issue.

1 Like

What ESC’s, motors and props do you have? Really I want to know about the ESCs but might as well throw in that other relevant info.

The best thing I can come up with is these points:

  • Pre-circles motors 1,4,6 have high output, like a weight imbalance to the rear right
  • Post-circles motors 1,3,5 have high output, like weight shifted to front right

So wind may play a role here, affecting those outputs as if the weight shifted - but the motor outputs look so consistent you’d expect this to be in a wind tunnel instead of outside with some variations.

  • During the circles Motor output 6 goes to minimum for relatively long periods
  • At some of the same time (not all) Motor output 5 goes to maximum

These two motors are opposite and maybe related to the possible weight shift towards motor 5 but it’s odd that motor 6 is going to minimum so much.

It’s hard to draw much of a conclusion from those points except there was some weight shift, strange wind effects or physical problem with folding arms or similar.

Yaw attitude control is quite tight and working well, maybe too well. I would try these settings:

ATC_RAT_YAW_D,0.001
ATC_RAT_YAW_I,0.08
ATC_RAT_YAW_P,0.80
ATC_SLEW_YAW,3000
PILOT_Y_EXPO,0.3
PILOT_Y_RATE,40
PSC_ACCZ_I,0.6
PSC_ACCZ_P,0.3
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
LOG_BITMASK,180222

I doubt the harmonic notch filter is working quite right.
If we can sort that out it could be worth running Autotune on pitch and roll again.

After I hear about those ESCs, and maybe change more, then you can do another test flight in AltHold and Loiter (not a mission) and we can go from there.

2 Likes