如何解决一角为+-180°时2坐标系间的变换
我有三个坐标系:A、B、C。坐标系 B 向 A 旋转了大约 180°,因此 z 轴指向地面(z=0)。现在想知道B和C的Orientation,但是难的是我的数据是这样的:
import discord
import mcstatus
from mcstatus import MinecraftServer
from discord.ext import commands
client = commands.Bot(command_prefix='\\')
client.remove_command('help')
@client.event
async def on_ready():
activity = discord.Activity(type=discord.ActivityType.watching,name="for \\\'s")
await client.change_presence(status=discord.Status.online,activity=activity)
print('Logged in as {0.user}'.format(client))
@client.event
async def on_command_error(ctx,error):
print(error)
@client.command()
async def mcserver(ctx):
server = MinecraftServer.lookup("mc.hypixel.net")
status = server.status()
latency = server.ping()
print("The server replied in {0} ms".format(latency))
await ctx.channel.send("The server has {0} players and replied in {1}
ms".format(status.players.online,status.latency))
所以有时第一个旋转有时会有很大的跳跃,因为它的旋转不大于 180。现在我试图得到这样的转换:
B = [ [-178,2,4],[179,3,5],...]
C = [ [2,[1,4,6],...]
但是在这种情况下的问题,它不起作用,因为那个角度的跳跃......
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。