hi,
The problem area will be the arctan functions in the PIC.
If you had a directional aerial that had a beam width of 10 degrees, it would mean for a 90 degree quadrant you could use a short Table for the arctan.
So the Table would represent a 90 degree quadrant divided into say 18 sectors [values covering 5 degrees].
Use your Base station as the Datum, so reduce its N, E, to 0,0 and then normalise the received N, E ,GPS data relative to the Dataum 0,0.
This will give a Table pointer for the arctan/ angle.
E