Gps for yaw(auto mode)

FC: pixhawk6c
Firmware : arducopter 4.3.0
GPS : f9p

Why do I turn yaw once if I change from GPS mode to auto mode?

Link to video : https://drive.google.com/file/d/1PItmKzHY2nXJ_AW0MLGtwTvqPXMIKTQ-/view?usp=sharing

Link to parameter : https://drive.google.com/file/d/1lfzxWbVO4wzzWZdRXDEnF_37Z5az8sm6/view?usp=sharing

Help me, please.

Link to log : https://drive.google.com/file/d/1H07PPG0cdMBI3QqMejTQx7U50Ewlg8P5/view?usp=sharing

There’s an access requirement on that file, can you allow everyone?

All users have been allowed.

Anyone that can help?

That looks like customised firmware, and the flight modes just show as numbers.
I would update to 4.3.3

The compasses dont look detected and calibrated properly.
Set BRD_BOOT_DELAY,3000
And reboot.
Go outside, wait for a good GPS 3D Fix then run the compass calibration.

Then in MissionPlanner / Mandatory… / Compass
Check which are internal and external then disable the internal compass
image

While still in Mandatory Hardware, got to Initial Parameters
Put in your prop size and battery cell count, also select “Suggested settings” , if you have T-Motor Flame or Apha ESCs then select that T-Motor option too.
Accept everything it offers.

Then also set
MOT_SPIN_ARM,0.10 to 0.12
to ensure reliable starting of motors.

When you next arm and fly the Hover thrust will take some time to relearn, so just keep trying to hover in AltHold and it will settle down in time. Then fly around doing lots of yaw and some turns like a figure 8 pattern.
We can check that log with MagFit to improve the compass calibration further.

gps for yaw does not use compass.
Compass has been turned off as part of it.
In gps mode, the flight is good.

It was me not understanding your original question properly, so I looked at the video and saw the copter do a full turn.
I dont think you should disable all the compasses - GPS for yaw does not totally replace the compasses.
Compasses are still needed until flying with a good GPS track.

Still do everything I recommend.

It’s hard to do compass calibration because the drone is heavy. I use gps for yaw not to do compass calibration.

You could enable the compasses and do a flight with some yaw and some circular or figure 8 patterns and we can run it through Magfit to drastically improve the compass calibration.

EDIT: it’s been a while since I read about GPS for yaw, so I’m reading it again to check I’m telling you the right things. I would probably still do the compass cal (via a flight and magfit)
I think you can leave the compasses enabled and still use GPS for Yaw
EK3_SRC1_YAW,2 (GPS only)
or more likely
EK3_SRC1_YAW,3 (GPS with Compass Fallback)
and just disable the compasses for testing purposes.

Probably set EK3_SRC2_YAW,1 for compass only in case there’s no GPS signal or glitches.

I see in the log you are getting Yaw from the GPS units, so the parameters you have seem working OK.

So long as the setup is correct and reception is adequate, a moving baseline configuration absolutely replaces magnetometer based heading. It is the primary solution for large vehicles with lots of interference, and there is potentially more detriment than good in leaving compasses enabled in those cases.

I cant see why this copter does a yaw rotation after launching…
Do you mind having a look at the log?

It seems everything is working with GPS for Yaw. Personally I would enable and calibrate the compasses via magfit and see if the issue remains.
Compasses can always be disabled later if they prove problematic, or the EK3_SRCx_YAW is easily changed.

It works normally when you turn on the compass.
Compass calibration is burdensome because large drones have to be mass-produced.

That’s where a test flight and the magfit utility come in :slight_smile:
So potentially you could

  • Set them up for GPS for Yaw but leave the compasses enabled
  • Do a test flight with circles and figure 8 pattern and so on
  • Use magfit to produce updated compass calibration settings
  • Set EK3_SRC1_YAW,3 (GPS with Compass Fallback)

EDIT: maybe do the large vehicle mag cal first

If you are going to reproduce this copter then make sure the tuning is absolutely near perfect. Looking at it flying (just visually) and saying it’s good enough - is not good enough.
If it is excellent in logs then you can copy the tuning related parameters to a new build (using the same components) and you’ll only need to do one test flight to verify correct operation.
You might need more flights for a burn-in process.
You can also set up your own set of read-only or default parameters.

GPS mode enables perfect flight.
Only auto mode has an altitude change, yaw is rotated.

Link to log : https://drive.google.com/file/d/1P32tTo149TUhboLHixqig-6FkGgOitQo/view?usp=sharing

Is there no solution?

GPS yaw is working perfectly, based on the log. You shouldn’t need to enable any compasses.

Maybe the GPS_POS parameters are set incorrectly, causing an orientation error.

I’m looking at the right direction.
Why do I turn yaw once if I change from GPS mode to auto mode?

I don’t know what GPS mode is - maybe your custom firmware is the problem.

Why do I turn yaw once if I change from Loiter mode to auto mode?