Turning an Angle into a compass heading
9 year
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 from United States  [1445 posts] 9 year
Is this a repost of



Anonymous 9 year
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 .
Steven from United States  [1445 posts] 9 year
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)


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