Hi everyone,
I am trying to build a quad to fly indoor with ARKflow (without GPS). The setup has two mag sensors - one internal in the ARK autopilot and one external in the ARK GPS sensor. I have calibrated the compass (indoors but in open space without any metal/electronics nearby) many times but I have two issues: 1) I get a wrong initial heading that fixes on a 360 deg. manual rotation of the drone, and 2) mag sensors inconsistent warning.
I did many tests and the results were roughly the same. In all these tests the drone was NOT armed; I started the logging manually. The actual heading in these tests was around 230 deg. When the drone was powered up, it gave a heading of 90 deg. and then I picked it up and rotated it 360 deg. at 90 deg. intervals. Once I put the drone back facing the same way, the heading showed ~240 deg. I am attaching two log files.
log 1
log 2
Since the drone is not armed, there is no current. Despite this, I am seeing the norm of the mag readings change. I am not sure what is happening here? If someone can help that would be great!
Are you sure you are not measuring the magnetic field of your surroundings, e.g. steel rods in concrete?
Hi @JulianOes , I put the drone on a wooden table in the middle of the room. The weird thing is that after a 360 deg manual rotation, it starts giving the right heading… I have repeated the tests multiple times with same results.
Also, if you look at the heading plot, it has a jump during the 360 rotation, whereas the mag sensor readings are all slowly changing with rotation.
After updating the firmware on the ARK GPS and ARK autopilot to v1.15.3, I still have the mag issue.
Drone is not armed. Log is manually started. Actual heading of drone is ~235 deg. On bootup, the drone shows a heading of ~75 deg. Then I pick up the drone and manually rotate it 360 deg., and I put it back facing the same way. The heading reading then is more or less correct to ~230 deg.
Please see the yaw plots from two tests I did with almost identical results. It can be seen that there is a jump in yaw reading (red region) during the manual rotation. I need help or any advise here pls.
Hi,
I suspect there is something wrong with your hardware.
Can you share this logfile?
For sure. Here are the two logs files from that day. These are manual 360 deg rotation without arming the drone.
log1-manual rotation
log2-manual rotation
It looks like the estimator detects an issue and presumably resets heading.
You can see that the mag check flag is raised:
And there are these warnings:
Have you calibrated the compass outside, completely away from interference?
Then I would power it up outside and check whether the heading is correct when you power it up. Once you have confirmed the calibration is good outside without any interference, you could try again inside.
My experience has been that mag calibration is generally not advised indoors and you will likely experience such problems.
1 Like
Thanks. I will try calibrating compass outside and let you know how it goes.
In the meanwhile, our goal is to fly indoors using optical flow. Is heading used in indoor position control with optical flow? Thanks.
That’s a good question. I’m not too sure how that’s generally done.
@dakejahl how do you get good heading indoor with flow?
Flow is always in body frame so in theory heading should have no effect. Regarding the compass issue, the calibration appears way off. The offsets and scales are abnormally large, also the norm of the magnetic field should remain roughly the same value irrespective of airframe attitude. Make sure you’re performing the mag calibration with batteries installed, depending on proximity to the magnetometer they can have a large hard iron effect.
1 Like
Hi Jacob, nice to get in touch over here as well
. Its good to know that heading is not used to hold position indoors with the flow sensor.
To clarify, calibration has been done multiple times with battery installed in its location. I was also not happy with the norm of the mag readings changing (and that too without any current). I will do calibration outdoors and try this experiment outside for a change. If results are similar, then probably our sensor is broken and we will buy another GNSS sensor and try with that.
Didn’t even realize!
Hmm yes perhaps the mag sensor is broken, the IC is fragile and this wouldn’t be the first time we’ve seen one malfunction. If you ship it back to us we can take a look. Can you send an email with an RMA request?
One last thought, seems unlikely but double check nothing is grounded to the carbon frame (eg antenna connectors). We’ve seen this happen on other customers airframes and it can cause all sorts of weird issues.
1 Like