MCPcopy Create free account
hub / github.com/Tong89/smartNode / computeCoverageRadius

Function computeCoverageRadius

frontend/app.js:1088–1096  ·  view source on GitHub ↗

* 根据卫星/中继高度和最小仰角计算地面覆盖半径(米)。 * * 几何关系(球形地球): * R_E — 地球半径 6371 km * h — 卫星高度(米) * ε — 最小仰角(度) * * 天底角 ρ:cos(ρ) = R_E / (R_E + h) * 地心角 λ = 90° − ε − ρ * 地面覆盖半径 = R_E × λ(弧度制)

(altitudeM, minElevationDeg)

Source from the content-addressed store, hash-verified

1086 * 地面覆盖半径 = R_E × λ(弧度制)
1087 */
1088 computeCoverageRadius(altitudeM, minElevationDeg) {
1089 const R_E = 6371000;
1090 const h = Math.max(altitudeM || 0, 0);
1091 const cosNadir = R_E / (R_E + h);
1092 const nadirRad = Math.acos(Math.min(1, cosNadir));
1093 const minElRad = (minElevationDeg * Math.PI) / 180;
1094 const earthCentralAngleRad = Math.max(0, Math.PI / 2 - minElRad - nadirRad);
1095 return R_E * earthCentralAngleRad;
1096 },
1097
1098 /**
1099 * 新增或更新一个贴地覆盖圆(椭圆)实体。

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected