Attitude Drift

Home Forums GP9 Product Support Attitude Drift

This topic contains 2 replies, has 2 voices, and was last updated by  Caleb 5 months ago.

  • Author
    Posts
  • #667 Reply

    John Benac
    Participant

    I observe significant long term drift in the Euler angle attitude readings from my GP9. I’ve tried turning on and off the “GPS Updates Enabled” in the CHR Serial Interface program and observing the values over many minutes but that does not seem to make a difference. I left it plugged in overnight (with the GPS on) and the reading was close to 180 degrees in the morning. I have a live stream of the processed data on my linux terminal, and I can issue reset gyro and reset EKF during that live stream. When I do that, it comes back to close to zero, but even after that, if I leave it alone for tens of minutes (With the hardware just sitting there), it will drift unbound in pitch and roll many tens of degrees. Why is this? How can I stop this?

  • #668 Reply

    Caleb
    Moderator

    It is not normal for the attitude to drift without bound - typically, if there is any drift, it is constrained by accelerometer and/or GPS updates, depending on the settings. That short-term “drift” is caused by non-zero rate gyro biases, which have an impact on the GP9’s state estimates while the bias estimator converges. (Even after calibration, the rate gyros on the GP9 have varying output biases on the order of tenths of degrees per second).

    In the current version of the firmware (GP3A), there are effectively three possible operating modes of the filter:
    1) There is a high-quality GPS lock
    2) There is no GPS lock
    3) There is a GPS lock, but the quality is too poor to be trusted

    In cases 1 and 2, the pitch and roll estimates will be constrained by the GPS (in 1) and by the accels (in 2, if accelerometer updates are enabled, which they are by default). In case 3, where there is GPS lock but the fix is poor (hdop > 1.3), neither the GPS nor the accelerometers are used to constrain pitch and roll, as it is assumed that the GPS lock will improve and trusting the accels during dynamic motion could have a significant negative impact on the state estimates.

    It’s possible that if your sensor is sitting on your desk indoors, that the GPS is getting a lock, but that the quality is always poor. This could cause the unconstrained drift that you are seeing.

    We are thinking that it may be good to provide an additional configuration option that allows the accels to be used to constrain pitch and roll when GPS lock is poor. That feature would be added in the next firmware release.

    EDIT: You can see what mode the sensor is operating in by monitoring the GPS State bits in the health register. If the state == 3, then the GPS lock is good and it is being used to update pitch and roll states, and yaw during acceleration. If the state == 2, then there is a lock, but it is too poor to use. If the state == 1, then there is no GPS lock and the accels should be constraining pitch and roll if that setting is enabled.

    You can watch the state output by graphing it using the Serial Interface. I also like to graph sats in view, sats used, and hdop in a graph so that I can get a good idea of what the GPS is doing.

    • This reply was modified 5 months ago by  Caleb.
  • #669 Reply

    Caleb
    Moderator

    And, of course, if the sensor is stationary, you can expect yaw to drift without bound unless magnetometer updates are enabled (they aren’t, by default).

Reply To: Attitude Drift
Your information:




Cancel