{"id":47176,"date":"2025-07-30T06:46:48","date_gmt":"2025-07-29T22:46:48","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/47176.html"},"modified":"2025-07-30T06:46:48","modified_gmt":"2025-07-29T22:46:48","slug":"mspm0%e5%bc%80%e5%8f%91%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%ef%bc%9a%e4%ba%8c%e7%bb%b4%e4%ba%91%e5%8f%b0%e7%94%bb%e5%9b%be%ef%bc%882025%e7%94%b5%e8%b5%9b-%e9%99%84%e6%ba%90%e4%bb%a3%e7%a0%81%e5%8f%8a","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/47176.html","title":{"rendered":"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>\u4eca\u5e74\u7684\u7535\u8d5b&#xff08;2025&#xff09;&#xff0c;\u5f88\u591a\u9898\u90fd\u4e0e\u4e91\u53f0\u76f8\u5173&#xff0c;\u56e0\u6b64\u4e3a\u5907\u6218\u7535\u8d5b&#xff0c;\u535a\u4e3b\u8fd9\u8fb9\u4e5f\u662f\u51c6\u5907\u4e86\u4e00\u4e2a\u7531\u4e24\u4e2a42\u6b65\u8fdb\u7535\u673a\u9a71\u52a8\u7684\u4e91\u53f0\u5e76\u63d0\u524d\u8fdb\u884c\u8c03\u8bd5&#xff0c;\u907f\u514d\u8d5b\u9898\u51fa\u6765\u4e4b\u540e\u624b\u5fd9\u811a\u4e71\u7684&#xff0c;\u8fd9\u8fb9\u7684\u4e24\u4e2a42\u6b65\u8fdb\u7535\u673a\u91c7\u7528\u540c\u4e00\u4e2a\u9a71\u52a8\u6a21\u5757\u8fdb\u884c\u9a71\u52a8&#xff08;D36A&#xff09;,\u4e3b\u63a7\u80af\u5b9a\u91c7\u7528MSPM0G3507\u3002\u7136\u540e3D\u6253\u5370\u4e86\u4e00\u4e2a\u4e8c\u7ef4\u4e91\u53f0\u7684\u7ed3\u6784\u5e76\u8fdb\u884c\u7ec4\u88c5\u3002\u672c\u7ae0\u535a\u5ba2\u4e3b\u8981\u662f\u8bb2\u8fd9\u4e2a\u4e91\u53f0\u8fdb\u884c\u7ed8\u56fe\u7684\u601d\u8def\u4ee5\u53ca\u4ee3\u7801\u3002\u6fc0\u5149\u8fd8\u6ca1\u6709\u5b89\u88c5\u4e0a\u53bb&#xff0c;\u76ee\u524d\u53ea\u662f\u4e91\u53f0\u7684\u5faa\u8ff9\u4ee3\u7801<\/p>\n<hr \/>\n<p>\u5982\u679c\u65e0\u6cd5\u5f88\u597d\u7684\u590d\u73b0\u535a\u5ba2\u91cc\u7684\u4ee3\u7801&#xff0c;\u53ef\u4ee5\u79c1\u4fe1\u4f5c\u8005\u535a\u53d6\u6e90\u4ee3\u7801&#xff0c;\u7535\u8d5b\u671f\u95f4\u90fd\u5728\u7ebf<\/p>\n<h2>\u4e00\u3001\u786c\u4ef6\u9009\u62e9<\/h2>\n<p>\u4e3b\u63a7&#xff1a;MSPM0G3507 \u9a71\u52a8&#xff1a;D36A\u53cc\u8def\u6b65\u8fdb\u7535\u673a\u9a71\u52a8 \u7535\u673a&#xff1a;42\u6b65\u8fdb\u7535\u673a*2<\/p>\n<h2>\u4e8c\u3001\u786c\u4ef6\u8fde\u7ebf<\/h2>\n<p>\u786c\u4ef6\u8fde\u7ebf\u90e8\u5206\u5728\u4e0a\u4e00\u7bc7\u535a\u5ba2\u91cc\u9762\u5df2\u7ecf\u8bf4\u8fc7\u4e86&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u53bb\u4e0a\u4e00\u7bc7\u91cc\u9762\u770b&#xff0c;\u8fd9\u8fb9\u9644\u4e0a\u94fe\u63a5 MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0&#xff1a;D36A\u9a71\u52a8\u768442\u6b65\u8fdb\u7535\u673a\u4e8c\u7ef4\u4e91\u53f0&#xff08;2025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e&#xff09;<\/p>\n<h2>\u4e09\u3001\u8f6f\u4ef6\u4ee3\u7801<\/h2>\n<p>\u8f6f\u4ef6\u90e8\u5206\u91c7\u7528C\u8bed\u8a00\u5b9e\u73b0&#xff0c;IDE\u91c7\u7528keil&#xff0c;\u57fa\u4e8e\u9010\u98de\u5e93\u8fdb\u884c\u7f16\u5199 \u8fd9\u8fb9\u5148\u8fdb\u884c\u4e00\u4e0b\u7b80\u5355\u7684\u53c2\u6570\u8bf4\u660e&#xff0c;\u4fbf\u4e8e\u7406\u89e3\u540e\u9762\u7684\u601d\u8def<\/p>\n<table>\n<tr>\u53c2\u6570\u542b\u4e49\u4ee5\u53ca\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>current_x<\/td>\n<td>\u76ee\u524d\u7684X\u5750\u6807<\/td>\n<\/tr>\n<tr>\n<td>current_y<\/td>\n<td>\u76ee\u524d\u7684Y\u5750\u6807<\/td>\n<\/tr>\n<tr>\n<td>target_x<\/td>\n<td>\u9700\u8981\u79fb\u52a8\u5230\u7684X\u5750\u6807<\/td>\n<\/tr>\n<tr>\n<td>target_y<\/td>\n<td>\u9700\u8981\u79fb\u52a8\u5230\u7684Y\u5750\u6807<\/td>\n<\/tr>\n<tr>\n<td>move_x<\/td>\n<td>\u9700\u8981\u79fb\u52a8\u7684X\u8ddd\u79bb<\/td>\n<\/tr>\n<tr>\n<td>move_y<\/td>\n<td>\u9700\u8981\u79fb\u52a8\u7684Y\u8ddd\u79bb<\/td>\n<\/tr>\n<tr>\n<td>point_count<\/td>\n<td>\u7ed8\u5236\u5706\u5f62\u65f6\u5019\u7684\u70b9\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u9a71\u52a8\u2014\u7535\u673a<\/h4>\n<p>\u4ee3\u7801\u5b9e\u73b0\u5982\u4e0b&#xff1a;<\/p>\n<p>\u51fd\u6570\u4e00&#xff1a;\u9650\u5e45\u51fd\u6570<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">define<\/span> <span class=\"token macro-name\">MAX_ANGLE_X<\/span>  <span class=\"token expression\"><span class=\"token number\">1000.0f<\/span>   <\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">define<\/span> <span class=\"token macro-name\">MIN_ANGLE_X<\/span> <span class=\"token expression\"><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1000.0f<\/span>   <\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">define<\/span> <span class=\"token macro-name\">MAX_ANGLE_Y<\/span>  <span class=\"token expression\"><span class=\"token number\">1000.0f<\/span>  <\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">define<\/span> <span class=\"token macro-name\">MIN_ANGLE_Y<\/span> <span class=\"token expression\"><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1000.0f<\/span>  <\/span><\/span><\/p>\n<p><span class=\"token keyword\">float<\/span> <span class=\"token function\">limit_angle<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">float<\/span> angle<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">float<\/span> min<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">float<\/span> max<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>angle <span class=\"token operator\">&lt;<\/span> min<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> min<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>angle <span class=\"token operator\">&gt;<\/span> max<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> max<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> angle<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u51fd\u6570\u4e8c&#xff1a;\u6fc0\u5149\u4e91\u53f0\u7ed8\u5236\u6b63\u65b9\u5f62<\/p>\n<p><span class=\"token comment\">\/\/ Function to draw a square trajectory<\/span><br \/>\n<span class=\"token comment\">\/\/ Parameters:<\/span><br \/>\n<span class=\"token comment\">\/\/   x_len &#8211; length of the square&#039;s X-axis dimension<\/span><br \/>\n<span class=\"token comment\">\/\/   y_len &#8211; length of the square&#039;s Y-axis dimension<\/span><br \/>\n<span class=\"token comment\">\/\/   MOVE_SPEED &#8211; speed of movement between points<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">draw_square<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> x_len<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> y_len<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> MOVE_SPEED<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Structure to store X and Y angle coordinates<\/span><br \/>\n    <span class=\"token keyword\">typedef<\/span> <span class=\"token keyword\">struct<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> x_angle<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ X-axis angle position<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> y_angle<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ Y-axis angle position<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span> Point<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Invert Y-axis length (likely for coordinate system adjustment)<\/span><br \/>\n    y_len <span class=\"token operator\">&#061;<\/span> y_len <span class=\"token operator\">*<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Calculate half-lengths for easier coordinate calculation<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> x_len_2 <span class=\"token operator\">&#061;<\/span> x_len <span class=\"token operator\">\/<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> y_len_2 <span class=\"token operator\">&#061;<\/span> y_len <span class=\"token operator\">\/<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Define square vertices relative to origin (0,0)<\/span><br \/>\n    <span class=\"token comment\">\/\/ Coordinates form a square shape when connected sequentially<\/span><br \/>\n    Point square_points<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">*<\/span> x_len_2<span class=\"token punctuation\">,<\/span> y_len_2<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span>    <span class=\"token comment\">\/\/ Top-left corner<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span>x_len_2<span class=\"token punctuation\">,<\/span> y_len_2<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span>         <span class=\"token comment\">\/\/ Top-right corner<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span>x_len_2<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">*<\/span> y_len_2<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span>    <span class=\"token comment\">\/\/ Bottom-right corner<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">*<\/span> x_len_2<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">*<\/span> y_len_2<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><span class=\"token comment\">\/\/ Bottom-left corner<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">*<\/span> x_len_2<span class=\"token punctuation\">,<\/span> y_len_2<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span>    <span class=\"token comment\">\/\/ Back to top-left to close the square<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token number\">0.0f<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0.0f<\/span><span class=\"token punctuation\">}<\/span>                <span class=\"token comment\">\/\/ Final point: return to origin<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Calculate total number of points in the square trajectory<\/span><br \/>\n    uint8 point_count <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">sizeof<\/span><span class=\"token punctuation\">(<\/span>square_points<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token keyword\">sizeof<\/span><span class=\"token punctuation\">(<\/span>Point<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <\/p>\n<p>    <span class=\"token comment\">\/\/ Initialize current position at origin (0,0)<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> current_x <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> current_y <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Move to each defined point in sequence<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>uint8 i <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> i <span class=\"token operator\">&lt;<\/span> point_count<span class=\"token punctuation\">;<\/span> i<span class=\"token operator\">&#043;&#043;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/ Ensure target angles stay within allowed range<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> target_x <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">limit_angle<\/span><span class=\"token punctuation\">(<\/span>square_points<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>x_angle<span class=\"token punctuation\">,<\/span> MIN_ANGLE_X<span class=\"token punctuation\">,<\/span> MAX_ANGLE_X<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> target_y <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">limit_angle<\/span><span class=\"token punctuation\">(<\/span>square_points<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>y_angle<span class=\"token punctuation\">,<\/span> MIN_ANGLE_Y<span class=\"token punctuation\">,<\/span> MAX_ANGLE_Y<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Calculate relative movement from current position to target<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> move_x <span class=\"token operator\">&#061;<\/span> target_x <span class=\"token operator\">&#8211;<\/span> current_x<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> move_y <span class=\"token operator\">&#061;<\/span> target_y <span class=\"token operator\">&#8211;<\/span> current_y<span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Update current position to target coordinates<\/span><br \/>\n        current_x <span class=\"token operator\">&#061;<\/span> target_x<span class=\"token punctuation\">;<\/span><br \/>\n        current_y <span class=\"token operator\">&#061;<\/span> target_y<span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Send movement command to both axes<\/span><br \/>\n        <span class=\"token function\">d36a_set_angle_both<\/span><span class=\"token punctuation\">(<\/span>move_x<span class=\"token punctuation\">,<\/span> move_y<span class=\"token punctuation\">,<\/span> MOVE_SPEED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Pause 300ms after reaching each point<\/span><br \/>\n        <span class=\"token function\">system_delay_ms<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">300<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Pause 2 seconds after completing the square<\/span><br \/>\n    <span class=\"token function\">system_delay_ms<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4e00\u3001\u51fd\u6570\u5b9a\u4e49&#xff1a;draw_square\u51fd\u6570\u63a5\u6536\u4e09\u4e2a\u53c2\u6570&#xff0c;\u5206\u522b\u662f\u6b63\u65b9\u5f62\u7684 X \u8f74\u957f\u5ea6&#xff08;x_len&#xff09;\u3001Y \u8f74\u957f\u5ea6&#xff08;y_len&#xff09;\u548c\u79fb\u52a8\u901f\u5ea6&#xff08;MOVE_SPEED&#xff09;\u3002 \u4e8c\u3001\u6570\u636e\u7ed3\u6784&#xff1a;\u5b9a\u4e49\u4e86Point\u7ed3\u6784\u4f53\u7528\u4e8e\u5b58\u50a8\u5750\u6807\u70b9\u7684 X \u548c Y \u89d2\u5ea6\u503c\u3002 \u4e09\u3001\u5750\u6807\u5904\u7406&#xff1a; 1\u3001\u5c06 Y \u8f74\u957f\u5ea6\u53d6\u8d1f\u503c&#xff08;\u4e3a\u4e86\u8c03\u6574\u5750\u6807\u7cfb\u65b9\u5411&#xff09; 2\u3001\u8ba1\u7b97\u534a\u957f&#xff08;x_len_2, y_len_2&#xff09;&#xff0c;\u7528\u4e8e\u786e\u5b9a\u6b63\u65b9\u5f62\u9876\u70b9\u5750\u6807 3\u3001\u5750\u6807\u5b9a\u4e49&#xff1a;\u5b9a\u4e49\u4e86\u6b63\u65b9\u5f62\u7684 4 \u4e2a\u9876\u70b9\u5750\u6807\u548c\u539f\u70b9&#xff08;0,0&#xff09;\u5750\u6807\u4ee5\u4e2d\u5fc3\u70b9\u4e3a\u539f\u70b9&#xff0c;\u901a\u8fc7\u534a\u957f\u8ba1\u7b97\u5f97\u51fa\u56db\u4e2a\u9876\u70b9\u4f4d\u7f6e 4\u3001\u6700\u540e\u56de\u5230\u4e00\u4e2a\u70b9 (0,0) \u7528\u4e8e\u56de\u5230\u8d77\u70b9 \u56db\u3001\u7ed8\u5236\u903b\u8f91&#xff1a; 1\u3001\u904d\u5386\u6240\u6709\u5b9a\u4e49\u7684\u5750\u6807\u70b9 2\u3001\u5bf9\u6bcf\u4e2a\u76ee\u6807\u70b9\u8fdb\u884c\u89d2\u5ea6\u9650\u5236&#xff08;\u901a\u8fc7limit_angle\u51fd\u6570\u786e\u4fdd\u5728\u6709\u6548\u8303\u56f4\u5185&#xff09; 3\u3001\u8ba1\u7b97\u5f53\u524d\u4f4d\u7f6e\u5230\u76ee\u6807\u70b9\u7684\u79fb\u52a8\u91cf 4\u3001\u8c03\u7528d36a_set_angle_both\u51fd\u6570\u79fb\u52a8\u5230\u76ee\u6807\u70b9&#xff08;\u540c\u65f6\u8bbe\u7f6e X \u548c Y \u65b9\u5411\u89d2\u5ea6&#xff09; 5\u3001\u6bcf\u4e2a\u70b9\u79fb\u52a8\u540e\u5ef6\u8fdf 300 \u6beb\u79d2&#xff0c;\u7ed8\u5236\u5b8c\u6210\u540e\u5ef6\u8fdf 2000 \u6beb\u79d2<\/p>\n<p>\u51fd\u6570\u4e09&#xff1a;\u6fc0\u5149\u4e91\u53f0\u7ed8\u5236\u5706\u5f62<\/p>\n<p><span class=\"token comment\">\/\/ Function to draw a circle trajectory<\/span><br \/>\n<span class=\"token comment\">\/\/ Parameters:<\/span><br \/>\n<span class=\"token comment\">\/\/   r &#8211; radius of the circle<\/span><br \/>\n<span class=\"token comment\">\/\/   MOVE_SPEED &#8211; speed of movement between points<\/span><br \/>\n<span class=\"token comment\">\/\/   point_count &#8211; number of points to use for drawing the circle (more &#061; smoother)<\/span><br \/>\n<span class=\"token keyword\">void<\/span> <span class=\"token function\">draw_circle<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> r<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> MOVE_SPEED<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">const<\/span> uint8 point_count<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Structure to store X and Y angle coordinates<\/span><br \/>\n    <span class=\"token keyword\">typedef<\/span> <span class=\"token keyword\">struct<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> x_angle<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ X-axis angle position<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> y_angle<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ Y-axis angle position<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span> Point<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Array to store circle points (extra element to close the loop)<\/span><br \/>\n    Point circle_points<span class=\"token punctuation\">[<\/span>point_count <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span>  <\/p>\n<p>    <span class=\"token comment\">\/\/ Calculate coordinates for each point on the circle<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>uint8 i <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> i <span class=\"token operator\">&lt;<\/span> point_count<span class=\"token punctuation\">;<\/span> i<span class=\"token operator\">&#043;&#043;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/ Convert angle from degrees to radians (full circle &#061; 2\u03c0 radians)<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> rad <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">2<\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">3.1415926f<\/span> <span class=\"token operator\">*<\/span> i <span class=\"token operator\">\/<\/span> point_count<span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Calculate X and Y positions using trigonometric functions<\/span><br \/>\n        <span class=\"token comment\">\/\/ cosine for X-axis, sine for Y-axis to form circular path<\/span><br \/>\n        circle_points<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>x_angle <span class=\"token operator\">&#061;<\/span> r <span class=\"token operator\">*<\/span> <span class=\"token function\">cosf<\/span><span class=\"token punctuation\">(<\/span>rad<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        circle_points<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>y_angle <span class=\"token operator\">&#061;<\/span> r <span class=\"token operator\">*<\/span> <span class=\"token function\">sinf<\/span><span class=\"token punctuation\">(<\/span>rad<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token comment\">\/\/ Close the circle by duplicating the first point as the last point<\/span><br \/>\n    circle_points<span class=\"token punctuation\">[<\/span>point_count<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> circle_points<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Initialize current position at origin (0,0)<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> current_x <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0.0f<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> current_y <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0.0f<\/span><span class=\"token punctuation\">;<\/span> <\/p>\n<p>    <span class=\"token comment\">\/\/ Move to each calculated point in sequence<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>uint8 i <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> i <span class=\"token operator\">&lt;&#061;<\/span> point_count<span class=\"token punctuation\">;<\/span> i<span class=\"token operator\">&#043;&#043;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/ Ensure target angles stay within allowed range<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> target_x <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">limit_angle<\/span><span class=\"token punctuation\">(<\/span>circle_points<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>x_angle<span class=\"token punctuation\">,<\/span> MIN_ANGLE_X<span class=\"token punctuation\">,<\/span> MAX_ANGLE_X<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> target_y <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">limit_angle<\/span><span class=\"token punctuation\">(<\/span>circle_points<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>y_angle<span class=\"token punctuation\">,<\/span> MIN_ANGLE_Y<span class=\"token punctuation\">,<\/span> MAX_ANGLE_Y<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Calculate relative movement from current position to target<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> move_x <span class=\"token operator\">&#061;<\/span> target_x <span class=\"token operator\">&#8211;<\/span> current_x<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">float<\/span> move_y <span class=\"token operator\">&#061;<\/span> target_y <span class=\"token operator\">&#8211;<\/span> current_y<span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Update current position to target<\/span><br \/>\n        current_x <span class=\"token operator\">&#061;<\/span> target_x<span class=\"token punctuation\">;<\/span><br \/>\n        current_y <span class=\"token operator\">&#061;<\/span> target_y<span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Send movement command to both axes<\/span><br \/>\n        <span class=\"token function\">d36a_set_angle_both<\/span><span class=\"token punctuation\">(<\/span>move_x<span class=\"token punctuation\">,<\/span> move_y<span class=\"token punctuation\">,<\/span> MOVE_SPEED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ Optional delay between point movements<\/span><br \/>\n        <span class=\"token comment\">\/\/ system_delay_ms(10);<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Return to origin (0,0) after completing the circle<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> target_x <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> target_y <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Calculate movement from last circle point to origin<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> move_x <span class=\"token operator\">&#061;<\/span> target_x <span class=\"token operator\">&#8211;<\/span> current_x<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">float<\/span> move_y <span class=\"token operator\">&#061;<\/span> target_y <span class=\"token operator\">&#8211;<\/span> current_y<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Update current position to origin<\/span><br \/>\n    current_x <span class=\"token operator\">&#061;<\/span> target_x<span class=\"token punctuation\">;<\/span><br \/>\n    current_y <span class=\"token operator\">&#061;<\/span> target_y<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Send final movement command to return to origin<\/span><br \/>\n    <span class=\"token function\">d36a_set_angle_both<\/span><span class=\"token punctuation\">(<\/span>move_x<span class=\"token punctuation\">,<\/span> move_y<span class=\"token punctuation\">,<\/span> MOVE_SPEED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ Pause for 2 seconds after completing the circle<\/span><br \/>\n    <span class=\"token function\">system_delay_ms<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u901a\u8fc7\u4e09\u89d2\u51fd\u6570&#xff08;X \u8f74\u7528\u4f59\u5f26\u3001Y \u8f74\u7528\u6b63\u5f26&#xff09;\u8ba1\u7b97\u5706\u5468\u4e0a\u6307\u5b9a\u6570\u91cf\u7684\u70b9\u7684\u5750\u6807&#xff0c;\u8fd9\u4e9b\u70b9\u57fa\u4e8e\u5706\u5468\u7684\u7b49\u89d2\u5ea6\u589e\u91cf\u5206\u5e03\u3002\u51fd\u6570\u4f1a\u6309\u987a\u5e8f\u5728\u8fd9\u4e9b\u70b9\u4e4b\u95f4\u79fb\u52a8&#xff08;\u5e26\u901f\u5ea6\u63a7\u5236&#xff09;&#xff0c;\u540c\u65f6\u786e\u4fdd\u89d2\u5ea6\u5728\u6709\u6548\u8303\u56f4\u5185&#xff1b;\u901a\u8fc7\u56de\u5230\u7b2c\u4e00\u4e2a\u70b9\u6765\u95ed\u5408\u5706\u5f62\u8f68\u8ff9&#xff0c;\u6700\u540e\u8fd4\u56de\u539f\u70b9&#xff0c;\u7ed3\u675f\u65f6\u77ed\u6682\u6682\u505c\u3002\u70b9\u7684\u6570\u91cf\u8d8a\u591a&#xff0c;\u7ed8\u5236\u7684\u5706\u8d8a\u5e73\u6ed1\u3002 \u4ee5\u4e0b\u662f\u51fd\u6570\u4e2d\u6d89\u53ca\u7684\u516c\u5f0f&#xff1a;<\/p>\n<li>\u5f27\u5ea6\u8ba1\u7b97&#xff08;\u5c06\u5706\u5468\u7b49\u5206\u4e3a\u6307\u5b9a\u6570\u91cf\u7684\u70b9&#xff09; <span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">\n<p>          rad<\/p>\n<p>          &#061;<\/p>\n<p>          2<\/p>\n<p>          \u00d7<\/p>\n<p>          \u03c0<\/p>\n<p>          \u00d7<\/p>\n<p>           i<\/p>\n<p>           point_count<\/p>\n<p>          \\\\text{rad} &#061; 2 \\\\times \\\\pi \\\\times \\\\frac{i}{\\\\text{point\\\\_count}} <\/p>\n<p>      <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6944em\"><\/span><span class=\"mord text\"><span class=\"mord\">rad<\/span><\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7278em;vertical-align: -0.0833em\"><\/span><span class=\"mord\">2<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.6667em;vertical-align: -0.0833em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">\u03c0<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 2.3325em;vertical-align: -0.996em\"><\/span><span class=\"mord\"><span class=\"mopen nulldelimiter\"><\/span><span class=\"mfrac\"><span class=\"vlist-t vlist-t2\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 1.3365em\"><span class=\"\" style=\"top: -2.314em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"mord\"><span class=\"mord text\"><span class=\"mord\">point_count<\/span><\/span><\/span><\/span><span class=\"\" style=\"top: -3.23em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"frac-line\" style=\"border-bottom-width: 0.04em\"><\/span><\/span><span class=\"\" style=\"top: -3.677em\"><span class=\"pstrut\" style=\"height: 3em\"><\/span><span class=\"mord\"><span class=\"mord mathnormal\">i<\/span><\/span><\/span><\/span><span class=\"vlist-s\">\u200b<\/span><\/span><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.996em\"><span class=\"\"><\/span><\/span><\/span><\/span><\/span><span class=\"mclose nulldelimiter\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span> \u5176\u4e2d&#xff0c;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>         i<\/p>\n<p>        i<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6595em\"><\/span><span class=\"mord mathnormal\">i<\/span><\/span><\/span><\/span><\/span> \u4e3a\u5f53\u524d\u70b9\u7684\u7d22\u5f15&#xff08;0 \u5230 point_count-1&#xff09;&#xff0c;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>         point_count<\/p>\n<p>        \\\\text{point\\\\_count}<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.9779em;vertical-align: -0.31em\"><\/span><span class=\"mord text\"><span class=\"mord\">point_count<\/span><\/span><\/span><\/span><\/span><\/span> \u4e3a\u5706\u5468\u4e0a\u7684\u603b\u70b9\u6570&#xff0c;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>         rad<\/p>\n<p>        \\\\text{rad}<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6944em\"><\/span><span class=\"mord text\"><span class=\"mord\">rad<\/span><\/span><\/span><\/span><\/span><\/span> \u4e3a\u5bf9\u5e94\u89d2\u5ea6\u7684\u5f27\u5ea6\u503c\u3002<\/li>\n<li>X\u8f74\u5750\u6807\u8ba1\u7b97 <span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">\n<p>          x<\/p>\n<p>          _<\/p>\n<p>          a<\/p>\n<p>          n<\/p>\n<p>          g<\/p>\n<p>          l<\/p>\n<p>          e<\/p>\n<p>          &#061;<\/p>\n<p>          r<\/p>\n<p>          \u00d7<\/p>\n<p>          cos<\/p>\n<p>          \u2061<\/p>\n<p>          (<\/p>\n<p>          rad<\/p>\n<p>          )<\/p>\n<p>          x\\\\_angle &#061; r \\\\times \\\\cos(\\\\text{rad}) <\/p>\n<p>      <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1.0044em;vertical-align: -0.31em\"><\/span><span class=\"mord mathnormal\">x<\/span><span class=\"mord\" style=\"margin-right: 0.0278em\">_<\/span><span class=\"mord mathnormal\">an<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">g<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0197em\">l<\/span><span class=\"mord mathnormal\">e<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.6667em;vertical-align: -0.0833em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0278em\">r<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mop\">cos<\/span><span class=\"mopen\">(<\/span><span class=\"mord text\"><span class=\"mord\">rad<\/span><\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span><\/span> \u5176\u4e2d&#xff0c;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>         r<\/p>\n<p>        r<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.4306em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0278em\">r<\/span><\/span><\/span><\/span><\/span> \u4e3a\u5706\u7684\u534a\u5f84&#xff0c;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>         cos<\/p>\n<p>         \u2061<\/p>\n<p>         (<\/p>\n<p>         rad<\/p>\n<p>         )<\/p>\n<p>        \\\\cos(\\\\text{rad})<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mop\">cos<\/span><span class=\"mopen\">(<\/span><span class=\"mord text\"><span class=\"mord\">rad<\/span><\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span> \u4e3a\u5f27\u5ea6\u5bf9\u5e94\u7684\u4f59\u5f26\u503c\u3002<\/li>\n<li>Y\u8f74\u5750\u6807\u8ba1\u7b97 <span class=\"katex--display\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">\n<p>          y<\/p>\n<p>          _<\/p>\n<p>          a<\/p>\n<p>          n<\/p>\n<p>          g<\/p>\n<p>          l<\/p>\n<p>          e<\/p>\n<p>          &#061;<\/p>\n<p>          r<\/p>\n<p>          \u00d7<\/p>\n<p>          sin<\/p>\n<p>          \u2061<\/p>\n<p>          (<\/p>\n<p>          rad<\/p>\n<p>          )<\/p>\n<p>          y\\\\_angle &#061; r \\\\times \\\\sin(\\\\text{rad}) <\/p>\n<p>      <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1.0044em;vertical-align: -0.31em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">y<\/span><span class=\"mord\" style=\"margin-right: 0.0278em\">_<\/span><span class=\"mord mathnormal\">an<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">g<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0197em\">l<\/span><span class=\"mord mathnormal\">e<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.6667em;vertical-align: -0.0833em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0278em\">r<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><span class=\"mbin\">\u00d7<\/span><span class=\"mspace\" style=\"margin-right: 0.2222em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mop\">sin<\/span><span class=\"mopen\">(<\/span><span class=\"mord text\"><span class=\"mord\">rad<\/span><\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span><\/span> \u5176\u4e2d&#xff0c;<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\"><\/p>\n<p>         sin<\/p>\n<p>         \u2061<\/p>\n<p>         (<\/p>\n<p>         rad<\/p>\n<p>         )<\/p>\n<p>        \\\\sin(\\\\text{rad})<\/p>\n<p>     <\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1em;vertical-align: -0.25em\"><\/span><span class=\"mop\">sin<\/span><span class=\"mopen\">(<\/span><span class=\"mord text\"><span class=\"mord\">rad<\/span><\/span><span class=\"mclose\">)<\/span><\/span><\/span><\/span><\/span> \u4e3a\u5f27\u5ea6\u5bf9\u5e94\u7684\u6b63\u5f26\u503c\u3002<\/li>\n<h2>\u56db\u3001\u603b\u7ed3<\/h2>\n<p>\u8fd9\u8fb9\u7ed9\u7684\u90fd\u662f\u4e00\u4e9b\u7b80\u5355\u56fe\u5f62\u7684\u7ed8\u5236\u4ee3\u7801&#xff0c;\u4f46\u662f\u601d\u8def\u90fd\u662f\u901a\u7528\u7684&#xff0c;\u590d\u6742\u56fe\u5f62\u4e5f\u53ef\u4ee5\u590d\u7528\u8fd9\u4e00\u5957\u903b\u8f91\u3002\u5927\u5bb6\u53c2\u8003\u53c2\u8003\u5c31\u597d<\/p>\n<p>\u5982\u679c\u65e0\u6cd5\u5f88\u597d\u7684\u590d\u73b0\u535a\u5ba2\u91cc\u7684\u4ee3\u7801&#xff0c;\u53ef\u4ee5\u79c1\u4fe1\u4f5c\u8005\u535a\u53d6\u6e90\u4ee3\u7801&#xff0c;\u7535\u8d5b\u671f\u95f4\u90fd\u5728\u7ebf<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb276\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u57fa\u4e8eMSPM0G3507\u4e3b\u63a7\u548cD36A\u9a71\u52a8\u768442\u6b65\u8fdb\u7535\u673a\u4e8c\u7ef4\u4e91\u53f0\u7cfb\u7edf\u5f00\u53d1\u8fc7\u7a0b\uff0c\u91cd\u70b9\u8bb2\u89e3\u4e86\u7ed8\u56fe\u529f\u80fd\u7684\u8f6f\u4ef6\u5b9e\u73b0\u3002\u786c\u4ef6\u91c7\u7528\u53cc\u6b65\u8fdb\u7535\u673a\u9a71\u52a8\u65b9\u6848\uff0c\u901a\u8fc73D\u6253\u5370\u7ed3\u6784\u7ec4\u88c5\u6210\u4e8c\u7ef4\u4e91\u53f0\u3002\u8f6f\u4ef6\u90e8\u5206\u4f7f\u7528C\u8bed\u8a00\u5f00\u53d1\uff0c\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u51fd\u6570\uff1a\u9650\u5e45\u51fd\u6570\u786e\u4fdd\u89d2\u5ea6\u8303\u56f4\u5b89\u5168\uff0c\u6b63\u65b9\u5f62\u7ed8\u5236\u51fd\u6570\u901a\u8fc7\u5b9a\u4e49\u9876\u70b9\u5750\u6807\u5b9e\u73b0\u8f68\u8ff9\u89c4\u5212\uff0c\u5706\u5f62\u7ed8\u5236\u51fd\u6570\u5229\u7528\u4e09\u89d2\u51fd\u6570\u8ba1\u7b97\u5706\u5468\u70b9\u5750\u6807\u3002\u4e24\u4e2a\u7ed8\u56fe\u51fd\u6570\u90fd\u652f\u6301\u81ea\u5b9a\u4e49\u5c3a\u5bf8\u548c\u901f\u5ea6\u53c2\u6570\uff0c\u5e76\u5305\u542b\u56de\u5230\u539f\u70b9\u529f\u80fd\u3002\u7cfb\u7edf\u4e3a2025\u5e74\u7535\u5b50\u8bbe\u8ba1\u7ade\u8d5b\u505a\u51c6\u5907\uff0c\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u6e90\u4ee3\u7801\u548c\u5f15\u811a\u914d\u7f6e\u53c2\u8003\uff0c\u53ef\u5b9e\u73b0\u57fa\u672c\u7684\u4e91\u53f0\u5faa\u8ff9\u529f\u80fd\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4519,270,371,305],"topic":[],"class_list":["post-47176","post","type-post","status-publish","format-standard","hentry","category-server","tag-mspm0","tag-270","tag-371","tag-305"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/47176.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb276\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u57fa\u4e8eMSPM0G3507\u4e3b\u63a7\u548cD36A\u9a71\u52a8\u768442\u6b65\u8fdb\u7535\u673a\u4e8c\u7ef4\u4e91\u53f0\u7cfb\u7edf\u5f00\u53d1\u8fc7\u7a0b\uff0c\u91cd\u70b9\u8bb2\u89e3\u4e86\u7ed8\u56fe\u529f\u80fd\u7684\u8f6f\u4ef6\u5b9e\u73b0\u3002\u786c\u4ef6\u91c7\u7528\u53cc\u6b65\u8fdb\u7535\u673a\u9a71\u52a8\u65b9\u6848\uff0c\u901a\u8fc73D\u6253\u5370\u7ed3\u6784\u7ec4\u88c5\u6210\u4e8c\u7ef4\u4e91\u53f0\u3002\u8f6f\u4ef6\u90e8\u5206\u4f7f\u7528C\u8bed\u8a00\u5f00\u53d1\uff0c\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u51fd\u6570\uff1a\u9650\u5e45\u51fd\u6570\u786e\u4fdd\u89d2\u5ea6\u8303\u56f4\u5b89\u5168\uff0c\u6b63\u65b9\u5f62\u7ed8\u5236\u51fd\u6570\u901a\u8fc7\u5b9a\u4e49\u9876\u70b9\u5750\u6807\u5b9e\u73b0\u8f68\u8ff9\u89c4\u5212\uff0c\u5706\u5f62\u7ed8\u5236\u51fd\u6570\u5229\u7528\u4e09\u89d2\u51fd\u6570\u8ba1\u7b97\u5706\u5468\u70b9\u5750\u6807\u3002\u4e24\u4e2a\u7ed8\u56fe\u51fd\u6570\u90fd\u652f\u6301\u81ea\u5b9a\u4e49\u5c3a\u5bf8\u548c\u901f\u5ea6\u53c2\u6570\uff0c\u5e76\u5305\u542b\u56de\u5230\u539f\u70b9\u529f\u80fd\u3002\u7cfb\u7edf\u4e3a2025\u5e74\u7535\u5b50\u8bbe\u8ba1\u7ade\u8d5b\u505a\u51c6\u5907\uff0c\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u6e90\u4ee3\u7801\u548c\u5f15\u811a\u914d\u7f6e\u53c2\u8003\uff0c\u53ef\u5b9e\u73b0\u57fa\u672c\u7684\u4e91\u53f0\u5faa\u8ff9\u529f\u80fd\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/47176.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-29T22:46:48+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47176.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/47176.html\",\"name\":\"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-29T22:46:48+00:00\",\"dateModified\":\"2025-07-29T22:46:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/47176.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/47176.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47176.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/47176.html","og_locale":"zh_CN","og_type":"article","og_title":"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb276\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u57fa\u4e8eMSPM0G3507\u4e3b\u63a7\u548cD36A\u9a71\u52a8\u768442\u6b65\u8fdb\u7535\u673a\u4e8c\u7ef4\u4e91\u53f0\u7cfb\u7edf\u5f00\u53d1\u8fc7\u7a0b\uff0c\u91cd\u70b9\u8bb2\u89e3\u4e86\u7ed8\u56fe\u529f\u80fd\u7684\u8f6f\u4ef6\u5b9e\u73b0\u3002\u786c\u4ef6\u91c7\u7528\u53cc\u6b65\u8fdb\u7535\u673a\u9a71\u52a8\u65b9\u6848\uff0c\u901a\u8fc73D\u6253\u5370\u7ed3\u6784\u7ec4\u88c5\u6210\u4e8c\u7ef4\u4e91\u53f0\u3002\u8f6f\u4ef6\u90e8\u5206\u4f7f\u7528C\u8bed\u8a00\u5f00\u53d1\uff0c\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u51fd\u6570\uff1a\u9650\u5e45\u51fd\u6570\u786e\u4fdd\u89d2\u5ea6\u8303\u56f4\u5b89\u5168\uff0c\u6b63\u65b9\u5f62\u7ed8\u5236\u51fd\u6570\u901a\u8fc7\u5b9a\u4e49\u9876\u70b9\u5750\u6807\u5b9e\u73b0\u8f68\u8ff9\u89c4\u5212\uff0c\u5706\u5f62\u7ed8\u5236\u51fd\u6570\u5229\u7528\u4e09\u89d2\u51fd\u6570\u8ba1\u7b97\u5706\u5468\u70b9\u5750\u6807\u3002\u4e24\u4e2a\u7ed8\u56fe\u51fd\u6570\u90fd\u652f\u6301\u81ea\u5b9a\u4e49\u5c3a\u5bf8\u548c\u901f\u5ea6\u53c2\u6570\uff0c\u5e76\u5305\u542b\u56de\u5230\u539f\u70b9\u529f\u80fd\u3002\u7cfb\u7edf\u4e3a2025\u5e74\u7535\u5b50\u8bbe\u8ba1\u7ade\u8d5b\u505a\u51c6\u5907\uff0c\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u6e90\u4ee3\u7801\u548c\u5f15\u811a\u914d\u7f6e\u53c2\u8003\uff0c\u53ef\u5b9e\u73b0\u57fa\u672c\u7684\u4e91\u53f0\u5faa\u8ff9\u529f\u80fd\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/47176.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-29T22:46:48+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/47176.html","url":"https:\/\/www.wsisp.com\/helps\/47176.html","name":"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-29T22:46:48+00:00","dateModified":"2025-07-29T22:46:48+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/47176.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/47176.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/47176.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"MSPM0\u5f00\u53d1\u5b66\u4e60\u7b14\u8bb0\uff1a\u4e8c\u7ef4\u4e91\u53f0\u753b\u56fe\uff082025\u7535\u8d5b \u9644\u6e90\u4ee3\u7801\u53ca\u5f15\u811a\u914d\u7f6e\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/47176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=47176"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/47176\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=47176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=47176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=47176"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=47176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}