- Controller: Matek H743, mounted where arrow points to Drone left size, hence AHRS_ORIENTATION set to YAW270 (option 6). Accelerometer calibrated with no issue, and on Data tab orientation of quad seems OK.
- GPS/ Compass: Matek M8Q-5883, mounted with arrow forward with settings as per my understanding of manufacturer’s CW270Flip: WAY270/ Pitch180, COMPASS_ORIENT=27.
- Frame type: FRAME_CLASS= QUAD (option 1). FRAME_TYPE=BetaFlightX (option 12).
- Servo mapping: Only settings I can get to have motor test go in correct sequence (i.e. front right A → B ->C ->D) is Servo 1: Motor 1, Servo 2: Motor 2, Servo 3: Motor 3, Servo 4: Motor 4. NOTE, motors are mounted on quad such that 4-2 are in front (2 on the right), and 3-1 in the back (1 on the right), typical Betaflight setup. Note, any other mapping produces ABCD tests out of sequence.
1- When controlling the quad, Pitch axis is reversed. Seems it is still considering motors 1-3 are in front. If this is the case, what is the mapping that would produce correct test sequence for stated configuration?!
2- Cannot get compass to calibrate with stated settings - no magnetic interference etc. Maybe a knock on effect of issue 1.
Your help is highly appreciated.
It does this after you have set COMPASS_ORIENTATION to 0?
From My Arduino days, which are not much, I recall determining axis is as simple as rotating each of them North and when it faces North it gives max reading when it faces south it gives lowest reading. Augment that with Flight controller axis direction and figuring out the compass axis and its offset should not be such a pain, yet, it’s been very painful thus far trying to get this to work.
Note, I also changed quad setup to quad-x, remapped motors and got their ABCD sequence right, and as part of the change recalibrated accelerometer in case that changes its offsets (yet it is still at YAW270). Yet, no luck getting the compass to calibrate.
Yea, I don’t think that matters. I have a couple of quads with that same combination of FC and compass and didn’t have a problem. But on those I used the standard FC orientation. That said, on other craft where it wasn’t the Auto Rotation performed correctly during calibration.
Relative to your comment about determining compass orientation there is additional info on the Wiki about that:
Yes Sir, been through that and was interested in the note “When rotating your aircraft through all axes each of the compasses should move in the same direction”, but it didn’t help.
Hmm. Post a parameter file or a link to a .bin flight log perhaps there is something to see.
Will do when I get a chance, this flight controller (Matek H743 Wing V3) seems to have some issues. Beeper does not work if bidirectional dshot is installed. If normal build is installed, it keeps disconnecting from Mission Planner with every operation change, e.g. change mode, calibrate compass etc. Not sure what the issue is. Also, the command line gives binary code, no matter what connection baud rate is. lots of inconveniences.
If I go into Setup → Advanced → Terminal and Connect to APM, all I get is binary information. not clear text, and it keeps scrolling through it.
Thought that’s what you meant. Terminal hasn’t been useful for anything for a very long time. It means nothing.
You said you flew it so a .bin flight log could be useful.
Thanks @dkemxr , will do, I will be flying it this weekend. If you need me to enable certain logs other than compass please let me know.
By the way, I had a brief look at code related to 3885L compass code. Not understanding much, yet it seemed to me it adds an angle to the axes, so, revised Matek spec and realized orientation should be set to None for ArduPilot (unlike BF and INAV CW270FLIP!). I did that, yet no calibration was possible. Another brief look at compass calibration code and it seems to indicate the calibration process assumes the rotation of the drone takes place in one direction (for all axis). So, I did that and interestingly, I got compass calibration several times ONLY if I rotate all axis lets say in positive direction. Any other rotation I tried did not yield successful calibration. Not sure if this is normal or it is just my imagination.
A newbie question, how do I upload the file here, I don’t see attachment icon?
I thought I figured it all, however, I experienced couple of things.
1- At the start of each flight, it yaws left or right randomly then stabilizes. Not sure why is this if compass already aligned.
2- At the end of a 10 minute flight that included switch between ALTHOLD, POSHOLD and STAB, and during a full throttle in STAB followed by POSHOLD (which passes through ALTHOLD switch position), the drone just crumbled and fall of the sky. Hopefully when I post the log you maybe able to provide a hint why this happened.
You don’t. Attach a link to where it’s stored (Dropbox, etc).