2020-07-16, 02:39 PM
I normally have the scope running on ap.heading_error to quantify the amplitude of the error in order to optimize my gains. Yesterday I noticed the heading_error making sudden jumps - up and down. This coincided with jumps in ap.heading, and I concluded this was the cause for that. I've never seen this before and I have no reason to suspect a sudden increase in electric or magnetical influences. Also, I find it too easy to suspect the IMU, as there are tons of code between the IMU and ap.heading. Also, the lowpass filter should have smoothed off any IMU-induced jumps.
So what I suspect is that these jumps are artefacts of the compass calibration mechanism. That would be fine with me, as that mechanism has to do its work at some point anyway and some jump in heading is to be expected then. But not 5 jumps in 10 seconds or so. At some point it stopped jumping, and I had done my portion of gain-optimizing for the day; pypilot worked well for the remainder of the trip. I was not in a position to make movies or do some logging.
I'd like to know if my assumption could be right, and know a little bit more about how the 2D compass calibration (the one that sets imu.compass.calibration) relates to the 3D calibration, that provides the corrections for heading and pitch? What values should I set on my scope to see each mechanism at work? At least, this would enable me to search for the cause of these jumps.
Thx!
So what I suspect is that these jumps are artefacts of the compass calibration mechanism. That would be fine with me, as that mechanism has to do its work at some point anyway and some jump in heading is to be expected then. But not 5 jumps in 10 seconds or so. At some point it stopped jumping, and I had done my portion of gain-optimizing for the day; pypilot worked well for the remainder of the trip. I was not in a position to make movies or do some logging.
I'd like to know if my assumption could be right, and know a little bit more about how the 2D compass calibration (the one that sets imu.compass.calibration) relates to the 3D calibration, that provides the corrections for heading and pitch? What values should I set on my scope to see each mechanism at work? At least, this would enable me to search for the cause of these jumps.
Thx!