Help with Angles and distance
I am programming a GPS bot. I am getting to sets of (x,y) one being my current location and the other being the destination. I need to do trig in easy c to get the robot to know at what angle to travel and for what distance. I know how to do this trig on paper but have NO IDEA on how to program this. My advisor has given me the task, and I have little if any knowledge of advanced easyC. I know that i will need to do an inverse tangent([X2-X1]/[Y2-Y1]) to get my angle of heading, and to get my distance i need sq rt([X2-X1]^2 + [Y2-Y1]^2). So as you can see, I know what I need to do, but have no idea on how to put this in terms of EasyC. I also know that I will need trig lookup tables and have NO IDEA on how to use them.
|