I'm working on an autonomous quad copter, I have two GPS co-ordinates (source and destination co-ordinates). I need to move my quad from the source to the destination, for this I need to calculate the heading and set the yaw value of my quad. How can I calculate the heading and make sure the quad is headed in the right direction as the target co-ordinates?
If I use magnetometer the declination angle will vary from place to place and so I will have to keep changing the declination angle. If I'm calculating based on just the GPS co-ordinates, it's not accurate.
What is the best way to do this? How do I calculate the above?