I have APM2. I tried to verify the location of my GPS.
What I found out is that at the same location GPS reading gives different value even though I am not moving my APM, it is just a static location.
So, the problem comes when I want to calculate the distance from one point to another waypoint. It gives inaccurate reading. Any idea to overcome this problem ?
Futhermore, if you read the datasheet from MTK GPS that was used in APM2, it capable for AGPS to get more accurate reading.
-Support AGPS function ( Offline mode : EPO valid up to 14 days )
Is there any library that I could use to enable this AGPS function ? Do I need to add extra hardware ?
I don't know about the AGPS function.
In the past i've sucessfully used PID to remove jerky motion in navigation on a very similar project. Increasing the accuracy of the GPS won't make it less jerky, in fact it might make it worse.
Do you have any rough idea how do you control it using PID? What is the steady state error are you trying to achieve ? From what you said, seems like PID could solve my problem. I would like to try it if this is possible.
I used heading for my PID. So I calculated the heading i wanted to be going, and the heading that i actually was going. However I suppose you could use cross track error. It would be good for you to find a good tutorial on PID, because they are very easy to write, but can be rather tricky to tune.