Hi All,
I have some questions! I've been using the Kalman filter as described within this post. However, I'm really struggling with it.
Did anyone post a stable version that works?
I'm wondering if I'm updating it frequently enough? I'm using a Teensy 3.2 that's doing other things at the same time but I'm managing to run the filter at approx 40-50Hz. Is that fast enough?
With the device sitting flat on my desk I'm getting wildly drifting pitch/roll/yaw and the values I'm getting from the filter don't make sense.
Like:
pitch: 3 to -30 degrees
roll: 2 to -115 degrees
yaw: 25 to -164 degrees
I've definitely calibrated the MPU9250 correctly - getting reasonable results from it. The values from it are pretty stable, so I don't understand how the filter can vary so wildly. The GPS inputs to the filter are relatively (but not totally) stable - within the normal variations. If GPS is lost, the filter goes waaay off really quickly, suggesting huge speeds and the like.
Any help would be greatly appreciated as this is the final stage of a major project!
Thanks,
Andrew
Don-Brian
Think I mentioned last year that I found a implementation of the Kalman Filter for quaternions (4-state). The C++ files are located at https://github.com/matthew-t-watson/Picopter. I am not sure his thesis is still on-line but if you want it I have a copy, http://www.recantha.co.uk/blog/?p=6346. I am in the process of converting it to use with the MPU-9250 library for reference purposes. When I get it working I will post it somewhere.
Mike
Just sent you a response. Can not upload here either - too big.Sent you a PM re: dissertation. Did you successfully convert it? Thanks!
@u_cap, I'm interested in it as well, let me know what you hear from Mike please.
On a separate note, I recently have got the gnss-sdr (GPS software defined radio) software running on a linux platform. Would be awesome to get it going on a Teensy, but am guessing it's going to be a few generations of Teensy in the future (multi-core, much faster CPU speeds) to get it working on a Teensy.
Don
Love the F9P's - especially adding in CORS corrections, fast time to fix and low standard deviation.
Haven't done too much with this filter, there were a couple minor errors discovered, but mostly once it is tuned - seems to work really well. Some tests I did have it working favorably compared with much more expensive solutions. Hard to come up with a way of auto-tuning the filter though. Only half the problem is the noise in the IMU and GNSS, the filter tuning also depends a lot on the platform it's being installed on the environment conditions it's being used in.
I picked up a couple of these a long time ago: https://www.ardusimple.com/simplertk2b/, but haven't played with them but they do look promising. Been too busy with T4.0 and T4.1. Now with displays - never enough time.
If I remember right the biggest problem we were having was with the yaw drifting that we never seemed to resolve. Never was able to track down the issue. Would like to give it a try again at some point.
Brian - know you have been real busy with real work stuff but did you ever post an update to code that we were using anywhere?
Hi Brian
Sorry was had to disappear for awhile. Interesting that the MPU-9250 gives about the same results as the DJI but the VN-200/300 are off by about 45degs?
Well guess I have another project for the list now![]()
Attached is a zip of the corrected code. It was being used with some CMake build tools, but should be easy enough to get it working as an Arduino library. Requires Eigen.
Yaw tracking has been good while moving. Here is a plot of a test I did where I was walking on a north-south aligned street and compared the EKF results with the DJI A3 flight control system, a VN-200 and a VN-300. The EKF was using an MPU-9250 IMU (hence the label) and a F9P GNSS receiver. The weird data dropouts on the VN-300, I think were due to a specific cable - this test was performed in February and in April, I tried to reproduce the data dropouts to debug with VectorNav engineers, but couldn't reproduce the issue, which is why I think it was an intermittent cabling fault between the Teensy and the VN-300. Prior to this test, all of the filters were warmed up by moving the platform in pitch, roll, heading circles and changing position for about 5 - 10 minutes.
View attachment 20419
From my just playing around with it think it might help.Prior to this test, all of the filters were warmed up by moving the platform in pitch, roll, heading circles and changing position for about 5 - 10 minutes.