Take the interface formulas from the library, now written as math

The library writes its formulas between dollar signs, so the catalogue
generated from it carries them that way and the interface documentation
draws them as mathematics. Eighty-eight of them, in both languages.

Two things this confirms about the change made here. The reader that
guessed whether a code block held a formula has gone, and with it the
defect that led to removing it: a Rust example in a doc comment, in a
fence with no language on it and holding an equals sign, was being drawn
as a formula. It is drawn as a code block again, which is what it is.

The check on the formulas was looking for a script marker anywhere in
the text a page draws, which reported the escaped underscore of
`\text{body\_radius}` as an unattached subscript. It looks for the marker
where it would actually mean that, as an operator left in the output, and
the escaped underscore is what it is: the name of a parameter, drawn as it
was written.
This commit is contained in:
dev 2026-10-02 12:56:00 +08:00
parent f117f20930
commit c869a2145d
1 changed files with 46 additions and 46 deletions

View File

@ -1619,8 +1619,8 @@
"kind": "fn",
"name": "to_cartesian",
"signature": "pub fn to_cartesian(self, ellipsoid: Ellipsoid) -> Vec3 {",
"doc": "Converts this geodetic position to Earth-fixed Cartesian coordinates\non the given ellipsoid.\n\nThe frame has its third axis along the ellipsoid's minor axis through\nthe north pole, its first axis through the intersection of the\nequator and the prime meridian, and its second axis completing a\nright-handed set. The result is in meters.\n\nThe closed form is\n\n```text\nN = a / sqrt(1 - e^2 sin^2(lat))\nx = (N + h) cos(lat) cos(lon)\ny = (N + h) cos(lat) sin(lon)\nz = (N (1 - e^2) + h) sin(lat)\n```\n\nwhere `N` is the prime vertical radius of curvature. This form is\nexact everywhere, including at the poles, where the cosine factors\nvanish.",
"doc_zh": "把该大地位置转换为给定椭球上的地固笛卡尔坐标。\n\n该系的第三轴沿椭球短轴指向北极,第一轴过赤道与本初子午线之交,第二轴构成\n右手系。结果单位为米。\n\n闭式解为\n\n```text\nN = a / sqrt(1 - e^2 sin^2(lat))\nx = (N + h) cos(lat) cos(lon)\ny = (N + h) cos(lat) sin(lon)\nz = (N (1 - e^2) + h) sin(lat)\n```\n\n其中 `N` 为卯酉圈曲率半径。该形式处处精确,包括余弦因子为零的极点。",
"doc": "Converts this geodetic position to Earth-fixed Cartesian coordinates\non the given ellipsoid.\n\nThe frame has its third axis along the ellipsoid's minor axis through\nthe north pole, its first axis through the intersection of the\nequator and the prime meridian, and its second axis completing a\nright-handed set. The result is in meters.\n\nThe closed form is\n\n<div>\n$$\n\\begin{aligned}\nN &= \\frac{a}{\\sqrt{1 - e^2 \\sin^2\\varphi}} \\\\\nx &= (N + h) \\cos\\varphi \\cos\\lambda \\\\\ny &= (N + h) \\cos\\varphi \\sin\\lambda \\\\\nz &= \\left(N(1 - e^2) + h\\right) \\sin\\varphi\n\\end{aligned}\n$$\n</div>\n\nwhere `N` is the prime vertical radius of curvature. This form is\nexact everywhere, including at the poles, where the cosine factors\nvanish.",
"doc_zh": "把该大地位置转换为给定椭球上的地固笛卡尔坐标。\n\n该系的第三轴沿椭球短轴指向北极,第一轴过赤道与本初子午线之交,第二轴构成\n右手系。结果单位为米。\n\n闭式解为\n\n<div>\n$$\n\\begin{aligned}\nN &= \\frac{a}{\\sqrt{1 - e^2 \\sin^2\\varphi}} \\\\\nx &= (N + h) \\cos\\varphi \\cos\\lambda \\\\\ny &= (N + h) \\cos\\varphi \\sin\\lambda \\\\\nz &= \\left(N(1 - e^2) + h\\right) \\sin\\varphi\n\\end{aligned}\n$$\n</div>\n\n其中 `N` 为卯酉圈曲率半径。该形式处处精确,包括余弦因子为零的极点。",
"associated": true
},
{
@ -2459,8 +2459,8 @@
"kind": "fn",
"name": "unkozai_mean_motion",
"signature": "pub fn unkozai_mean_motion( mean_motion: f64, eccentricity: f64, inclination: f64, model: GravityModel, ) -> f64 {",
"doc": "Applies the Kozai to Brouwer mean motion correction.\n\nThe mean motion in an element set is a Kozai mean motion, which the\ntheory must convert to a Brouwer mean motion before use. Writing `no` for\nthe element set value and `xke` for the Kepler constant, the reference\nimplementation evaluates\n\n```text\nak = (xke / no)^(2/3)\nd1 = 0.75 j2 (3 cos^2 i - 1) / (sqrt(1 - e^2) (1 - e^2))\ndel = d1 / ak^2\nadel = ak (1 - del^2 - del (1/3 + 134 del^2 / 81))\ndel = d1 / adel^2\nn0 = no / (1 + del)\n```\n\nThe second evaluation of `del` uses `adel` rather than `ak`, which is\nwhat makes the correction consistent with the semi-major axis implied by\nthe corrected mean motion.\n\nSource: Vallado et al., *Revisiting Spacetrack Report #3*, AIAA\n2006-6753, 2006.",
"doc_zh": "施加从 Kozai 平运动到 Brouwer 平运动的修正。\n\n根数集中的平运动是 Kozai 平运动,理论须先把它换算为 Brouwer 平运动方能\n使用。以 `no` 表示根数集给出的值、`xke` 表示开普勒常数,参考实现按下式\n求值:\n\n```text\nak = (xke / no)^(2/3)\nd1 = 0.75 j2 (3 cos^2 i - 1) / (sqrt(1 - e^2) (1 - e^2))\ndel = d1 / ak^2\nadel = ak (1 - del^2 - del (1/3 + 134 del^2 / 81))\ndel = d1 / adel^2\nn0 = no / (1 + del)\n```\n\n第二次求 `del` 用的是 `adel` 而非 `ak`,这正是该修正与修正后平运动所隐含\n的半长轴相一致的原因。\n\n出处:Vallado 等,*Revisiting Spacetrack Report #3*,AIAA 2006-6753,2006。",
"doc": "Applies the Kozai to Brouwer mean motion correction.\n\nThe mean motion in an element set is a Kozai mean motion, which the\ntheory must convert to a Brouwer mean motion before use. Writing `no` for\nthe element set value and `xke` for the Kepler constant, the reference\nimplementation evaluates\n\n<div>\n$$\n\\begin{aligned}\n\\text{ak} &= (\\text{xke} / \\text{no})^{2/3} \\\\\n\\text{d1} &= \\frac{0.75\\, j_2\\,(3 \\cos^2 i - 1)}{\\sqrt{1 - e^2}\\,(1 - e^2)} \\\\\n\\text{del} &= \\text{d1} / \\text{ak}^2 \\\\\n\\text{adel} &= \\text{ak}\\left(1 - \\text{del}^2 - \\text{del}\\left(\\tfrac{1}{3} + \\tfrac{134\\,\\text{del}^2}{81}\\right)\\right) \\\\\n\\text{del} &= \\text{d1} / \\text{adel}^2 \\\\\nn_0 &= \\text{no} / (1 + \\text{del})\n\\end{aligned}\n$$\n</div>\n\nThe second evaluation of `del` uses `adel` rather than `ak`, which is\nwhat makes the correction consistent with the semi-major axis implied by\nthe corrected mean motion.\n\nSource: Vallado et al., *Revisiting Spacetrack Report #3*, AIAA\n2006-6753, 2006.",
"doc_zh": "施加从 Kozai 平运动到 Brouwer 平运动的修正。\n\n根数集中的平运动是 Kozai 平运动,理论须先把它换算为 Brouwer 平运动方能\n使用。以 `no` 表示根数集给出的值、`xke` 表示开普勒常数,参考实现按下式\n求值:\n\n<div>\n$$\n\\begin{aligned}\n\\text{ak} &= (\\text{xke} / \\text{no})^{2/3} \\\\\n\\text{d1} &= \\frac{0.75\\, j_2\\,(3 \\cos^2 i - 1)}{\\sqrt{1 - e^2}\\,(1 - e^2)} \\\\\n\\text{del} &= \\text{d1} / \\text{ak}^2 \\\\\n\\text{adel} &= \\text{ak}\\left(1 - \\text{del}^2 - \\text{del}\\left(\\tfrac{1}{3} + \\tfrac{134\\,\\text{del}^2}{81}\\right)\\right) \\\\\n\\text{del} &= \\text{d1} / \\text{adel}^2 \\\\\nn_0 &= \\text{no} / (1 + \\text{del})\n\\end{aligned}\n$$\n</div>\n\n第二次求 `del` 用的是 `adel` 而非 `ak`,这正是该修正与修正后平运动所隐含\n的半长轴相一致的原因。\n\n出处:Vallado 等,*Revisiting Spacetrack Report #3*,AIAA 2006-6753,2006。",
"associated": false
},
{
@ -2523,8 +2523,8 @@
"kind": "fn",
"name": "xke",
"signature": "pub fn xke(self) -> f64 {",
"doc": "Returns `xke`, the Kepler constant, in units of `er^1.5 / min`.\n\nThe propagator works in minutes and Earth radii, so the gravitational\nparameter is converted by\n\n```text\nxke = 60 / sqrt(radius^3 / mu)\n```\n\nwhich is the angular rate, in radians per minute, of a circular orbit\nof radius one Earth radius.",
"doc_zh": "返回 `xke`(开普勒常数),单位为 `er^1.5 / min`。\n\n传播器以分钟与地球半径为单位,故引力参数按下式换算:\n\n```text\nxke = 60 / sqrt(radius^3 / mu)\n```\n\n它是一个地球半径圆轨道的角速率,单位为弧度每分钟。",
"doc": "Returns `xke`, the Kepler constant, in units of `er^1.5 / min`.\n\nThe propagator works in minutes and Earth radii, so the gravitational\nparameter is converted by\n\n<div>\n$$\n\\text{xke} = \\frac{60}{\\sqrt{\\text{radius}^3 / \\mu}}\n$$\n</div>\n\nwhich is the angular rate, in radians per minute, of a circular orbit\nof radius one Earth radius.",
"doc_zh": "返回 `xke`(开普勒常数),单位为 `er^1.5 / min`。\n\n传播器以分钟与地球半径为单位,故引力参数按下式换算:\n\n<div>\n$$\n\\text{xke} = \\frac{60}{\\sqrt{\\text{radius}^3 / \\mu}}\n$$\n</div>\n\n它是一个地球半径圆轨道的角速率,单位为弧度每分钟。",
"associated": true
},
{
@ -2675,8 +2675,8 @@
"kind": "fn",
"name": "true_from_eccentric",
"signature": "pub fn true_from_eccentric(eccentric_anomaly: f64, eccentricity: f64) -> f64 {",
"doc": "Returns the true anomaly for an eccentric anomaly and eccentricity.\n\nThe relation follows from the geometry of the auxiliary circle:\n\n```text\ntan(nu / 2) = sqrt((1 + e) / (1 - e)) tan(E / 2)\n```\n\nThe half angle form is used rather than the direct cosine relation so\nthat the result is correct in all four quadrants without a quadrant\ncheck.",
"doc_zh": "由偏近点角与偏心率返回真近点角。\n\n该关系来自辅助圆的几何性质:\n\n```text\ntan(nu / 2) = sqrt((1 + e) / (1 - e)) tan(E / 2)\n```\n\n采用半角形式而非直接的余弦关系,使结果在四个象限中都正确,无需判别象限。",
"doc": "Returns the true anomaly for an eccentric anomaly and eccentricity.\n\nThe relation follows from the geometry of the auxiliary circle:\n\n<div>\n$$\n\\tan\\frac{\\nu}{2} = \\sqrt{\\frac{1 + e}{1 - e}}\\,\\tan\\frac{E}{2}\n$$\n</div>\n\nThe half angle form is used rather than the direct cosine relation so\nthat the result is correct in all four quadrants without a quadrant\ncheck.",
"doc_zh": "由偏近点角与偏心率返回真近点角。\n\n该关系来自辅助圆的几何性质:\n\n<div>\n$$\n\\tan\\frac{\\nu}{2} = \\sqrt{\\frac{1 + e}{1 - e}}\\,\\tan\\frac{E}{2}\n$$\n</div>\n\n采用半角形式而非直接的余弦关系,使结果在四个象限中都正确,无需判别象限。",
"associated": false
},
{
@ -2691,8 +2691,8 @@
"kind": "fn",
"name": "eccentric_from_mean",
"signature": "pub fn eccentric_from_mean(mean_anomaly: f64, eccentricity: f64) -> f64 {",
"doc": "Returns the eccentric anomaly for a mean anomaly and eccentricity.\n\nThis solves Kepler's equation\n\n```text\nM = E - e sin E\n```\n\nby Newton's method. The starting guess is the mean anomaly plus a term\nproportional to the eccentricity, which keeps the iteration stable for\neccentricities approaching one. The iteration always terminates, and the\nresult is the value reached after at most a fixed number of steps.",
"doc_zh": "由平近点角与偏心率返回偏近点角。\n\n用 Newton 法求解开普勒方程\n\n```text\nM = E - e sin E\n```\n\n初值取平近点角加上一个正比于偏心率的项,使迭代在偏心率趋近一时保持稳定。\n迭代总会终止,结果是至多固定步数后达到的值。",
"doc": "Returns the eccentric anomaly for a mean anomaly and eccentricity.\n\nThis solves Kepler's equation\n\n<div>\n$$\nM = E - e \\sin E\n$$\n</div>\n\nby Newton's method. The starting guess is the mean anomaly plus a term\nproportional to the eccentricity, which keeps the iteration stable for\neccentricities approaching one. The iteration always terminates, and the\nresult is the value reached after at most a fixed number of steps.",
"doc_zh": "由平近点角与偏心率返回偏近点角。\n\n用 Newton 法求解开普勒方程\n\n<div>\n$$\nM = E - e \\sin E\n$$\n</div>\n\n初值取平近点角加上一个正比于偏心率的项,使迭代在偏心率趋近一时保持稳定。\n迭代总会终止,结果是至多固定步数后达到的值。",
"associated": false
},
{
@ -2803,8 +2803,8 @@
"kind": "fn",
"name": "to_state",
"signature": "pub fn to_state(self, parameter: GravityParameter) -> Option<State> {",
"doc": "Converts these elements to a position and velocity.\n\nReturns `None` when the elements are not a valid elliptical orbit.\n\nThe conversion places the satellite in the perifocal frame, where the\nfirst axis points to perigee and the third along the orbit normal,\n\n```text\nr = p / (1 + e cos nu)\nx = r cos nu, y = r sin nu, z = 0\nvx = -sqrt(mu / p) sin nu\nvy = sqrt(mu / p) (e + cos nu)\n```\n\nand then rotates by the argument of perigee, the inclination, and the\nright ascension of the ascending node.",
"doc_zh": "把这些根数转换为位置与速度。\n\n当根数不是有效椭圆轨道时返回 `None`。\n\n换算先在近点坐标系中定位卫星,该系第一轴指向近地点、第三轴沿轨道法线,\n\n```text\nr = p / (1 + e cos nu)\nx = r cos nu, y = r sin nu, z = 0\nvx = -sqrt(mu / p) sin nu\nvy = sqrt(mu / p) (e + cos nu)\n```\n\n再依次按近地点幅角、倾角与升交点赤经旋转。",
"doc": "Converts these elements to a position and velocity.\n\nReturns `None` when the elements are not a valid elliptical orbit.\n\nThe conversion places the satellite in the perifocal frame, where the\nfirst axis points to perigee and the third along the orbit normal,\n\n<div>\n$$\n\\begin{aligned}\nr &= \\frac{p}{1 + e \\cos\\nu} \\\\\nx &= r \\cos\\nu,\\quad y = r \\sin\\nu,\\quad z = 0 \\\\\nv_x &= -\\sqrt{\\frac{\\mu}{p}}\\,\\sin\\nu \\\\\nv_y &= \\sqrt{\\frac{\\mu}{p}}\\,(e + \\cos\\nu)\n\\end{aligned}\n$$\n</div>\n\nand then rotates by the argument of perigee, the inclination, and the\nright ascension of the ascending node.",
"doc_zh": "把这些根数转换为位置与速度。\n\n当根数不是有效椭圆轨道时返回 `None`。\n\n换算先在近点坐标系中定位卫星,该系第一轴指向近地点、第三轴沿轨道法线,\n\n<div>\n$$\n\\begin{aligned}\nr &= \\frac{p}{1 + e \\cos\\nu} \\\\\nx &= r \\cos\\nu,\\quad y = r \\sin\\nu,\\quad z = 0 \\\\\nv_x &= -\\sqrt{\\frac{\\mu}{p}}\\,\\sin\\nu \\\\\nv_y &= \\sqrt{\\frac{\\mu}{p}}\\,(e + \\cos\\nu)\n\\end{aligned}\n$$\n</div>\n\n再依次按近地点幅角、倾角与升交点赤经旋转。",
"associated": true
},
{
@ -3836,8 +3836,8 @@
{
"name": "apsis-coverage",
"layer": "network",
"summary": "Ground coverage analysis.\n\nA satellite covers the part of the Earth's surface from which it can be\nseen above a minimum elevation angle. That part is a circle, called the\nfootprint, whose size depends on the satellite altitude and on the\nelevation mask. This crate computes the footprint geometry, tests whether\na ground point lies inside a footprint, and measures how much of a region\nis covered.\n\nThe spherical model in [`geometry`](self) treats the Earth as a sphere.\nThat is accurate enough for constellation design, where the quantities\nwanted are the footprint radius to a few parts in ten thousand and the\nnumber of satellites in view. The exact line-of-sight test in\n[`line_of_sight`] uses the actual positions, so it accounts for the\nflattening and for a ground point above the ellipsoid.\n\nThe geometry of the satellite, the ground point, and the centre of the\nEarth is a triangle. Its three angles are the elevation at the ground\npoint, the nadir angle at the satellite, and the central angle at the\ncentre, and they sum to a right angle:\n\n```text\nelevation + nadir + central = 90 degrees\n```\n\nSource: the relations used here are the standard satellite geometry, as\ngiven for example in Vallado, D. A., *Fundamentals of Astrodynamics and\nApplications*, 4th edition, microcosm Press, 2013, section 5.3.\n\n```\nuse apsis_coverage::{footprint_central_angle, slant_range};\n\n// A satellite at 550 km altitude sees to about fifteen degrees of\n// central angle at a ten degree elevation mask, which is a footprint\n// radius of some 1665 km along the surface.\nlet central = footprint_central_angle(6_928.137, 6_378.137, 10.0_f64.to_radians())\n .expect(\"valid geometry\");\nassert!((central.to_degrees() - 14.96).abs() < 0.01);\n\nlet range = slant_range(6_928.137, 6_378.137, 10.0_f64.to_radians())\n .expect(\"valid geometry\");\nassert!((range - 1_815.65).abs() < 0.01);\n```",
"summary_zh": "地面覆盖分析。\n\n卫星覆盖地表上能在最小仰角以上看到它的那部分。那部分是一个圆,称为覆盖区,\n其大小取决于卫星高度与仰角遮蔽。本 crate 计算覆盖区几何、判定某地面点是否落在\n覆盖区内,并度量某区域被覆盖的比例。\n\n[`geometry`](self) 中的球面模型把地球当作一个球。对星座设计已足够准确,那里\n所要的量是覆盖区半径到万分之几以及可见卫星数。[`line_of_sight`] 中的精确视线\n判定使用实际位置,故它计入了扁率以及高于椭球的地面点。\n\n卫星、地面点与地心构成的几何是一个三角形。其三个角是地面点处的仰角、卫星处的\n天底角,以及地心处的中心角,它们相加为直角:\n\n```text\nelevation + nadir + central = 90 degrees\n```\n\n出处:此处所用的关系是标准的卫星几何,例如见 Vallado, D. A.,*Fundamentals of\nAstrodynamics and Applications*,第 4 版,microcosm Press,2013,第 5.3 节。",
"summary": "Ground coverage analysis.\n\nA satellite covers the part of the Earth's surface from which it can be\nseen above a minimum elevation angle. That part is a circle, called the\nfootprint, whose size depends on the satellite altitude and on the\nelevation mask. This crate computes the footprint geometry, tests whether\na ground point lies inside a footprint, and measures how much of a region\nis covered.\n\nThe spherical model in [`geometry`](self) treats the Earth as a sphere.\nThat is accurate enough for constellation design, where the quantities\nwanted are the footprint radius to a few parts in ten thousand and the\nnumber of satellites in view. The exact line-of-sight test in\n[`line_of_sight`] uses the actual positions, so it accounts for the\nflattening and for a ground point above the ellipsoid.\n\nThe geometry of the satellite, the ground point, and the centre of the\nEarth is a triangle. Its three angles are the elevation at the ground\npoint, the nadir angle at the satellite, and the central angle at the\ncentre, and they sum to a right angle:\n\n<div>\n$$\n\\text{elevation} + \\text{nadir} + \\text{central} = 90^\\circ\n$$\n</div>\n\nSource: the relations used here are the standard satellite geometry, as\ngiven for example in Vallado, D. A., *Fundamentals of Astrodynamics and\nApplications*, 4th edition, microcosm Press, 2013, section 5.3.\n\n```\nuse apsis_coverage::{footprint_central_angle, slant_range};\n\n// A satellite at 550 km altitude sees to about fifteen degrees of\n// central angle at a ten degree elevation mask, which is a footprint\n// radius of some 1665 km along the surface.\nlet central = footprint_central_angle(6_928.137, 6_378.137, 10.0_f64.to_radians())\n .expect(\"valid geometry\");\nassert!((central.to_degrees() - 14.96).abs() < 0.01);\n\nlet range = slant_range(6_928.137, 6_378.137, 10.0_f64.to_radians())\n .expect(\"valid geometry\");\nassert!((range - 1_815.65).abs() < 0.01);\n```",
"summary_zh": "地面覆盖分析。\n\n卫星覆盖地表上能在最小仰角以上看到它的那部分。那部分是一个圆,称为覆盖区,\n其大小取决于卫星高度与仰角遮蔽。本 crate 计算覆盖区几何、判定某地面点是否落在\n覆盖区内,并度量某区域被覆盖的比例。\n\n[`geometry`](self) 中的球面模型把地球当作一个球。对星座设计已足够准确,那里\n所要的量是覆盖区半径到万分之几以及可见卫星数。[`line_of_sight`] 中的精确视线\n判定使用实际位置,故它计入了扁率以及高于椭球的地面点。\n\n卫星、地面点与地心构成的几何是一个三角形。其三个角是地面点处的仰角、卫星处的\n天底角,以及地心处的中心角,它们相加为直角:\n\n<div>\n$$\n\\text{elevation} + \\text{nadir} + \\text{central} = 90^\\circ\n$$\n</div>\n\n出处:此处所用的关系是标准的卫星几何,例如见 Vallado, D. A.,*Fundamentals of\nAstrodynamics and Applications*,第 4 版,microcosm Press,2013,第 5.3 节。",
"items": [
{
"kind": "struct",
@ -3867,8 +3867,8 @@
"kind": "fn",
"name": "area",
"signature": "pub fn area(&self) -> f64 {",
"doc": "Returns the area of the footprint, in square kilometers.\n\nThe area is the part of a sphere cut off by a cone,\n\n```text\nA = 2 pi R^2 (1 - cos(central))\n```\n\nwhich is exact for a spherical body.",
"doc_zh": "返回覆盖区的面积,单位为平方千米。\n\n该面积是被圆锥截去的球面部分,\n\n```text\nA = 2 pi R^2 (1 - cos(central))\n```\n\n对球形天体这是精确的。",
"doc": "Returns the area of the footprint, in square kilometers.\n\nThe area is the part of a sphere cut off by a cone,\n\n<div>\n$$\nA = 2 \\pi R^2 \\left(1 - \\cos(\\text{central})\\right)\n$$\n</div>\n\nwhich is exact for a spherical body.",
"doc_zh": "返回覆盖区的面积,单位为平方千米。\n\n该面积是被圆锥截去的球面部分,\n\n<div>\n$$\nA = 2 \\pi R^2 \\left(1 - \\cos(\\text{central})\\right)\n$$\n</div>\n\n对球形天体这是精确的。",
"associated": true
},
{
@ -3963,16 +3963,16 @@
"kind": "fn",
"name": "slant_range",
"signature": "pub fn slant_range(satellite_radius: f64, body_radius: f64, elevation: f64) -> Option<f64> {",
"doc": "Returns the slant range between the satellite and the ground point, in\nkilometers.\n\nThe range is the straight line distance, not the distance along the\nsurface. It is the quantity a link budget needs, because it sets the free\nspace path loss.\n\nThe relation is the law of cosines applied to the triangle formed by the\nsatellite, the ground point, and the centre of the Earth,\n\n```text\nrange^2 = satellite_radius^2 + body_radius^2\n - 2 satellite_radius body_radius cos(central)\n```\n\nThe law of cosines is used rather than the equivalent form\n`Rs sin(central) / cos(elevation)` because the latter is singular at the\nzenith, where the elevation is a right angle and its cosine is zero,\neven though the range there is simply the altitude.\n\nReturns `None` when the geometry is not usable.",
"doc_zh": "返回卫星与地面点之间的斜距,单位为千米。\n\n该距离是直线距离,而非沿地表的距离。它是链路预算所需的量,因为它决定自由\n空间路径损耗。\n\n该关系是余弦定理施加于卫星、地面点与地心构成的三角形:\n\n```text\nrange^2 = satellite_radius^2 + body_radius^2\n - 2 satellite_radius body_radius cos(central)\n```\n\n此处用余弦定理而非等价形式 `Rs sin(central) / cos(elevation)`,因为后者在\n天顶处奇异,那里仰角是直角、其余弦为零,尽管那里的距离恰是高度。\n\n几何不可用时返回 `None`。",
"doc": "Returns the slant range between the satellite and the ground point, in\nkilometers.\n\nThe range is the straight line distance, not the distance along the\nsurface. It is the quantity a link budget needs, because it sets the free\nspace path loss.\n\nThe relation is the law of cosines applied to the triangle formed by the\nsatellite, the ground point, and the centre of the Earth,\n\n<div>\n$$\n\\text{range}^2 = \\text{satellite\\_radius}^2 + \\text{body\\_radius}^2\n - 2\\,\\text{satellite\\_radius}\\,\\text{body\\_radius}\\,\\cos(\\text{central})\n$$\n</div>\n\nThe law of cosines is used rather than the equivalent form\n`Rs sin(central) / cos(elevation)` because the latter is singular at the\nzenith, where the elevation is a right angle and its cosine is zero,\neven though the range there is simply the altitude.\n\nReturns `None` when the geometry is not usable.",
"doc_zh": "返回卫星与地面点之间的斜距,单位为千米。\n\n该距离是直线距离,而非沿地表的距离。它是链路预算所需的量,因为它决定自由\n空间路径损耗。\n\n该关系是余弦定理施加于卫星、地面点与地心构成的三角形:\n\n<div>\n$$\n\\text{range}^2 = \\text{satellite\\_radius}^2 + \\text{body\\_radius}^2\n - 2\\,\\text{satellite\\_radius}\\,\\text{body\\_radius}\\,\\cos(\\text{central})\n$$\n</div>\n\n此处用余弦定理而非等价形式 `Rs sin(central) / cos(elevation)`,因为后者在\n天顶处奇异,那里仰角是直角、其余弦为零,尽管那里的距离恰是高度。\n\n几何不可用时返回 `None`。",
"associated": false
},
{
"kind": "fn",
"name": "elevation_from_central_angle",
"signature": "pub fn elevation_from_central_angle( satellite_radius: f64, body_radius: f64, central_angle: f64, ) -> Option<f64> {",
"doc": "Returns the elevation angle for a central angle, in radians.\n\nThis inverts [`earth_central_angle`]. It is used when the position of a\nground point relative to the sub-satellite point is known and the\nelevation at that point is wanted.\n\nThe relation is\n\n```text\ntan(elevation) = (cos(central) - body_radius / satellite_radius)\n / sin(central)\n```\n\nReturns `None` when the radii are not usable or when the central angle is\nnot finite.",
"doc_zh": "返回某中心角对应的仰角,单位为弧度。\n\n它反解 [`earth_central_angle`]。当已知地面点相对星下点的位置而要求\n该点处仰角时使用它。\n\n关系为\n\n```text\ntan(elevation) = (cos(central) - body_radius / satellite_radius)\n / sin(central)\n```\n\n半径不可用或中心角非有限时返回 `None`。",
"doc": "Returns the elevation angle for a central angle, in radians.\n\nThis inverts [`earth_central_angle`]. It is used when the position of a\nground point relative to the sub-satellite point is known and the\nelevation at that point is wanted.\n\nThe relation is\n\n<div>\n$$\n\\tan(\\text{elevation}) = \\frac{\\cos(\\text{central}) - \\text{body\\_radius} / \\text{satellite\\_radius}}{\\sin(\\text{central})}\n$$\n</div>\n\nReturns `None` when the radii are not usable or when the central angle is\nnot finite.",
"doc_zh": "返回某中心角对应的仰角,单位为弧度。\n\n它反解 [`earth_central_angle`]。当已知地面点相对星下点的位置而要求\n该点处仰角时使用它。\n\n关系为\n\n<div>\n$$\n\\tan(\\text{elevation}) = \\frac{\\cos(\\text{central}) - \\text{body\\_radius} / \\text{satellite\\_radius}}{\\sin(\\text{central})}\n$$\n</div>\n\n半径不可用或中心角非有限时返回 `None`。",
"associated": false
},
{
@ -5595,16 +5595,16 @@
"kind": "fn",
"name": "free_space_path_loss",
"signature": "pub fn free_space_path_loss(distance: f64, frequency: f64) -> Option<Decibel> {",
"doc": "Returns the free space path loss between two isotropic antennas, as a\nratio in decibels.\n\nThe ratio is positive, so it represents a loss: the received power is the\ntransmitted power divided by this ratio. The relation is\n\n```text\nL = (4 pi d / lambda)^2\n```\n\nwhich is the spreading loss of a spherical wave over a distance `d`\ncombined with the effective aperture of an isotropic receive antenna.\n\nThe loss grows with frequency at a fixed distance, because the effective\naperture of the receive antenna falls as the square of the wavelength.\n\nThe distance must be positive. A zero distance is not a case this\nexpression covers: the ratio would be zero, which is infinite attenuation\nin decibels, and the underlying far field assumption does not hold.\n\nReturns `None` when the distance is not positive, or when either argument\nis not finite.",
"doc_zh": "返回两个各向同性天线之间的自由空间路径损耗,以分贝比值表示。\n\n该比值为正,故表示一种损耗:接收功率是发射功率除以该比值。关系为\n\n```text\nL = (4 pi d / lambda)^2\n```\n\n它是球面波在距离 `d` 上的扩散损耗与各向同性接收天线有效孔径的\n结合。\n\n固定距离下损耗随频率增大,因为接收天线的有效孔径按波长的平方下降。\n\n距离必须为正。零距离不是本式所涵盖的情形:比值会为零,即以分贝计的\n无穷衰减,且其背后的远场假定不成立。\n\n距离非正,或任一参数非有限时返回 `None`。",
"doc": "Returns the free space path loss between two isotropic antennas, as a\nratio in decibels.\n\nThe ratio is positive, so it represents a loss: the received power is the\ntransmitted power divided by this ratio. The relation is\n\n<div>\n$$\nL = \\left(\\frac{4 \\pi d}{\\lambda}\\right)^2\n$$\n</div>\n\nwhich is the spreading loss of a spherical wave over a distance `d`\ncombined with the effective aperture of an isotropic receive antenna.\n\nThe loss grows with frequency at a fixed distance, because the effective\naperture of the receive antenna falls as the square of the wavelength.\n\nThe distance must be positive. A zero distance is not a case this\nexpression covers: the ratio would be zero, which is infinite attenuation\nin decibels, and the underlying far field assumption does not hold.\n\nReturns `None` when the distance is not positive, or when either argument\nis not finite.",
"doc_zh": "返回两个各向同性天线之间的自由空间路径损耗,以分贝比值表示。\n\n该比值为正,故表示一种损耗:接收功率是发射功率除以该比值。关系为\n\n<div>\n$$\nL = \\left(\\frac{4 \\pi d}{\\lambda}\\right)^2\n$$\n</div>\n\n它是球面波在距离 `d` 上的扩散损耗与各向同性接收天线有效孔径的\n结合。\n\n固定距离下损耗随频率增大,因为接收天线的有效孔径按波长的平方下降。\n\n距离必须为正。零距离不是本式所涵盖的情形:比值会为零,即以分贝计的\n无穷衰减,且其背后的远场假定不成立。\n\n距离非正,或任一参数非有限时返回 `None`。",
"associated": false
},
{
"kind": "fn",
"name": "free_space_received_ratio",
"signature": "pub fn free_space_received_ratio( distance: f64, frequency: f64, transmitter: Gain, receiver: Gain, ) -> Option<Decibel> {",
"doc": "Returns the received power ratio between two antennas in free space.\n\nThe received power is the transmitted power multiplied by the two antenna\ngains and divided by the free space path loss, which in decibels is the\nsum\n\n```text\nP_r / P_t = G_t G_r / L\n```\n\nThe result is the ratio in decibels, so a positive value means the\nreceive antenna collects more than was transmitted, which happens when\nthe two gains exceed the spreading loss.\n\nReturns `None` when the distance or frequency is not usable.",
"doc_zh": "返回自由空间两个天线之间的接收功率比。\n\n接收功率是发射功率乘以两个天线增益、再除以自由空间路径损耗,以分贝\n表示即\n\n```text\nP_r / P_t = G_t G_r / L\n```\n\n结果是分贝比值,故正值意味着接收天线收集到的多于所发射的,这在两个\n增益超过扩散损耗时发生。\n\n距离或频率不可用时返回 `None`。",
"doc": "Returns the received power ratio between two antennas in free space.\n\nThe received power is the transmitted power multiplied by the two antenna\ngains and divided by the free space path loss, which in decibels is the\nsum\n\n<div>\n$$\n\\frac{P_r}{P_t} = \\frac{G_t G_r}{L}\n$$\n</div>\n\nThe result is the ratio in decibels, so a positive value means the\nreceive antenna collects more than was transmitted, which happens when\nthe two gains exceed the spreading loss.\n\nReturns `None` when the distance or frequency is not usable.",
"doc_zh": "返回自由空间两个天线之间的接收功率比。\n\n接收功率是发射功率乘以两个天线增益、再除以自由空间路径损耗,以分贝\n表示即\n\n<div>\n$$\n\\frac{P_r}{P_t} = \\frac{G_t G_r}{L}\n$$\n</div>\n\n结果是分贝比值,故正值意味着接收天线收集到的多于所发射的,这在两个\n增益超过扩散损耗时发生。\n\n距离或频率不可用时返回 `None`。",
"associated": false
},
{
@ -5891,8 +5891,8 @@
"kind": "fn",
"name": "peak_gain",
"signature": "pub fn peak_gain(self, wavelength: f64) -> Option<Gain> {",
"doc": "Returns the peak gain on boresight at the given wavelength.\n\nThe relation is\n\n```text\nG = eta (pi D / lambda)^2\n```\n\nwhich follows from the effective area through\n[`Gain::from_effective_aperture`]. Returns `None` for an invalid\naperture or wavelength.",
"doc_zh": "返回给定波长处视轴上的峰值增益。\n\n关系为\n\n```text\nG = eta (pi D / lambda)^2\n```\n\n它由有效面积经 [`Gain::from_effective_aperture`] 得出。孔径或波长\n无效时返回 `None`。",
"doc": "Returns the peak gain on boresight at the given wavelength.\n\nThe relation is\n\n<div>\n$$\nG = \\eta \\left(\\frac{\\pi D}{\\lambda}\\right)^2\n$$\n</div>\n\nwhich follows from the effective area through\n[`Gain::from_effective_aperture`]. Returns `None` for an invalid\naperture or wavelength.",
"doc_zh": "返回给定波长处视轴上的峰值增益。\n\n关系为\n\n<div>\n$$\nG = \\eta \\left(\\frac{\\pi D}{\\lambda}\\right)^2\n$$\n</div>\n\n它由有效面积经 [`Gain::from_effective_aperture`] 得出。孔径或波长\n无效时返回 `None`。",
"associated": true
},
{
@ -5931,16 +5931,16 @@
"kind": "fn",
"name": "off_axis_attenuation",
"signature": "pub fn off_axis_attenuation( peak: Gain, beam_width: f64, off_axis_angle: f64, floor_db: f64, ) -> Option<Decibel> {",
"doc": "Returns the gain of an antenna at an angle from boresight, given a peak\ngain and a half power beam width.\n\nThis is the squared angle model that several interference assessments\nuse, expressed in terms of the half power beam width so that any antenna\ncan be described by the two numbers a link budget has to hand. In\ndecibels,\n\n```text\nG(theta) = G_peak - min(12 (theta / theta_0)^2, G_floor)\n```\n\nwhere `theta_0` is the half power beam width and `G_floor` is the\nsidelobe level to fall to, in decibels below the peak. The squared angle\nlaw comes from the first term of the Airy pattern of a uniformly\nilluminated aperture, which is a good approximation down to the first\nsidelobe.\n\nThe coefficient twelve is chosen so that the attenuation reaches three\ndecibels at `theta_0 / 2`, which is the definition of the half power beam\nwidth. A pattern taken from a recommendation should be used in place of\nthis one where the recommendation applies: see\n[`reference_pattern_gain`](crate::reference_pattern_gain) for the ITU-R\nS.465 pattern, which differs from this model in the main lobe and also in\nthe shape of its sidelobe region.\n\nReturns `None` when the peak gain has no decibel form, or when the beam\nwidth or floor is not positive and finite.",
"doc_zh": "返回给定峰值增益与半功率波束宽度时,天线在偏离视轴某角度处的增益。\n\n这是若干干扰评估所用的角平方模型,以半功率波束宽度表达,使任何天线\n都能由链路预算手头的两个数描述。以分贝计,\n\n```text\nG(theta) = G_peak - min(12 (theta / theta_0)^2, G_floor)\n```\n\n其中 `theta_0` 是半功率波束宽度,`G_floor` 是所要降到的旁瓣电平,\n相对峰值以分贝计。角平方律来自均匀照射孔径 Airy 图案的首项,直到\n第一旁瓣都是良好近似。\n\n系数十二的选取使衰减在 `theta_0 / 2` 处达到三分贝,这正是半功率\n波束宽度的定义。在建议书适用之处,应改用取自建议书的图案:ITU-R\nS.465 图案见 [`reference_pattern_gain`](crate::reference_pattern_gain),\n它在主瓣上以及旁瓣区的形状上都与本模型不同。\n\n峰值增益没有分贝形式,或波束宽度、底限非正且非有限时返回 `None`。",
"doc": "Returns the gain of an antenna at an angle from boresight, given a peak\ngain and a half power beam width.\n\nThis is the squared angle model that several interference assessments\nuse, expressed in terms of the half power beam width so that any antenna\ncan be described by the two numbers a link budget has to hand. In\ndecibels,\n\n<div>\n$$\nG(\\theta) = G_{\\text{peak}} - \\min\\!\\left(12\\left(\\frac{\\theta}{\\theta_0}\\right)^2,\\; G_{\\text{floor}}\\right)\n$$\n</div>\n\nwhere `theta_0` is the half power beam width and `G_floor` is the\nsidelobe level to fall to, in decibels below the peak. The squared angle\nlaw comes from the first term of the Airy pattern of a uniformly\nilluminated aperture, which is a good approximation down to the first\nsidelobe.\n\nThe coefficient twelve is chosen so that the attenuation reaches three\ndecibels at `theta_0 / 2`, which is the definition of the half power beam\nwidth. A pattern taken from a recommendation should be used in place of\nthis one where the recommendation applies: see\n[`reference_pattern_gain`](crate::reference_pattern_gain) for the ITU-R\nS.465 pattern, which differs from this model in the main lobe and also in\nthe shape of its sidelobe region.\n\nReturns `None` when the peak gain has no decibel form, or when the beam\nwidth or floor is not positive and finite.",
"doc_zh": "返回给定峰值增益与半功率波束宽度时,天线在偏离视轴某角度处的增益。\n\n这是若干干扰评估所用的角平方模型,以半功率波束宽度表达,使任何天线\n都能由链路预算手头的两个数描述。以分贝计,\n\n<div>\n$$\nG(\\theta) = G_{\\text{peak}} - \\min\\!\\left(12\\left(\\frac{\\theta}{\\theta_0}\\right)^2,\\; G_{\\text{floor}}\\right)\n$$\n</div>\n\n其中 `theta_0` 是半功率波束宽度,`G_floor` 是所要降到的旁瓣电平,\n相对峰值以分贝计。角平方律来自均匀照射孔径 Airy 图案的首项,直到\n第一旁瓣都是良好近似。\n\n系数十二的选取使衰减在 `theta_0 / 2` 处达到三分贝,这正是半功率\n波束宽度的定义。在建议书适用之处,应改用取自建议书的图案:ITU-R\nS.465 图案见 [`reference_pattern_gain`](crate::reference_pattern_gain),\n它在主瓣上以及旁瓣区的形状上都与本模型不同。\n\n峰值增益没有分贝形式,或波束宽度、底限非正且非有限时返回 `None`。",
"associated": false
},
{
"kind": "fn",
"name": "mask_gain",
"signature": "pub fn mask_gain(diameter_over_wavelength: f64, off_axis_angle: f64) -> Option<f64> {",
"doc": "Returns the gain that an antenna is required not to exceed at an angle\nfrom boresight, in decibels relative to an isotropic radiator.\n\nThis is the reference pattern of the Radio Regulations Appendix 8, used\nto check whether an Earth station meets the off-axis emission limits that\nprotect neighbouring satellites. The pattern is piecewise:\n\n```text\nfor D/lambda >= 100:\n G = 29 - 25 log10(theta) for 1 <= theta < 36 degrees\n G = -10 for 36 <= theta <= 180 degrees\nfor D/lambda < 100:\n G = 32 - 25 log10(theta) for 1 <= theta < 48 degrees\n G = -10 for 48 <= theta <= 180 degrees\n G = 32 - 25 log10(48) for theta < 1 degree\n```\n\nThe angle is in radians and the diameter to wavelength ratio decides\nwhich branch applies, because a small antenna has a broader main lobe\nand therefore a wider range over which the pattern must be controlled.\n\nThis function returns the limit, that is the largest gain permitted. An\nantenna is compliant when its actual off-axis gain is at or below it.\n\nReturns `None` when the angle is negative, when the ratio is not\npositive, or when the angle is not finite.\n\nSource: ITU, *Radio Regulations*, Appendix 8, which reproduces the\nreference pattern of ITU-R Recommendation S.465.",
"doc_zh": "返回天线在偏离视轴某角度处不得超出的增益,相对各向同性辐射体以分贝\n计。\n\n这是《无线电规则》附录 8 的参考方向图,用于检查地球站是否满足保护\n邻近卫星的偏轴发射限值。该方向图是分段的:\n\n```text\nfor D/lambda >= 100:\n G = 29 - 25 log10(theta) for 1 <= theta < 36 degrees\n G = -10 for 36 <= theta <= 180 degrees\nfor D/lambda < 100:\n G = 32 - 25 log10(theta) for 1 <= theta < 48 degrees\n G = -10 for 48 <= theta <= 180 degrees\n G = 32 - 25 log10(48) for theta < 1 degree\n```\n\n角度以弧度计,口径与波长之比决定适用哪一支,因为小天线主瓣更宽,\n故须受控的角度范围也更大。\n\n本函数返回限值,即允许的最大增益。当实际偏轴增益不高于它时天线即\n合规。\n\n角度为负、比值为非正,或角度非有限时返回 `None`。\n\n出处:ITU,*Radio Regulations*,附录 8,其中再现了 ITU-R 建议书\nS.465 的参考方向图。",
"doc": "Returns the gain that an antenna is required not to exceed at an angle\nfrom boresight, in decibels relative to an isotropic radiator.\n\nThis is the reference pattern of the Radio Regulations Appendix 8, used\nto check whether an Earth station meets the off-axis emission limits that\nprotect neighbouring satellites. The pattern is piecewise:\n\n<div>\n$$\nG(\\theta) =\n\\begin{cases}\n29 - 25\\log_{10}\\theta, & 1^\\circ \\le \\theta < 36^\\circ \\\\\n-10, & 36^\\circ \\le \\theta \\le 180^\\circ\n\\end{cases}\n\\quad \\text{for } D/\\lambda \\ge 100\n\\qquad\nG(\\theta) =\n\\begin{cases}\n32 - 25\\log_{10}\\theta, & 1^\\circ \\le \\theta < 48^\\circ \\\\\n-10, & 48^\\circ \\le \\theta \\le 180^\\circ \\\\\n32 - 25\\log_{10}48, & \\theta < 1^\\circ\n\\end{cases}\n\\quad \\text{for } D/\\lambda < 100\n$$\n</div>\n\nThe angle is in radians and the diameter to wavelength ratio decides\nwhich branch applies, because a small antenna has a broader main lobe\nand therefore a wider range over which the pattern must be controlled.\n\nThis function returns the limit, that is the largest gain permitted. An\nantenna is compliant when its actual off-axis gain is at or below it.\n\nReturns `None` when the angle is negative, when the ratio is not\npositive, or when the angle is not finite.\n\nSource: ITU, *Radio Regulations*, Appendix 8, which reproduces the\nreference pattern of ITU-R Recommendation S.465.",
"doc_zh": "返回天线在偏离视轴某角度处不得超出的增益,相对各向同性辐射体以分贝\n计。\n\n这是《无线电规则》附录 8 的参考方向图,用于检查地球站是否满足保护\n邻近卫星的偏轴发射限值。该方向图是分段的:\n\n<div>\n$$\nG(\\theta) =\n\\begin{cases}\n29 - 25\\log_{10}\\theta, & 1^\\circ \\le \\theta < 36^\\circ \\\\\n-10, & 36^\\circ \\le \\theta \\le 180^\\circ\n\\end{cases}\n\\quad \\text{for } D/\\lambda \\ge 100\n\\qquad\nG(\\theta) =\n\\begin{cases}\n32 - 25\\log_{10}\\theta, & 1^\\circ \\le \\theta < 48^\\circ \\\\\n-10, & 48^\\circ \\le \\theta \\le 180^\\circ \\\\\n32 - 25\\log_{10}48, & \\theta < 1^\\circ\n\\end{cases}\n\\quad \\text{for } D/\\lambda < 100\n$$\n</div>\n\n角度以弧度计,口径与波长之比决定适用哪一支,因为小天线主瓣更宽,\n故须受控的角度范围也更大。\n\n本函数返回限值,即允许的最大增益。当实际偏轴增益不高于它时天线即\n合规。\n\n角度为负、比值为非正,或角度非有限时返回 `None`。\n\n出处:ITU,*Radio Regulations*,附录 8,其中再现了 ITU-R 建议书\nS.465 的参考方向图。",
"associated": false
},
{
@ -6027,8 +6027,8 @@
"kind": "fn",
"name": "reference_pattern_gain",
"signature": "pub fn reference_pattern_gain(diameter_over_wavelength: f64, off_axis_angle: f64) -> Option<f64> {",
"doc": "Returns the gain of the S.465 reference pattern at an off-axis angle.\n\nThe angle is in radians. The three regions are\n\n```text\nG = G_max - 2.5e-3 (D/lambda phi_deg)^2 for 0 <= phi < phi_break\nG = head - 25 log10(phi_deg) for phi_break <= phi < phi_floor\nG = -10 for phi_floor <= phi <= 180\n```\n\nwhere `phi_break` is the angle returned by [`main_lobe_break_angle`], the\nhead is 29 for a large aperture and 32 for a small one, and the floor\nangle is 36 or 48 degrees accordingly.\n\nThe falling sidelobe expression does not reach exactly minus ten decibels\nat the floor angle, so the pattern has a step of a few hundredths of a\ndecibel there. This is a property of the recommendation, which defines\nthe regions separately, and it is reproduced here rather than smoothed\nover.\n\nReturns `None` when the ratio or the angle is not usable.",
"doc_zh": "返回 S.465 参考方向图在偏轴某角度处的增益。\n\n角度以弧度计。三个区是\n\n```text\nG = G_max - 2.5e-3 (D/lambda phi_deg)^2 for 0 <= phi < phi_break\nG = head - 25 log10(phi_deg) for phi_break <= phi < phi_floor\nG = -10 for phi_floor <= phi <= 180\n```\n\n其中 `phi_break` 是 [`main_lobe_break_angle`] 返回的角度,head 对大\n孔径为 29、对小孔径为 32,底限角相应地是 36 或 48 度。\n\n下降的旁瓣表达式在底限角处并不精确达到负十分贝,故方向图在那里有\n几百分之一分贝的台阶。这是建议书的性质,它把各区分开定义;此处照实\n再现而非加以平滑。\n\n比值或角度不可用时返回 `None`。",
"doc": "Returns the gain of the S.465 reference pattern at an off-axis angle.\n\nThe angle is in radians. The three regions are\n\n<div>\n$$\nG(\\phi) =\n\\begin{cases}\nG_{\\max} - 2.5\\times10^{-3}\\left(\\frac{D}{\\lambda}\\,\\phi_{\\deg}\\right)^2, & 0 \\le \\phi < \\phi_{\\text{break}} \\\\\n\\text{head} - 25\\log_{10}\\phi_{\\deg}, & \\phi_{\\text{break}} \\le \\phi < \\phi_{\\text{floor}} \\\\\n-10, & \\phi_{\\text{floor}} \\le \\phi \\le 180^\\circ\n\\end{cases}\n$$\n</div>\n\nwhere `phi_break` is the angle returned by [`main_lobe_break_angle`], the\nhead is 29 for a large aperture and 32 for a small one, and the floor\nangle is 36 or 48 degrees accordingly.\n\nThe falling sidelobe expression does not reach exactly minus ten decibels\nat the floor angle, so the pattern has a step of a few hundredths of a\ndecibel there. This is a property of the recommendation, which defines\nthe regions separately, and it is reproduced here rather than smoothed\nover.\n\nReturns `None` when the ratio or the angle is not usable.",
"doc_zh": "返回 S.465 参考方向图在偏轴某角度处的增益。\n\n角度以弧度计。三个区是\n\n<div>\n$$\nG(\\phi) =\n\\begin{cases}\nG_{\\max} - 2.5\\times10^{-3}\\left(\\frac{D}{\\lambda}\\,\\phi_{\\deg}\\right)^2, & 0 \\le \\phi < \\phi_{\\text{break}} \\\\\n\\text{head} - 25\\log_{10}\\phi_{\\deg}, & \\phi_{\\text{break}} \\le \\phi < \\phi_{\\text{floor}} \\\\\n-10, & \\phi_{\\text{floor}} \\le \\phi \\le 180^\\circ\n\\end{cases}\n$$\n</div>\n\n其中 `phi_break` 是 [`main_lobe_break_angle`] 返回的角度,head 对大\n孔径为 29、对小孔径为 32,底限角相应地是 36 或 48 度。\n\n下降的旁瓣表达式在底限角处并不精确达到负十分贝,故方向图在那里有\n几百分之一分贝的台阶。这是建议书的性质,它把各区分开定义;此处照实\n再现而非加以平滑。\n\n比值或角度不可用时返回 `None`。",
"associated": false
},
{
@ -6075,8 +6075,8 @@
"kind": "fn",
"name": "classical_shift",
"signature": "pub fn classical_shift(carrier_frequency: f64, range_rate: f64) -> Option<f64> {",
"doc": "Returns the classical Doppler shift of a frequency for a range rate, in\nhertz.\n\nThe relation is\n\n```text\ndelta f = -f_0 (v_r / c)\n```\n\nwhere `v_r` is the range rate, positive when receding. The shift is\nnegative for a receding terminal, so the received frequency is lower than\nthe transmitted one.\n\nThe magnitude of the shift is small compared to the carrier: a range rate\nof 7 km/s at 12 GHz gives about 280 kHz, which is two parts in a hundred\nthousand. The caller must therefore treat the frequency as a double, and\nthe shifted frequency is returned separately rather than by adding a\nsmall shift to a large number.\n\nReturns `None` when the frequency is not positive and finite, or when the\nrange rate is not finite.",
"doc_zh": "返回某频率对应某距离变化率的经典多普勒频移,单位为赫兹。\n\n关系为\n\n```text\ndelta f = -f_0 (v_r / c)\n```\n\n其中 `v_r` 是距离变化率,远离时为正。远离的终端其频移为负,故接收\n频率低于发射频率。\n\n该频移的幅度相对载波很小:12 GHz 下 7 km/s 的距离变化率约给出\n280 kHz,即十万分之二。故调用方必须把频率当作双精度处理,且移位后的\n频率是单独返回,而非把一个小频移加到一个大数上。\n\n频率非正且非有限,或距离变化率非有限时返回 `None`。",
"doc": "Returns the classical Doppler shift of a frequency for a range rate, in\nhertz.\n\nThe relation is\n\n<div>\n$$\n\\Delta f = -f_0 \\frac{v_r}{c}\n$$\n</div>\n\nwhere `v_r` is the range rate, positive when receding. The shift is\nnegative for a receding terminal, so the received frequency is lower than\nthe transmitted one.\n\nThe magnitude of the shift is small compared to the carrier: a range rate\nof 7 km/s at 12 GHz gives about 280 kHz, which is two parts in a hundred\nthousand. The caller must therefore treat the frequency as a double, and\nthe shifted frequency is returned separately rather than by adding a\nsmall shift to a large number.\n\nReturns `None` when the frequency is not positive and finite, or when the\nrange rate is not finite.",
"doc_zh": "返回某频率对应某距离变化率的经典多普勒频移,单位为赫兹。\n\n关系为\n\n<div>\n$$\n\\Delta f = -f_0 \\frac{v_r}{c}\n$$\n</div>\n\n其中 `v_r` 是距离变化率,远离时为正。远离的终端其频移为负,故接收\n频率低于发射频率。\n\n该频移的幅度相对载波很小:12 GHz 下 7 km/s 的距离变化率约给出\n280 kHz,即十万分之二。故调用方必须把频率当作双精度处理,且移位后的\n频率是单独返回,而非把一个小频移加到一个大数上。\n\n频率非正且非有限,或距离变化率非有限时返回 `None`。",
"associated": false
},
{
@ -6323,16 +6323,16 @@
"kind": "fn",
"name": "air_mass",
"signature": "pub fn air_mass(elevation: f64) -> f64 {",
"doc": "Returns the air mass along a slant path at the given elevation angle.\n\nThe air mass is the ratio of the path length through a flat atmosphere to\nthe vertical path length. For a plane parallel atmosphere it is the\ncosecant of the elevation,\n\n```text\nm = 1 / sin(elevation)\n```\n\nso the value is one at the zenith and grows without bound at the horizon.\nThe plane parallel assumption fails below about ten degrees elevation,\nwhere the curvature of the Earth shortens the path compared with this\nexpression and the true air mass is smaller.\n\nThe value is not clamped at low elevation. A caller that needs a finite\nbound near the horizon should impose one; this function reports the plane\nparallel geometry it models.\n\nReturns infinity at or below the horizon, where no direct path exists.",
"doc_zh": "返回给定仰角下沿斜路径的大气质量。\n\n大气质量是穿过平坦大气的路径长度与垂直路径长度之比。对平面平行\n大气它是仰角的余割,\n\n```text\nm = 1 / sin(elevation)\n```\n\n故在天顶处为一,在地平处无界增长。平面平行假定在约十度仰角以下\n失效,那里地球曲率使路径比该式更短,真实大气质量更小。\n\n该值在低仰角处不被截断。需要在地平附近取有限上界的调用方应自行\n施加;本函数报告它所建模的平面平行几何。\n\n在地平及其以下不存在直接路径,返回无穷。",
"doc": "Returns the air mass along a slant path at the given elevation angle.\n\nThe air mass is the ratio of the path length through a flat atmosphere to\nthe vertical path length. For a plane parallel atmosphere it is the\ncosecant of the elevation,\n\n<div>\n$$\nm = \\frac{1}{\\sin(\\text{elevation})}\n$$\n</div>\n\nso the value is one at the zenith and grows without bound at the horizon.\nThe plane parallel assumption fails below about ten degrees elevation,\nwhere the curvature of the Earth shortens the path compared with this\nexpression and the true air mass is smaller.\n\nThe value is not clamped at low elevation. A caller that needs a finite\nbound near the horizon should impose one; this function reports the plane\nparallel geometry it models.\n\nReturns infinity at or below the horizon, where no direct path exists.",
"doc_zh": "返回给定仰角下沿斜路径的大气质量。\n\n大气质量是穿过平坦大气的路径长度与垂直路径长度之比。对平面平行\n大气它是仰角的余割,\n\n<div>\n$$\nm = \\frac{1}{\\sin(\\text{elevation})}\n$$\n</div>\n\n故在天顶处为一,在地平处无界增长。平面平行假定在约十度仰角以下\n失效,那里地球曲率使路径比该式更短,真实大气质量更小。\n\n该值在低仰角处不被截断。需要在地平附近取有限上界的调用方应自行\n施加;本函数报告它所建模的平面平行几何。\n\n在地平及其以下不存在直接路径,返回无穷。",
"associated": false
},
{
"kind": "fn",
"name": "geopotential_height",
"signature": "pub fn geopotential_height(geometric_height_km: f64) -> f64 {",
"doc": "Returns the geopotential height for a geometric height, in kilometers.\n\nThe relation is\n\n```text\nh_p = R H / (R + H)\n```\n\nwith `R` the fixed Earth radius of the standard atmosphere and `H` the\ngeometric height. The geopotential height is always the smaller of the\ntwo.",
"doc_zh": "返回某几何高度对应的势高,单位为千米。\n\n关系为\n\n```text\nh_p = R H / (R + H)\n```\n\n其中 `R` 是标准大气固定的地球半径,`H` 是几何高度。势高总是两者中较\n小者。",
"doc": "Returns the geopotential height for a geometric height, in kilometers.\n\nThe relation is\n\n<div>\n$$\nh_p = \\frac{R H}{R + H}\n$$\n</div>\n\nwith `R` the fixed Earth radius of the standard atmosphere and `H` the\ngeometric height. The geopotential height is always the smaller of the\ntwo.",
"doc_zh": "返回某几何高度对应的势高,单位为千米。\n\n关系为\n\n<div>\n$$\nh_p = \\frac{R H}{R + H}\n$$\n</div>\n\n其中 `R` 是标准大气固定的地球半径,`H` 是几何高度。势高总是两者中较\n小者。",
"associated": false
},
{
@ -6363,8 +6363,8 @@
"kind": "fn",
"name": "radio_refractive_index",
"signature": "pub fn radio_refractive_index( dry_pressure_hpa: f64, vapour_pressure_hpa: f64, temperature_k: f64, ) -> f64 {",
"doc": "Returns the radio refractive index of moist air, dimensionless.\n\nThe relation is\n\n```text\nN = 77.6 P_d / T + 72 e / T + 3.75e5 e / T^2\nn = 1 + N 1e-6\n```\n\nwith `P_d` the dry air pressure and `e` the water vapour partial\npressure, both in hectopascals, and `T` the temperature in kelvin. The\nfirst two terms are the non-dispersive refractivity and the third is the\ndipole term that gives water vapour its strong effect.\n\nSource: ITU-R Recommendation P.453, which gives this expression for the\nrefractive index of moist air.",
"doc_zh": "返回湿空气的无线电折射率,无量纲。\n\n关系为\n\n```text\nN = 77.6 P_d / T + 72 e / T + 3.75e5 e / T^2\nn = 1 + N 1e-6\n```\n\n其中 `P_d` 是干空气气压,`e` 是水汽分压,两者均以百帕计;`T` 是\n温度,以开尔文计。前两项是非色散折射率,第三项是使水汽产生强烈效应\n的偶极项。\n\n出处:ITU-R 建议书 P.453,它给出湿空气折射率的这一表达式。",
"doc": "Returns the radio refractive index of moist air, dimensionless.\n\nThe relation is\n\n<div>\n$$\n\\begin{aligned}\nN &= \\frac{77.6\\,P_d}{T} + \\frac{72\\,e}{T} + \\frac{3.75\\times10^5\\,e}{T^2} \\\\\nn &= 1 + N \\times 10^{-6}\n\\end{aligned}\n$$\n</div>\n\nwith `P_d` the dry air pressure and `e` the water vapour partial\npressure, both in hectopascals, and `T` the temperature in kelvin. The\nfirst two terms are the non-dispersive refractivity and the third is the\ndipole term that gives water vapour its strong effect.\n\nSource: ITU-R Recommendation P.453, which gives this expression for the\nrefractive index of moist air.",
"doc_zh": "返回湿空气的无线电折射率,无量纲。\n\n关系为\n\n<div>\n$$\n\\begin{aligned}\nN &= \\frac{77.6\\,P_d}{T} + \\frac{72\\,e}{T} + \\frac{3.75\\times10^5\\,e}{T^2} \\\\\nn &= 1 + N \\times 10^{-6}\n\\end{aligned}\n$$\n</div>\n\n其中 `P_d` 是干空气气压,`e` 是水汽分压,两者均以百帕计;`T` 是\n温度,以开尔文计。前两项是非色散折射率,第三项是使水汽产生强烈效应\n的偶极项。\n\n出处:ITU-R 建议书 P.453,它给出湿空气折射率的这一表达式。",
"associated": false
},
{
@ -6515,8 +6515,8 @@
"kind": "fn",
"name": "cascade_temperature",
"signature": "pub fn cascade_temperature(stages: &[Stage]) -> Option<NoiseTemperature> {",
"doc": "Returns the noise temperature of a cascade of stages, referred to the\ninput of the first stage.\n\nThe Friis formula weights each stage's contribution by the gain that\nprecedes it:\n\n```text\nT = T_1 + T_2 / G_1 + T_3 / (G_1 G_2) + ...\n```\n\nThe consequence is that the first stage dominates: a noisy second stage\nmatters much less when the first stage has gain. The total temperature is\nthat of the chain, so it can be compared directly with the available\ngain to find the noise figure of the chain.\n\nReturns `None` when any stage is not usable, which includes a gain ratio\nthat is not positive.",
"doc_zh": "返回各级级联的噪声温度,折算到第一级的输入。\n\nFriis 公式按本级之前的增益对每级的贡献加权:\n\n```text\nT = T_1 + T_2 / G_1 + T_3 / (G_1 G_2) + ...\n```\n\n其结果是第一级占主导:当第一级有增益时,噪声大的第二级影响小得多。\n总温度即整链的温度,故可直接与可用增益比较以求得整链的噪声系数。\n\n任一级不可用(包括增益比非正)时返回 `None`。",
"doc": "Returns the noise temperature of a cascade of stages, referred to the\ninput of the first stage.\n\nThe Friis formula weights each stage's contribution by the gain that\nprecedes it:\n\n<div>\n$$\nT = T_1 + \\frac{T_2}{G_1} + \\frac{T_3}{G_1 G_2} + \\cdots\n$$\n</div>\n\nThe consequence is that the first stage dominates: a noisy second stage\nmatters much less when the first stage has gain. The total temperature is\nthat of the chain, so it can be compared directly with the available\ngain to find the noise figure of the chain.\n\nReturns `None` when any stage is not usable, which includes a gain ratio\nthat is not positive.",
"doc_zh": "返回各级级联的噪声温度,折算到第一级的输入。\n\nFriis 公式按本级之前的增益对每级的贡献加权:\n\n<div>\n$$\nT = T_1 + \\frac{T_2}{G_1} + \\frac{T_3}{G_1 G_2} + \\cdots\n$$\n</div>\n\n其结果是第一级占主导:当第一级有增益时,噪声大的第二级影响小得多。\n总温度即整链的温度,故可直接与可用增益比较以求得整链的噪声系数。\n\n任一级不可用(包括增益比非正)时返回 `None`。",
"associated": false
},
{
@ -6715,8 +6715,8 @@
"kind": "fn",
"name": "combine",
"signature": "pub fn combine(first: Decibel, second: Decibel) -> Option<Decibel> {",
"doc": "Combines a ratio with another ratio of the same kind.\n\nWhen two independent impairments act together, their effects add as\nreciprocal ratios, which in decibels means\n\n```text\n1 / R = 1 / R_1 + 1 / R_2\n```\n\nThe result is always below the smaller of the two, so adding a second\nimpairment can only lower the combined ratio. This is how a carrier to\nnoise ratio and a carrier to interference ratio are combined into a\ncarrier to noise plus interference ratio.\n\nReturns `None` when either value is not finite.",
"doc_zh": "把一个比与另一个同类之比合并。\n\n当两种独立损伤共同作用时,它们的效果按倒数之比相加,以分贝表示即\n\n```text\n1 / R = 1 / R_1 + 1 / R_2\n```\n\n结果总低于两者中较小者,故加入第二种损伤只会降低合并之比。载噪比与\n载干比正是这样合并为载波与噪声加干扰之比的。\n\n任一值非有限时返回 `None`。",
"doc": "Combines a ratio with another ratio of the same kind.\n\nWhen two independent impairments act together, their effects add as\nreciprocal ratios, which in decibels means\n\n<div>\n$$\n\\frac{1}{R} = \\frac{1}{R_1} + \\frac{1}{R_2}\n$$\n</div>\n\nThe result is always below the smaller of the two, so adding a second\nimpairment can only lower the combined ratio. This is how a carrier to\nnoise ratio and a carrier to interference ratio are combined into a\ncarrier to noise plus interference ratio.\n\nReturns `None` when either value is not finite.",
"doc_zh": "把一个比与另一个同类之比合并。\n\n当两种独立损伤共同作用时,它们的效果按倒数之比相加,以分贝表示即\n\n<div>\n$$\n\\frac{1}{R} = \\frac{1}{R_1} + \\frac{1}{R_2}\n$$\n</div>\n\n结果总低于两者中较小者,故加入第二种损伤只会降低合并之比。载噪比与\n载干比正是这样合并为载波与噪声加干扰之比的。\n\n任一值非有限时返回 `None`。",
"associated": false
},
{
@ -6739,8 +6739,8 @@
"kind": "fn",
"name": "equivalent_noise_temperature",
"signature": "pub fn equivalent_noise_temperature(interference: Power, bandwidth: f64) -> Option<f64> {",
"doc": "Returns the noise temperature equivalent to an interfering power.\n\nAn interferer that a receiver treats as noise can be folded into the link\nbudget as an increase in system noise temperature. In temperature the\nrelation is\n\n```text\nT = P / (k B)\n```\n\nwith `P` the interfering power, `k` the Boltzmann constant, and `B` the\nreceiver noise bandwidth. The temperature is the value that, added to the\nsystem temperature, would raise the noise by the same amount as the\ninterferer.\n\nReturns `None` when the power is not positive or the bandwidth is not\npositive and finite.",
"doc_zh": "返回与某干扰功率等效的噪声温度。\n\n接收机当作噪声处理的干扰源可以折算为系统噪声温度的增量计入链路\n预算。在温度上关系为\n\n```text\nT = P / (k B)\n```\n\n其中 `P` 是干扰功率,`k` 是玻尔兹曼常量,`B` 是接收机噪声带宽。该\n温度即加到系统温度上会使噪声上升与干扰源相同量的值。\n\n功率非正,或带宽非正且非有限时返回 `None`。",
"doc": "Returns the noise temperature equivalent to an interfering power.\n\nAn interferer that a receiver treats as noise can be folded into the link\nbudget as an increase in system noise temperature. In temperature the\nrelation is\n\n<div>\n$$\nT = \\frac{P}{k B}\n$$\n</div>\n\nwith `P` the interfering power, `k` the Boltzmann constant, and `B` the\nreceiver noise bandwidth. The temperature is the value that, added to the\nsystem temperature, would raise the noise by the same amount as the\ninterferer.\n\nReturns `None` when the power is not positive or the bandwidth is not\npositive and finite.",
"doc_zh": "返回与某干扰功率等效的噪声温度。\n\n接收机当作噪声处理的干扰源可以折算为系统噪声温度的增量计入链路\n预算。在温度上关系为\n\n<div>\n$$\nT = \\frac{P}{k B}\n$$\n</div>\n\n其中 `P` 是干扰功率,`k` 是玻尔兹曼常量,`B` 是接收机噪声带宽。该\n温度即加到系统温度上会使噪声上升与干扰源相同量的值。\n\n功率非正,或带宽非正且非有限时返回 `None`。",
"associated": false
},
{