Code coordinates to match compass bearings
Posted
by pinnacler
on Stack Overflow
See other posts from Stack Overflow
or by pinnacler
Published on 2010-05-05T00:34:30Z
Indexed on
2010/05/05
0:38 UTC
Read the original article
Hit count: 368
Right now in Matlab (0,0) is the origin, 0 degrees / 2pi would be to the right of the cartesian plane and angles are measured counter clockwise with 90 degrees being at the top.
I'm trying to write a simulator where the coordinates would match a compass bearing. 0/360 degrees or 2pi would be at the top and 90 degrees would be on the right.
Any idea how to code in Matlab or c++? I'd imaging it'd be a matrix flipped about the x axis and rotated 90 degrees but I'm at a total loss.
Phil
© Stack Overflow or respective owner