改变罗盘方向输出

huangapple go评论176阅读模式
英文:

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).

huangapple
  • 本文由 发表于 2020年8月12日 18:06:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/63374279.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定