This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ap.heading making jumps
#1
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!
Reply
#2
It can be an artifact of compass calibration, or if the user adjusts the compass offset. This is to hopefully hold the same course even though the heading is changing.

It should not jump more than 1 time in 20 seconds. The heading and heading command should change the same amount so as not to have much effect on course.


You could look at the compass calibration age and if it resets to 0 when the heading changes.
Reply
#3
(2020-07-16, 09:29 PM)seandepagnier Wrote: It can be an artifact of compass calibration, or if the user adjusts the compass offset.   This is to hopefully hold the same course even though the heading is changing.

It should not jump more than 1 time in 20 seconds.  The heading and heading command should change the same amount so as not to have much effect on course.


You could look at the compass calibration age and if it resets to 0 when the heading changes.

All right, I'll put ap.heading, ap.heading_command, and imu.heading on the scope then, keep a sharp eye on the calibration age and see what happens.

But if I'm right, ap.heading_error = ap.heading - ap.heading_command, so when the ap.heading_command is adjusted along with ap.heading, I would not have seen the jumps in ap.heading_error. That would mean that the jumps are not caused by the 2D compass calibration mechanism, but by something else. Couls this be the 3D correction mechanism? How does that tie into all this?

Eager to learn :-) thx!
Reply
#4
You are correct. There should not be a significant jump in heading_error. Is there any chance you can capture a screenshot of the scope?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)