Howdy folks. My question may be outside the scope of this thread, but at the very least, I could use some help analyzing logs. Please let me know if I should move this to a different place. I'm trying to figure out an issue with my Solo, which I've done some mods to. Since APM Planner 2.0 is significantly different from the documentation (such as
Diagnosing problems using Logs — Copter documentation) I'm not sure if some of the errors I'm seeing are real or a software compatibility issue. I know the Solo is behind ardupilot, so maybe that's some of the issue?
Problem
The drone drifts around and won't hold position. Sometimes it'll stay in the same spot, but then I yaw 180 degrees and it starts to slowly wander off in different directions. The obvious culprit seems to be the compass, but I'm struggling to figure out what's going on. When actively controlling the drone, it flies well, but when I let go of the sticks, it doesn't hold its position.
Mods
- One mod is replacing the stock wifi cards with the MikroTik cards (3DR SOLO Long Range Wifi Card Upgrade (MikroTik)). I've done this on two other solos without any issues, and I don't have issues with the wifi/RC.
- The other mods were moving the compass and wifi antennas out of the legs (Dumb Legs - Hackster.io). Again, wifi seems fine. My compass is longer than Dan shows in that post, so I had to do things a bit differently (more UHU tack to raise the compass higher in the chamber), but it's still in the same orientation (hole pointing forward and components on the bottom). I have changed the compass orientation to "None 0".
Level and Compass Calibration
- Level calibration was done indoors on a level bench.
- Compass calibration has been done inside and outside, in my front yard. Sometimes the compass calibration fails with the solo turning off while I'm rotating. Other times it completes and seems to be happy. A couple of notes:
- When connected to APM Planner, the heading seems to be off. I'm using my iPhone's compass app to compare (which passes the sniff test, since it lines up with roads that are North/South). APM planner shows the heading off by about 20-30 degrees (it shows N to be a bit NW). I've tried looking up the magnetic declination for my area, and set it. Although I see it changing the radian value of the parameter, I don't see any difference in heading on the Flight Data view. I even changed to some very different declinations and that doesn't seem to affect the view. So, I'm not sure what that means. Maybe it's not using the compass, but the GPS, for that display?
- I'm not at all confident in my compass calibration strategy. The animation only shows rotating in a couple of directions, but I've been doing this:
- Start with solo's nose pointing away from me.
- Rotate a the nose (towards be) a full 360 degrees.
- "Yaw" the solo about 45 degrees and rotate the same direction.
- Continue until I've done the same thing every 45 degrees.
- If I don't have a green check mark yet, I'll keep going around again.
- This seems to work, but I can't find complete instructions on doing it. Some folks in the forums say to look up the "naza dance" but it's a completely different style of rotation than shown in the Solo animation.
Opening Logs With APM Planner 2.0 (OS X)
When I try to load the logs in APM Planner, I get errors:
- Loading the tlog files from the controller give errors, but still opens up and lets me look at graphs (though they're strange and I'm not sure they can be trusted):
Log parsing ended with errors.
There were data errors / unreadable data in the log! The data is potentially corrupt and incorrect.
Detected:
5479 time corruptions
2016 data corruptions
- Some of the lines are like this: "Logline 102: Missing type information. Message:M1:ARMMASK:0"
- Others are like this: "Logline 65917: Log time is not increasing! Last Time:883630 new Time:78452"
- Loading the BIN files from the drone gives the error "Error preparing insertquery: R10C table R10C has no column named pitch_pwm Unable to execute statement". This then closes the log/graph window and I can't view anything.
Analyzing Logs With dronekit-la
As if that wasn't scary enough, this shows tons of failures on both the
tlog and
BIN files:
- Some are flat out crazy, such as "Position Estimate Divergence", which shows a max delta of over 10 million meters.
- These last logs I've been looking through are me just turning the drone on inside and watching values in APM Planner. So, maybe a little movement as I watch values change, but mostly sitting on the ground. However, maybe that's part of why they're so bad too, since I'm inside, without a good GPS lock. I figured I could at least open the log files and analyze them and see if the compass is happy, but maybe that's a bad assumption and I need to only look at logs from flying outside? I'll test that this afternoon.
So, it's not the worst, since the drone still flies well, but I'd really like to do things like panoramas, which I can't imagine going well with it drifting this much. Also, it would be nice to know that the sensors aren't completely wonky, causing the drone to randomly fly away. I've attached logs from just turning the drone on inside and watching values in APM Planner. I'll go out into a more open field this afternoon and I can attach those logs, or any others.
I'm sorry this was such a huge post, but I'm trying to be clear about what I'm trying to do and what I'm seeing. I'd really appreciate any advice on how to interpret all of this and debug the issue. Thanks!