Hello Pimentel,
You can use atan2 to find the angle heading from one lat/lon to another lat/lon coordinate. PicBasic doesn't include that math function, but you can use an assembly include file to perform a cordic equation for atan2. If you do a search on cordic in this forum, you will find one include for PIC16 devices, and one for PIC18 devices. There is also a trick to convert longitude to an adjusted value based on the cosine of current lat. I will explain a little more about this later.
Here is a link explaining how to use the PIC16 trig include file with lat/lon. In it you will find a link for the cordic trig include file thread.
http://www.picbasic.co.uk/forum/show...1216#post71216
-Walter
http://www.scalerobotics.com
Bookmarks