[Math] How to calculate the position of a turning object, based on its rotation

mathematical physicsphysicstrigonometry

I'm working on a program that periodically updates the position of an object. The object is able to move in straight lines, as well as turn gradually. In order to check that my object is turning properly, I want to be able to calculate where the object should be after it turns $θ^\circ$.

For simplicity, lets say the updates are sent out once per second. I know the current position of the object, the speed, the angle along which the object is traveling, the turn rate, and the target angle I would like the object to be traveling along.

For example, if the object starts at $(0,0)$, is traveling north at $0^\circ$, can turn at a rate of $5^\circ$ per second, and is currently moving along at $5$ units per second, how can I determine what the $(x, y)$ position of the object will be once it has turned to $35^\circ$?

Best Answer

If the turn rate and speed is constant the object will travel on a circle with a circumference $360$ units. Given that you can calculate the position using: \begin{align} r &= \frac{360^\circ}{2\pi}\\[12pt] cp &= (r,0)\\[12pt] p &= (cp\cdot x - r \cos α\, ,\, cp\cdot y + r \sin α) \end{align} Point on circle

Related Question