There does not seem to be a clear forum for this question so I hope this place will do.
I have a robot that wanders around my garden. It gets given where it starts and where it is to go to and with the help of a compass it does a reasonable job of doing so. When it gets there it gets given another target and so on.With the other things it is doing it reads the compass and adjusts its direction about 5 times a second. It is a simple matter of using the speed (which is only estimated from the motor speed) to workout where it has moved to and what direction it has now to go in. I have not yet bothered with trying to detect wheel speed because the intrinsic odometer process by itself is just not accurate enough in the long term.
This is fine as far as it goes but if it is not to fall into the pond or the stream it needs to become more accurate.
So now I have added a GPS, and after much reading I am ready to integrate it into the system using a Kalman Filter.
The GPS reports every second. It is supposed to be able to do up to 10Hz but then the differential GPS does not work and the result is less accurate.
So what do I feed in?
I initially got hung up on thinking that I should in some way feed in all the inputs that have been made but there does not seem to be any point. So one solution is just to alter the A matrix every step so that it takes the previous (X,Y) and gives the new (X,Y) one second later.Use the GPS (X,Y) to compare and calculate.(The A matrix is the one that calculates the state transfer from t to t+1)
Alternatively I could fix the Matrix A and incorporate velocity. I could calculate an Xvel and Yvel and use those. Again use the GPS (X,Y) to compare and calculate (no reading for velocity).
I think the two above alternatives are actually the same.
An alternative is to calculate a velocity and direction and use the velocity and direction the GPS reports and use an ordinary Kalman filter to combine.
Similar would be to use the Extended Kalman filter to combine GPS velocity and Direction to give (X,Y)
This may catch the relationship that exists between the X and Y coods
Finally as the GPS velocity and direction are calculated in a completely seperate way from the GPS X,Y position using the Doppler effect on the signal frequencies, using the GPS position or the GPS vel,dir will give different answers. (ie if you start from a known position and move then the new position calculated from the GPS velocity and direction will not be the same as the GPS X,Y )
Assuming there is additional information in each of the methods, how do I combine the two answers to get a better result?
Using each of the calculated Kalman gains I could adjust the answer twice? Or should I average the Kalman Gains or What?
Here are a few other things that I have discovered and would like comments on.
I am using the Adafruit Ultimate GPS. It reports a time in exact seconds ie 12 hours 34mins 56.000sec.
Does anybody know if this IS the exact time that the measuremens were taken or is it a rounded time. An error in time
of up to 0.5sec is quite a lot.
From inspecting the readings of the GPS it may be random over a long time but in the short term (10 - 20 secs) it goes walkabout. I have seen this on some published traces on the internet so I do not think it is my particlular instrument. Has anybody found a way to cope with this?
Again from inspecting the readings from the GPS and the robot there seems to be a lag af about 2sec between where the robot reports and where the GPS reports. How have other people dealt with this given that I do not have a highly accurate clock on board?
Thank you for any comment you can make about your experiences.