IM USING A HEXACOPTER DRONE FOR AGRI SPRAYING PURPOSE, WITH PIXHAWK CUBE ORANGE AND ONE HERE 3GPS , EVERY TIME WHEN I TAKEOFF THE DRONE IS YAWING TO THE NORTH POE DIRECTION OF EARTH AND WHENEVER I TAKE OFF I GET A MESSAGE EKF3 IMU2 MAGO GROUND ANOMALY, YAW REALINGED,EKF3 IMU1 MAGO GROUND ANOMALY, YAW REALINGED, EKF_YAW_RESET, I HAVE ATTACHED THE LOG FILE , PLEASE DO HELP ME IN FINDING OUT THE SOLUTION FOR THIS PROBLEM
@pratheep_hild_defenc that is normal when taking off from a location with bad magnetic environment. During takeoff the yaw can drift. But as soon as the aircraft is in air the Yaw will be reset and missions should behave. If you need more robust heading solution consider using Moving Baseline Yaw, which is supported by HerePro. Newer Here4s will also have support for that.
Thank you sir
But as i was new to this drone field ,i didn’t understand what is robust heading solution and moving baseline yaw , can you please explain me on this ?
Please refer to the details here HerePro Manual - CubePilot
HerePro is one of the products that support moving baseline. Here4 is another product from CubePilot that’s getting support for moving baseline as well.
Yaw reset is normal after takeoff.
Yaw realigned means there has been some GPS position change and EKF can now tell which way the copter is going compared to what the compass initially reports - and that has been fixed.
Yaw ground mag anomaly means there is interference from your electrics, like heavy currents in battery wires.
So there is two things to fix in relation to the compass - the compass calibrations, and account for the interference - or ignore that compass, likely the built in one.
I can see using magfit the calibration is a bit out and can be improved, but this flight doesnt have enough yaw data. Disable the built in compass, and do a test flight with circles and plenty of yaw (after all the parameter changes below)
Other issues are:
- Many default values in parameters
- Needs tuning
- frame or motor-mount twist - I can see there is a consistent difference between clockwise and counter-clockwise motors, meaning one or more of the motor mounts are not perfectly aligned - try to fix this physical issue first
Let me know exactly what props. motors, ESCs and battery you have.
Do you actually use the BATT2 input?
Until then I can make some safe assumptions based in your log and you said it’s an agri sprayer, so you can definitely set these before you do the next test flight:
INS_HNTCH_ENABLE,1 // write then refresh params to see the rest
Some of these may change as I find out more, or after the next test flight, but they are a safe starting point. Remeber to do plenty of yaw, circles and some ascent and descent - let’s see that log.
thanks for your reply sir.
IN BATT2 i have connected flow sensor for spraying purpose.
motor and esc- hobby wing x6 motor with inbuilt esc
the total weight of the drone is 25 kg with pixhawk cube orange flight controller and here 3 gps
and then recheck your
MOT_SPIN_MIN using MissionPlanner motor test.
Read through my previous notes:
- Fix motor mount twist
- Apply all those settings including
Dont skip anything thinking just one item will fix your copter.
Do another test flight and let’s see that log
Hi sir done the test changing the parameter as you said , but still the drone is yawing and when moved forward the altitude of the drone drops suddenly WHENEVER I TAKE OFF I GET A MESSAGE EKF3 IMU2 MAGO GROUND ANOMALY, YAW REALINGED,EKF3 IMU1 MAGO GROUND ANOMALY, YAW REALINGED, only when i recieve this ground mag anomaly my drone is yawing ,i have attached the link of the files here .
@pratheep_hild_defenc please change the order of your Magnetometers. You seem to be using internal mag which AK09916 instead of good quality external Mag over DroneCAN. Please follow the steps here:
Ensure the DroneCAN Compass has highest priority
I must have missed your reply, I looked in the latest log there and couldnt see any of the compass-related errors.
I’ll check more for the altitude and yaw problems.