|
Turning an Angle into a compass heading Anonymous |
11 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.
|
|
|
Carl from Your Country [1447 posts] |
11 year
|
|
|
Anonymous |
11 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 .
Thanks.
|
|
|
Carl from Your Country [1447 posts] |
11 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)
STeven.
|
|