loading
 
Turning an Angle into a compass heading
Anonymous
3 years
I have a downward looking camera looking at a target and have the robot gps heading,Roborealm has calculated the angle to the target from the position of the robot but now I need to change this angle into a compass heading for the robot to head to.
looking for help to achieve this thanks.
Steven Gentner from United States  [1370 posts] 3 years
Is this a repost of

http://www.roborealm.com/forum/index.php?thread_id=5271#

?

STeven.
Anonymous 3 years
No, I have set the top of the image as the current compass heading(gps input) and have target marked on image from above (COG) and need robo-realm to work out compass heading to take to target based on my current heading .
Thanks.
Steven Gentner from United States  [1370 posts] 3 years
You can use the Calculate Angle module to calculate the angle to the COG from the center of the image. Given this angle and your current heading you can determine what absolute angle you need to go. For example, if your current heading is 135deg and the angle of the COG from center image is 40deg then the desired heading is 175deg. You would add the angle and wrap around at 360 and wrap under at 0. (angular addition is circular)

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index