123/registration/Untitled.ipynb
2025-02-01 15:57:22 +08:00

102 lines
1.9 KiB
Text
Executable file

{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"id": "82327832",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3.141592653589793\n",
"[[ 0.65011138 -0.75983893 0. ]\n",
" [ 0.75983893 0.65011138 0. ]\n",
" [ 0. 0. 1. ]]\n"
]
}
],
"source": [
"from math import sin, cos\n",
"import numpy as np\n",
"\n",
"print(np.pi)\n",
"\n",
"a=49.45*np.pi/180\n",
"b=11.31*np.pi/180\n",
"c=-2.11*np.pi/180\n",
"\n",
"yaw = np.array([\n",
" [cos(a), -sin(a), 0],\n",
" [sin(a), cos(a), 0],\n",
" [0,0,1]\n",
"])\n",
"pitch = np.array([\n",
" [cos(b), 0, sin(b)],\n",
" [0, 1, 0],\n",
" [-sin(b),0,cos(b)]\n",
"])\n",
"roll = np.array([\n",
" [1, 0, 0],\n",
" [0, cos(c), -sin(c)],\n",
" [0,sin(c),cos(c)]\n",
"])\n",
"\n",
"R=yaw@pitch@roll\n",
"print(yaw)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "ac13f413",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8414709848078965"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import math\n",
"math.sin(1)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b656fc03",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}