transform x,y coordinate to angle
Mostra commenti meno recenti
Hi Guys,
I'm struggeling with this problem in which I have two points (x and y coordinates known) that move independent of eachother. I need to find the angle between these two points wrt North. The angle can be between -180:180. As indicated in the Figure I added, I would like to find the "red angle", but by using the sin,cos,tan equations I can only get the "blue angle".
Anyone that knows how to tackle this problem? It needs to work for all respective locations of both points to one another...
I tried the following code, but that does only result in the blue angle as expected...
heading_s=atand((y_ip-y_s)/(x_ip-x_s));

Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Coordinate Reference Systems in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!