EDIT: One of the two gyros is causing the issue, by forcing the pixhawk to use one the good gyro, I have not had the issue reappear in ~10 packs, here is the parameter. INS_ENABLE_MASK = 2 (#2 is the second gyro and the good one on my PHL FC, #1 is the first gyro). I still get bad gyro health warning on boot, but zero other warnings during flight or issues, thanks for the help guys!
I have a 250mm quad running AC 4.0.3 on PixHawkLite FC, now that I got it flying fairly well, sometimes not so good flights when in alt_hold or loiter modes.
Issues: works fine and then sometimes:
- Alt-hold starts throttle pulsing up/down, you can see it some times, but you can definitely hear it (I checked vibes and they are ok).
- Loiter mode, will be stable holding then after “warning EKF primary changed:1” just kicks the quads nose up ~5 degrees and starts moving backward until corrected with sticks.
The log attached is just sitting on a wood post out in the open, zero movement, power up and sometimes it gives warnings/etc, compass/mag/gyro/acc/baro all giving issues. If it was a sensor issue, I would not think all sensors would be bad. I have seen the gps glitch give the same pattern on the map over and over (something like a 7 to 12 pointed star, gps glitches wouldn’t repeat a pattern, this seems like a code issue is my guess) while its just sitting, unarmed.
I have the yaapu telemetry on my x9d and when it gives this message “warning EKF primary changed:1” (it sometimes give gps glitch, error velocity variance) it starts flying bad in alt-hold and loiter, switch back to stabilize and its fine. A power cycle and its ok until it randomly acts up again (roughly 1 in ~3 flights). I have powered up and set on top of a wall away from all power lines/etc, let the gps stabilize (~15 sat/0.6 hdop) and I will get the above warnings without firing up the motors. I disabled the PHL onboard compass (SPI mag, now using the I2C mag in the GPS unit in stead of both). If I need to move the gps/mag higher, I will do that if you think it will help (if yes, how high?). The quad has never been crashed.
My quad has a 4n1 esc just below the PHL FC, and above that and 2 inches forward is the M8N gps/mag. The FC is soft mounted, I could try hard mounting it if you think that might help (has 6000 gyro). I have had the copter connected usb to MP and wiggled the wires/connectors and never get a issue. Included a pics to see if its a layout issue?
My main problem is I am not good at reading the dataflash logs, so many parameters plus the way the code fuses data/etc.
Could be a coincidence, “seems” like it was after the autotune, random weird stuff started happening.
Seems it might be a code issue,not sure.
Thanks for any advise to track down this issue!
2020-09-11 10-41-13.log.param.txt (17.4 KB)