Calculation of GPS and Compass

cutebuddy6:
i mean to say the calculated bearing through lat\long

That makes more sense. So you use GPS to find your current lat/long, and have somehow got the lat/long of the place you want to go towards. Is that the idea?

In order to get there you really need to know which way you're pointing as well as where you are. The algorithm would be something like:

Find current position from GPS.
Calculate desired direction of travel to the waypoint.
Find orientation of vehicle from compass.
Calculate angular offset between vehicle orientation and desired direction of travel.
Calculate steering position to steer towards the desired orientation. Steering position should be based on the angular offset so that the amount of steering reduces as the angular offset reduces, until eventually the vehicle is travelling in a straight line towards the waypoint. If the vehicle is going to be travelling at high speed, you should scale the steering angle according to the speed to prevent the system from being oversensitive at high speed.