View Single Post
  #1   Spotlight this post!  
Unread 10-12-2007, 10:15
charlie1218 charlie1218 is offline
Registered User
FRC #1218
Team Role: Coach
 
Join Date: Jan 2006
Rookie Year: 2005
Location: PHILADELPHIA
Posts: 55
charlie1218 will become famous soon enoughcharlie1218 will become famous soon enough
Question 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.