英文:
Transforming compass direction output
问题
I have directional outputs which are both flipped and + - as appose to genuine compass outputs. I want to convert these using math to give me the correct output. I am pretty sure this can be done using trigonometric functions, i would welcome any advice i have drawn a quick sketch excuse the rough jotting.
Left the current situation on the right the desired output
I hope that makes sense. North and south are flipped, if they were flipped back then we would have north to east positive 0-180, north to west negative 0-(-180), however i need it flipped and represented as normal compass headings.
英文:
I have directional outputs which are both flipped and + - as appose to genuine compass outputs. I want to convert these using math to give me the correct output. I am pretty sure this can be done using trigonometric functions, i would welcome any advice i have drawn a quick sketch excuse the rough jotting.
Left the current situation on the right the desired output
I hope that makes sense. North and south are flipped, if they were flipped back then we would have north to east positive 0-180, north to west negative 0-(-180), however i need it flipped and represented as normal compass headings,
答案1
得分: 1
"Going off the image, it looks like simply newAngle = oldAngle+180
(assuming input of -180...180)."
英文:
Going off the image, it looks like simply newAngle = oldAngle+180
(assuming input of -180...180).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论