During the second flight of a large Octaquad-X copter with 56” Props where GPS module’s compass is the primary and only source for heading, switching from alt-mode to loiter resulted in copter becoming unstable. the plot below shows mag-x and mag-z field changing rapidly for both used-external compass and for unused-internal-compass. BTW, gps has been mounted at a very far off place from motors(0.75m away) and batteries(1m away). Because of sudden mag-x and mag-z changes yaw is getting induced which is resulting in current shooting up/down by around 40%-50% but it is phase lagging mag-x and mag-z changes and hence the suspicion that current changes causing sudden mag field changes is not intuitive from log plot. After switching back from loiter to alt-hold the copter becomes stable.
Have done both compass calibration and have disabled internal compass.
Haven’t done compass-motor calibration. Even if compass-motor calibration with props removed is performed,the current reported is way below nominal if props were in place and will it not result in wrong results getting captured?
Is it that during loiter mode GPS’ reported co-ordinate’s earth’s mag field is compared with those reported by compass and EKF compares GPS’s reported co-ordinate’s mag field and the deviation that compass is reporting which could result in this sort of a behavior?
Please note the second flight was more to discover harmonic notches to be placed using FFT and for collecting logs to do magfit but never went ahead with doing 8 pattern fearing mag fluctuation.
If the drone is flyable the best thing is to run one of the logs through MAGFit. This will generate the compass_MOT corrections based on actual in flight data and current flow. Runs on the ground with the props removed won’t do any good because you won’t get enough current flow to make and viable data points. It’s like revving your car in neutral. Might be fun, but doesn’t prove anything.
The best flight to use is one that has several figure 8 patterns with different throttle or speed settings. More is better, but even a couple of laps should be enough to get you started.
Make sure the current meter is working properly for best results.
If you hit download in the upper left, something downloads. I think google drive is trying to display an archive of files but can’t figure out what is inside a 7zip
Not sure if this is the way others would do, but… I figured that it is relatively safe to deal with compass calibration in flight this way:
switch yaw source to GSF (EK3_SRC1_YAW = 8)
set COMPASS_USE to 0
take off in alt hold mode with good GPS fix, fly a bit in one direction so heading can be figure out
switch into loiter (optionally)
do the magfit flight - I do some circles and 8 figures with different turn radius and some short pitch/roll lines in cross pattern with different headings, some throttle punches to get current compensastion some data points
upload log to magfit tool
apply magfit results
set COMPASS_USE to 1
switch back ekf yaw source to compass (EK3_SRC1_YAW = 1)
so far, no issues with compass calibration after that, also never experienced “toilet bowling” or compass related instability and for me process seems to be relatively safe.
May be because it is in .7z format. please click on download anyway it will download. I have also attached .zip file Test logs - Google Drive
Feared giving yaw to the copter. is it safe to do with compass calibration not being good? well the copter is being flown very close to a sheet-metal warehouse(25 feet tall) and on the other side have street electric lines which is ~15m from flying zone.
Sure disabling compass for now could be one thing I can do to get data for magfit.
You performed a yaw earlier in the flight in althold mode. If you didn’t notice issues then, then it should be safe to do so regardless of the compass state.
Yes your intuition is correct. Pushing air with the props requires power which will be seen as increased current draw, necessary to generate the mag field interference that you are trying to calibrate out, so a props off test is not worthwhile here (and hard to say is worthwhile in any other case)>
You will need a bit more space to fly to get a good compass cal in one flight, but if you are that space constrained, throttling up and down in place, and yawing slowly in place, should help give more data. We can always check the results and see if it is good enough
Yes. a little bit yaw was given to check how the copter turns and also to look for any visible vibrations/oscillations during the maneuver. As it was the copter’s second flight got scared due to space constraints. Besides, the pilot being me have near-to-zero flying experience and skills to fly a large eVTOL. The mind tends to loose Orientation of craft unless the Heading line-of-the-craft and line of view of the pilot is in the same direction. So if yaw is given the pilot also has to revolve around the craft as it is being rotated just to make sure the pilot is right-behind the aircraft always so as not to loose orientation.
As a first measure, the wires(red/black) are running straight so before next flight will get it twisted to see if it can help reduce the magnetic flux near compass and get a better MagFit.
Can you also have a look at internal compass it is way to erratic compared to external one. is it because of the high current or is it bad? Internal compass is located in the middle of two 18S-Batteries around 400mm apart.
I doubt that it is bad, just affected by noise, but if you have the means to build a large system like this you’ll have to figure out how to get a safe space to conduct testing. If you have a log you want looked at then call it out