From 38efea138079d6b9e24156922ed7e70c29ae48a8 Mon Sep 17 00:00:00 2001 From: bobo339 <3219323925@qq.com> Date: Thu, 19 Dec 2024 23:34:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BA=86=E9=83=A8=E5=88=86=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译并更新了部分注释 --- .../third-party/odrSpiral/odrSpiral.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp b/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp index a9dc48f9d5..f13a6f3ba0 100644 --- a/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp +++ b/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp @@ -1,10 +1,9 @@ /* =================================================== - * file: odrSpiral.c + * 文件名:odrSpiral.c * --------------------------------------------------- - * purpose: free method for computing spirals - * in OpenDRIVE applications + * 目的:用于计算OpenDRIVE应用程序中螺旋线的免费方法 * --------------------------------------------------- - * using methods of CEPHES library + * 使用CEPHES库的方法。 * --------------------------------------------------- * first edit: 09.03.2010 by M. Dupuis @ VIRES GmbH * last mod.: 09.03.2010 by M. Dupuis @ VIRES GmbH @@ -34,16 +33,17 @@ the interpretation of OpenDRIVE spiral data. */ -/* ====== INCLUSIONS ====== */ +/* ====== 头文件包含 ====== */ #include -// Edit to original file----- -#define _USE_MATH_DEFINES // Enable windows compatibility +// 对原文件的编辑----- +#define _USE_MATH_DEFINES // 启用与Windows的兼容性 // -------------------------- #include -/* ====== LOCAL VARIABLES ====== */ +/* ====== 局部变量 ======*/ -/* S(x) for small x */ +/* 小 x 值对应的 S(x)*/ +// 定义一个静态双精度数组sn,用于存储特定的数值,这些数值可能会在后续计算S(x)(小x值情况)时用到 static double sn[6] = { -2.99181919401019853726E3, 7.08840045257738576863E5, @@ -52,6 +52,7 @@ static double sn[6] = { -4.42979518059697779103E10, 3.18016297876567817986E11, }; +// 定义一个静态双精度数组sd,同样用于后续相关计算(可能是配合sn一起用于S(x)的计算等) static double sd[6] = { /* 1.00000000000000000000E0,*/ 2.81376268889994315696E2,