@snowemperor/cesium-core 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -0,0 +1,552 @@
1
+ ## Classes
2
+
3
+ <dl>
4
+ <dt><a href="#Measure">Measure</a></dt>
5
+ <dd><p>测量工具 - 距离、面积、高度测量</p>
6
+ </dd>
7
+ <dt><a href="#CreateCustomSensor">CreateCustomSensor</a></dt>
8
+ <dd><p>载荷创建类 —— 创建各种卫星载荷工具(SAR、六边形、多波束等)</p>
9
+ </dd>
10
+ </dl>
11
+
12
+ ## Functions
13
+
14
+ <dl>
15
+ <dt><a href="#InitCesium">InitCesium()</a></dt>
16
+ <dd><p>初始化Cesium Viewer</p>
17
+ </dd>
18
+ </dl>
19
+
20
+ ## Typedefs
21
+
22
+ <dl>
23
+ <dt><a href="#InitCesiumConfig">InitCesiumConfig</a> : <code>Object</code></dt>
24
+ <dd><p>Cesium 初始化配置</p>
25
+ </dd>
26
+ </dl>
27
+
28
+ <a name="Measure"></a>
29
+
30
+ ## Measure
31
+ 测量工具 - 距离、面积、高度测量
32
+
33
+ **Kind**: global class
34
+
35
+ * [Measure](#Measure)
36
+ * [new Measure()](#new_Measure_new)
37
+ * [.transformWGS84ToCartographic(position)](#Measure+transformWGS84ToCartographic) ⇒ <code>Object</code>
38
+ * [.getCatesian3FromPX(px)](#Measure+getCatesian3FromPX) ⇒ <code>Object</code>
39
+ * [.getPositionDistance(positions)](#Measure+getPositionDistance)
40
+ * [.getPositionsArea(positions)](#Measure+getPositionsArea)
41
+ * [.drawLineMeasureGraphics(options)](#Measure+drawLineMeasureGraphics)
42
+ * [.drawAreaMeasureGraphics(options)](#Measure+drawAreaMeasureGraphics)
43
+ * [.drawTrianglesMeasureGraphics(options)](#Measure+drawTrianglesMeasureGraphics)
44
+ * [.destroy()](#Measure+destroy)
45
+ * [.clear()](#Measure+clear)
46
+
47
+ <a name="new_Measure_new"></a>
48
+
49
+ ### new Measure()
50
+ 测量计算
51
+
52
+ **Example**
53
+ ```js
54
+ import { Measure } from "cesium-core";
55
+ const measure = new Measure(viewer);
56
+ measure.drawLineMeasureGraphics(); // 测量距离
57
+ measure.drawAreaMeasureGraphics(); // 测量面积
58
+ measure.drawTrianglesMeasureGraphics(); // 三角测量高度
59
+ measure.destroy(); // 销毁
60
+ measure.clear(); // 清除
61
+ ```
62
+ <a name="Measure+transformWGS84ToCartographic"></a>
63
+
64
+ ### measure.transformWGS84ToCartographic(position) ⇒ <code>Object</code>
65
+ 84坐标转弧度坐标
66
+
67
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
68
+ **Returns**: <code>Object</code> - Cartographic 弧度坐标
69
+
70
+ | Param | Type | Description |
71
+ | --- | --- | --- |
72
+ | position | <code>Object</code> | wgs84 |
73
+
74
+ <a name="Measure+getCatesian3FromPX"></a>
75
+
76
+ ### measure.getCatesian3FromPX(px) ⇒ <code>Object</code>
77
+ 拾取位置点
78
+
79
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
80
+ **Returns**: <code>Object</code> - Cartesian3 三维坐标
81
+
82
+ | Param | Type | Description |
83
+ | --- | --- | --- |
84
+ | px | <code>Object</code> | 屏幕坐标 |
85
+
86
+ <a name="Measure+getPositionDistance"></a>
87
+
88
+ ### measure.getPositionDistance(positions)
89
+ 获取84坐标的距离
90
+
91
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
92
+
93
+ | Param | Type |
94
+ | --- | --- |
95
+ | positions | <code>\*</code> |
96
+
97
+ <a name="Measure+getPositionsArea"></a>
98
+
99
+ ### measure.getPositionsArea(positions)
100
+ 计算一组坐标组成多边形的面积
101
+
102
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
103
+
104
+ | Param | Type |
105
+ | --- | --- |
106
+ | positions | <code>\*</code> |
107
+
108
+ <a name="Measure+drawLineMeasureGraphics"></a>
109
+
110
+ ### measure.drawLineMeasureGraphics(options)
111
+ 测距
112
+
113
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
114
+
115
+ | Param | Type | Description |
116
+ | --- | --- | --- |
117
+ | options | <code>\*</code> | 默认即可暂时可以不传递 |
118
+ | options.width | <code>\*</code> | 线宽 |
119
+ | options.material | <code>\*</code> | 线颜色 |
120
+ | options.clampToGround | <code>\*</code> | 是否贴地 |
121
+ | options.callback | <code>\*</code> | 回调函数 |
122
+
123
+ <a name="Measure+drawAreaMeasureGraphics"></a>
124
+
125
+ ### measure.drawAreaMeasureGraphics(options)
126
+ 测面积
127
+
128
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
129
+
130
+ | Param | Type |
131
+ | --- | --- |
132
+ | options | <code>\*</code> |
133
+
134
+ <a name="Measure+drawTrianglesMeasureGraphics"></a>
135
+
136
+ ### measure.drawTrianglesMeasureGraphics(options)
137
+ 画三角量测
138
+
139
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
140
+
141
+ | Param | Type |
142
+ | --- | --- |
143
+ | options | <code>\*</code> |
144
+
145
+ <a name="Measure+destroy"></a>
146
+
147
+ ### measure.destroy()
148
+ 销毁
149
+
150
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
151
+ <a name="Measure+clear"></a>
152
+
153
+ ### measure.clear()
154
+ 清除
155
+
156
+ **Kind**: instance method of [<code>Measure</code>](#Measure)
157
+ <a name="CreateCustomSensor"></a>
158
+
159
+ ## CreateCustomSensor
160
+ 载荷创建类 —— 创建各种卫星载荷工具(SAR、六边形、多波束等)
161
+
162
+ **Kind**: global class
163
+
164
+ * [CreateCustomSensor](#CreateCustomSensor)
165
+ * [new CreateCustomSensor()](#new_CreateCustomSensor_new)
166
+ * _instance_
167
+ * [.removeSensorFromSatellite(id)](#CreateCustomSensor+removeSensorFromSatellite)
168
+ * [.InitCreateSarOrCurtomSensor(isSar, isConicCustom, isHexagonal)](#CreateCustomSensor+InitCreateSarOrCurtomSensor)
169
+ * [.createSARSensor(viewer, id, oHalfAngle, iHalfAngle, maxRoll, isRadians, isCzml, czmlIndex)](#CreateCustomSensor+createSARSensor)
170
+ * [.createConicSensorByCustom(id, isClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallBeamAngle)](#CreateCustomSensor+createConicSensorByCustom)
171
+ * [.createHexagonalSensorByCustom(id, isHexagonalClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallHalfAngleDeg)](#CreateCustomSensor+createHexagonalSensorByCustom)
172
+ * [.createConicsensor(id, halfAngle, isCzml, czmlIndex, isMount, isHasOrientation, isVeocityOrientation)](#CreateCustomSensor+createConicsensor) ⇒ <code>\*</code>
173
+ * [.createRectSensor(id, yHalfAngle, xHalfAngle, isCzml, czmlIndex, isMount, isHasOrientation, isVeocityOrientation)](#CreateCustomSensor+createRectSensor) ⇒ <code>\*</code>
174
+ * [.constrollOrientationOnlyRoll(id, rollAngle, isCzml, czmlIndex)](#CreateCustomSensor+constrollOrientationOnlyRoll)
175
+ * [.constrollOrientationByHeadingPitchRoll(id, rotationValues, isCzml, czmlIndex)](#CreateCustomSensor+constrollOrientationByHeadingPitchRoll)
176
+ * [.constrollOrientationByFromRotation(id, rotationValues, isCzml, czmlIndex)](#CreateCustomSensor+constrollOrientationByFromRotation)
177
+ * [.initSlerpControl(id, rollAngle, durationSeconds, isCzml, czmlIndex)](#CreateCustomSensor+initSlerpControl)
178
+ * [.toggleSatelliteSideLook(id)](#CreateCustomSensor+toggleSatelliteSideLook)
179
+ * _static_
180
+ * [.autobind(instance)](#CreateCustomSensor.autobind)
181
+ * [.generateClusterBeams(bigHalfAngleDeg, smallHalfAngleDeg)](#CreateCustomSensor.generateClusterBeams) ⇒ <code>Array</code>
182
+ * [.generateHexagonalClusterBeams(bigHalfAngleDeg, smallHexHalfAngleDeg)](#CreateCustomSensor.generateHexagonalClusterBeams)
183
+ * [.convertStkSarToCesiumParams(stkEleMin, stkEleMax, stkExclForward, stkExclAft)](#CreateCustomSensor.convertStkSarToCesiumParams) ⇒ <code>Object</code>
184
+
185
+ <a name="new_CreateCustomSensor_new"></a>
186
+
187
+ ### new CreateCustomSensor()
188
+ 载荷创建类 —— 创建各种卫星载荷工具(SAR、六边形、多波束等)
189
+
190
+ **Example**
191
+ ```js
192
+ import { CreateCustomSensor } from "cesium-core";
193
+ let customSensor = new CreateCustomSensor();
194
+ customSensor.InitCreateSarOrCurtomSensor(true, true, false);
195
+ 初始化完毕后,调用以下方法
196
+ customSensor.setViewer(viewer);
197
+ customSensor.createSARSensor('Satellite/Satellite3',10,72,2,false,true,0);
198
+ 普通圆形载荷
199
+ var cone = customSensor.createConicsensor('Satellite/Satellite3',10,true,0,true)
200
+ viewer.entities.add(cone)
201
+ 普通矩形载荷
202
+ var rect = customSensor.createRectSensor('Satellite/Satellite3',10,true,0,true)
203
+ viewer.entities.add(cone)
204
+ 自定义圆形载荷(不覆盖圆形范围)
205
+ customSensor.createConicSensorByCustom('Satellite/Satellite3',false,[
206
+ { pitch: 0, roll: 0, halfAngle: Cesium.Math.toRadians(10) },
207
+
208
+ {
209
+ pitch: 0,
210
+ roll: Cesium.Math.toRadians(20),
211
+ halfAngle: Cesium.Math.toRadians(5),
212
+ },
213
+
214
+ {
215
+ pitch: 0,
216
+ roll: Cesium.Math.toRadians(-20),
217
+ halfAngle: Cesium.Math.toRadians(5),
218
+ },
219
+
220
+ {
221
+ pitch: Cesium.Math.toRadians(20),
222
+ roll: 0,
223
+ halfAngle: Cesium.Math.toRadians(5),
224
+ },
225
+
226
+ {
227
+ pitch: Cesium.Math.toRadians(-20),
228
+ roll: 0,
229
+ halfAngle: Cesium.Math.toRadians(5),
230
+ },
231
+ ],true,0)
232
+ 自定义圆形载荷(覆盖圆形范围)
233
+ customSensor.createConicSensorByCustom('Satellite/Satellite3',true,[],true,0)
234
+ 自定义矩形载荷(不覆盖圆形范围)
235
+ customSensor.createHexagonalSensorByCustom('Satellite/Satellite3',false,[
236
+ { pitch: 0, roll: 0, halfAngle: Cesium.Math.toRadians(10) },
237
+
238
+ {
239
+ pitch: 0,
240
+ roll: Cesium.Math.toRadians(20),
241
+ halfAngle: Cesium.Math.toRadians(5),
242
+ },
243
+
244
+ {
245
+ pitch: 0,
246
+ roll: Cesium.Math.toRadians(-20),
247
+ halfAngle: Cesium.Math.toRadians(5),
248
+ },
249
+
250
+ {
251
+ pitch: Cesium.Math.toRadians(20),
252
+ roll: 0,
253
+ halfAngle: Cesium.Math.toRadians(5),
254
+ },
255
+
256
+ {
257
+ pitch: Cesium.Math.toRadians(-20),
258
+ roll: 0,
259
+ halfAngle: Cesium.Math.toRadians(5),
260
+ },
261
+ ],true,0)
262
+ 自定义矩形载荷(覆盖圆形范围)
263
+ customSensor.createHexagonalSensorByCustom('Satellite/Satellite3',true,[],true,0)
264
+ ```
265
+ <a name="CreateCustomSensor+removeSensorFromSatellite"></a>
266
+
267
+ ### createCustomSensor.removeSensorFromSatellite(id)
268
+ 移除指定卫星上的所有自定义载荷
269
+
270
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
271
+
272
+ | Param | Type | Description |
273
+ | --- | --- | --- |
274
+ | id | <code>String</code> | 卫星ID |
275
+
276
+ <a name="CreateCustomSensor+InitCreateSarOrCurtomSensor"></a>
277
+
278
+ ### createCustomSensor.InitCreateSarOrCurtomSensor(isSar, isConicCustom, isHexagonal)
279
+ 创建自定义sensor初始化函数
280
+
281
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
282
+
283
+ | Param | Type | Default | Description |
284
+ | --- | --- | --- | --- |
285
+ | isSar | <code>\*</code> | <code>false</code> | 是否初始化SAR |
286
+ | isConicCustom | <code>\*</code> | <code>false</code> | 是否初始化自定义圆锥 |
287
+ | isHexagonal | <code>\*</code> | <code>false</code> | 是否初始化自定义六边形 |
288
+
289
+ <a name="CreateCustomSensor+createSARSensor"></a>
290
+
291
+ ### createCustomSensor.createSARSensor(viewer, id, oHalfAngle, iHalfAngle, maxRoll, isRadians, isCzml, czmlIndex)
292
+ 创建自定义SAR载荷
293
+
294
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
295
+
296
+ | Param | Type | Description |
297
+ | --- | --- | --- |
298
+ | viewer | <code>\*</code> | |
299
+ | id | <code>\*</code> | 卫星ID |
300
+ | oHalfAngle | <code>\*</code> | 外角 度 |
301
+ | iHalfAngle | <code>\*</code> | 内角 度 |
302
+ | maxRoll | <code>\*</code> | 厚度 度 |
303
+ | isRadians | <code>\*</code> | 弧度单位标志 |
304
+ | isCzml | <code>\*</code> | 是否是CZML实体 |
305
+ | czmlIndex | <code>\*</code> | CZML索引 |
306
+
307
+ <a name="CreateCustomSensor+createConicSensorByCustom"></a>
308
+
309
+ ### createCustomSensor.createConicSensorByCustom(id, isClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallBeamAngle)
310
+ 自定义多波束载荷
311
+
312
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
313
+
314
+ | Param | Type | Default | Description |
315
+ | --- | --- | --- | --- |
316
+ | id | <code>\*</code> | | 卫星ID |
317
+ | isClusterBeams | <code>\*</code> | <code>false</code> | 是否是聚类模式,true 则生成聚类模式的多波束载荷,false 则生成自定义多波束载荷 |
318
+ | beamsArr | <code>\*</code> | | 圆形集合 包含pitch roll halfAngle pitch 俯仰 roll偏航角 单位 弧度 |
319
+ | isCzml | <code>\*</code> | <code>false</code> | 是否是CZML实体 |
320
+ | czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
321
+ | bigCircleAngle | <code>\*</code> | <code>10</code> | 大圆形的半径角度 度 (需要覆盖的区域角度) |
322
+ | smallBeamAngle | <code>\*</code> | <code>2.5</code> | 小圆形的半径角度 度 |
323
+
324
+ <a name="CreateCustomSensor+createHexagonalSensorByCustom"></a>
325
+
326
+ ### createCustomSensor.createHexagonalSensorByCustom(id, isHexagonalClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallHalfAngleDeg)
327
+ 自定义六边形多波束载荷
328
+
329
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
330
+
331
+ | Param | Type | Default | Description |
332
+ | --- | --- | --- | --- |
333
+ | id | <code>\*</code> | | 卫星ID |
334
+ | isHexagonalClusterBeams | <code>\*</code> | <code>false</code> | 是否是聚类模式,true 则生成聚类模式的多波束载荷,false 则生成自定义多波束载荷 |
335
+ | beamsArr | <code>\*</code> | | 六边形集合 包含pitch roll halfAngle pitch 俯仰 roll偏航角 单位 弧度 |
336
+ | isCzml | <code>\*</code> | <code>false</code> | 是否是CZML实体 |
337
+ | czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
338
+ | bigCircleAngle | <code>\*</code> | <code>20</code> | 大圆形的半径角度 度 (需要覆盖的区域角度) |
339
+ | smallHalfAngleDeg | <code>\*</code> | <code>2</code> | 小六边形的半径角度 度 |
340
+
341
+ <a name="CreateCustomSensor+createConicsensor"></a>
342
+
343
+ ### createCustomSensor.createConicsensor(id, halfAngle, isCzml, czmlIndex, isMount, isHasOrientation, isVeocityOrientation) ⇒ <code>\*</code>
344
+ 创建卫星圆形载荷
345
+
346
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
347
+ **Returns**: <code>\*</code> - 载荷实体
348
+
349
+ | Param | Type | Default | Description |
350
+ | --- | --- | --- | --- |
351
+ | id | <code>\*</code> | | 卫星ID |
352
+ | halfAngle | <code>\*</code> | | 半角 度 |
353
+ | isCzml | <code>\*</code> | <code>true</code> | 是否是CZML实体 |
354
+ | czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
355
+ | isMount | <code>\*</code> | <code>false</code> | 是否挂载到卫星实体上,挂在到卫星实体上,后两个参数不用管有默认值 |
356
+ | isHasOrientation | <code>\*</code> | <code>true</code> | 是否有姿态(主要是问为卫星实体上是否存在,为true,会自动找卫星实体上的姿态数据 |
357
+ | isVeocityOrientation | <code>\*</code> | <code>false</code> | 姿态是否有速度姿态构建 后两个参数都是false,会通过heading/pitch/roll 根据位置自动对比,如果单纯isVeocityOrientation为true则姿态遵循速度方向 |
358
+
359
+ <a name="CreateCustomSensor+createRectSensor"></a>
360
+
361
+ ### createCustomSensor.createRectSensor(id, yHalfAngle, xHalfAngle, isCzml, czmlIndex, isMount, isHasOrientation, isVeocityOrientation) ⇒ <code>\*</code>
362
+ 创建卫星矩形载荷
363
+
364
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
365
+ **Returns**: <code>\*</code> - 载荷实体
366
+
367
+ | Param | Type | Default | Description |
368
+ | --- | --- | --- | --- |
369
+ | id | <code>\*</code> | | 卫星ID |
370
+ | yHalfAngle | <code>\*</code> | | Y轴方向 运行方向 半角 度 |
371
+ | xHalfAngle | <code>\*</code> | | X轴方向 垂直运动方向 半角 度 |
372
+ | isCzml | <code>\*</code> | <code>true</code> | 是否是CZML实体 |
373
+ | czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
374
+ | isMount | <code>\*</code> | <code>false</code> | 是否挂载到卫星实体上 |
375
+ | isHasOrientation | <code>\*</code> | <code>true</code> | 是否有姿态 |
376
+ | isVeocityOrientation | <code>\*</code> | <code>false</code> | 姿态是否有速度姿态构建 |
377
+
378
+ <a name="CreateCustomSensor+constrollOrientationOnlyRoll"></a>
379
+
380
+ ### createCustomSensor.constrollOrientationOnlyRoll(id, rollAngle, isCzml, czmlIndex)
381
+ constrollOrientation 控制载荷侧摆使用,这个是直接就侧摆了,没有滑动效果
382
+
383
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
384
+
385
+ | Param | Type | Default | Description |
386
+ | --- | --- | --- | --- |
387
+ | id | <code>\*</code> | | |
388
+ | rollAngle | <code>\*</code> | | 侧摆的角度 度 可正可负,正右摆,负左摆 |
389
+ | isCzml | <code>\*</code> | <code>false</code> | 是否为CZML数据源 |
390
+ | czmlIndex | <code>\*</code> | <code>0</code> | 数据源索引 |
391
+
392
+ <a name="CreateCustomSensor+constrollOrientationByHeadingPitchRoll"></a>
393
+
394
+ ### createCustomSensor.constrollOrientationByHeadingPitchRoll(id, rotationValues, isCzml, czmlIndex)
395
+ 控制卫星姿态侧拍(支持三轴旋转叠加)通过heading pitch roll 构造hpr的结构更改
396
+
397
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
398
+
399
+ | Param | Type | Default | Description |
400
+ | --- | --- | --- | --- |
401
+ | id | <code>String</code> | | 卫星ID |
402
+ | rotationValues | <code>Object</code> | | 旋转角度(度): { x: 0, y: 0, z: 0 } 其中x对应roll,y对应pitch ,z对应heading |
403
+ | isCzml | <code>Boolean</code> | <code>false</code> | 是否为CZML数据源 |
404
+ | czmlIndex | <code>Number</code> | <code>0</code> | 数据源索引 |
405
+
406
+ <a name="CreateCustomSensor+constrollOrientationByFromRotation"></a>
407
+
408
+ ### createCustomSensor.constrollOrientationByFromRotation(id, rotationValues, isCzml, czmlIndex)
409
+ 控制卫星姿态侧拍(支持三轴旋转叠加)通过fromRotation x/y/z旋转矩阵 构造姿态数据 这个要恢复,必须是输入多少 ,二次输入同样的负值才能回到原位,不然依旧是在原基础上进行相加流入 x:50 x:1 则是 x:51
410
+
411
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
412
+
413
+ | Param | Type | Default | Description |
414
+ | --- | --- | --- | --- |
415
+ | id | <code>\*</code> | | 卫星id |
416
+ | rotationValues | <code>\*</code> | | 旋转角度(度): { x: 0, y: 0, z: 0 } 其中x对应roll,y对应pitch ,z对应heading |
417
+ | isCzml | <code>\*</code> | <code>false</code> | 是否为CZML数据源 |
418
+ | czmlIndex | <code>\*</code> | <code>0</code> | 数据源索引 |
419
+
420
+ <a name="CreateCustomSensor+initSlerpControl"></a>
421
+
422
+ ### createCustomSensor.initSlerpControl(id, rollAngle, durationSeconds, isCzml, czmlIndex)
423
+ 初始化并获取卫星的侧拍控制开关,
424
+ 控制载荷侧摆使用,这个是慢慢侧摆过去,带有滑动效果,存在离散值的,其中传递的值为正则为向左侧摆,传递的值为负,则向右侧拍
425
+
426
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
427
+
428
+ | Param | Type | Description |
429
+ | --- | --- | --- |
430
+ | id | <code>\*</code> | 卫星id |
431
+ | rollAngle | <code>\*</code> | 侧拍角度 度 |
432
+ | durationSeconds | <code>\*</code> | 侧拍持续时间 秒 整秒 |
433
+ | isCzml | <code>\*</code> | 是否为CZML数据源 |
434
+ | czmlIndex | <code>\*</code> | 数据源索引 |
435
+
436
+ <a name="CreateCustomSensor+toggleSatelliteSideLook"></a>
437
+
438
+ ### createCustomSensor.toggleSatelliteSideLook(id)
439
+ 外部调用的接口,控制每颗卫星进行姿态调整
440
+
441
+ **Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
442
+
443
+ | Param | Type | Description |
444
+ | --- | --- | --- |
445
+ | id | <code>\*</code> | 卫星id |
446
+
447
+ <a name="CreateCustomSensor.autobind"></a>
448
+
449
+ ### CreateCustomSensor.autobind(instance)
450
+ 自动绑定方法
451
+
452
+ **Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
453
+
454
+ | Param | Type |
455
+ | --- | --- |
456
+ | instance | <code>\*</code> |
457
+
458
+ <a name="CreateCustomSensor.generateClusterBeams"></a>
459
+
460
+ ### CreateCustomSensor.generateClusterBeams(bigHalfAngleDeg, smallHalfAngleDeg) ⇒ <code>Array</code>
461
+ 动态生成蜂窝状覆盖的波束簇
462
+
463
+ **Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
464
+ **Returns**: <code>Array</code> - 返回 MultiCircularSensor 需要的 beams 配置数组
465
+
466
+ | Param | Type | Description |
467
+ | --- | --- | --- |
468
+ | bigHalfAngleDeg | <code>Number</code> | 大圆的总覆盖半径(度) |
469
+ | smallHalfAngleDeg | <code>Number</code> | 单个小圆形波束的半径(度) |
470
+
471
+ <a name="CreateCustomSensor.generateHexagonalClusterBeams"></a>
472
+
473
+ ### CreateCustomSensor.generateHexagonalClusterBeams(bigHalfAngleDeg, smallHexHalfAngleDeg)
474
+ 动态生成完美无缝拼接的【六边形】波束簇
475
+
476
+ **Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
477
+
478
+ | Param | Type | Description |
479
+ | --- | --- | --- |
480
+ | bigHalfAngleDeg | <code>Number</code> | 大圆的总覆盖半径(度) |
481
+ | smallHexHalfAngleDeg | <code>Number</code> | 单个小六边形外接圆的半径半角(度) |
482
+
483
+ <a name="CreateCustomSensor.convertStkSarToCesiumParams"></a>
484
+
485
+ ### CreateCustomSensor.convertStkSarToCesiumParams(stkEleMin, stkEleMax, stkExclForward, stkExclAft) ⇒ <code>Object</code>
486
+ 将 STK 的 SAR 载荷参数转换为 Cesium/newSARSensor.js 的几何参数
487
+
488
+ **Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)
489
+ **Returns**: <code>Object</code> - 返回供 Cesium 载荷直接使用的弧度值
490
+ 示例
491
+ 假设这是从你的接口或配置中读取的 STK 参数 ------这里是测试数据及样例,不能删除
492
+ const stkParams = {
493
+ elevationMin: 10,
494
+ elevationMax: 77,
495
+ exclusionForward: 80,
496
+ exclusionAft: 80
497
+ };
498
+
499
+ // 1. 进行参数转换
500
+ const cesiumSarParams = convertStkSarToCesiumParams(
501
+ stkParams.elevationMin,
502
+ stkParams.elevationMax,
503
+ stkParams.exclusionForward,
504
+ stkParams.exclusionAft
505
+ );
506
+
507
+ | Param | Type | Description |
508
+ | --- | --- | --- |
509
+ | stkEleMin | <code>Number</code> | STK Elevation Min (度) - 例如 10 |
510
+ | stkEleMax | <code>Number</code> | STK Elevation Max (度) - 例如 55 |
511
+ | stkExclForward | <code>Number</code> | STK Exclusion Forward (度) - 例如 80 |
512
+ | stkExclAft | <code>Number</code> | STK Exclusion Aft (度) - 例如 80 (通常与Forward对称) |
513
+
514
+ <a name="InitCesium"></a>
515
+
516
+ ## InitCesium()
517
+ 初始化Cesium Viewer
518
+
519
+ **Kind**: global function
520
+ **Example**
521
+ ```js
522
+ import { InitCesium } from "cesium-core";
523
+ containerId: "ID",
524
+ titleUrl: "",
525
+ imageryUrl:
526
+ import.meta.env.VITE_APP_OL_URL + "/image/mapbox/{z}/{x}/{y}.png",
527
+ terrainUrl: import.meta.env.VITE_APP_OL_URL + "/terrain",
528
+ fullscreenButton: true,
529
+ sceneModePicker: true,
530
+ homeButton: false,
531
+ maximumLevel: 9,
532
+ })
533
+ ```
534
+ <a name="InitCesiumConfig"></a>
535
+
536
+ ## InitCesiumConfig : <code>Object</code>
537
+ Cesium 初始化配置
538
+
539
+ **Kind**: global typedef
540
+ **Properties**
541
+
542
+ | Name | Type | Description |
543
+ | --- | --- | --- |
544
+ | containerId | <code>string</code> | |
545
+ | [imageryUrl] | <code>string</code> | |
546
+ | [terrainUrl] | <code>string</code> | |
547
+ | [titleUrl] | <code>string</code> | |
548
+ | [fullscreenButton] | <code>boolean</code> | |
549
+ | [sceneModePicker] | <code>boolean</code> | |
550
+ | [homeButton] | <code>boolean</code> | |
551
+ | [maximumLevel] | <code>number</code> | let init = InitCesium({ containerId: "viewer-container", titleUrl: "", imageryUrl: import.meta.env.VITE_APP_OL_URL + "/image/mapbox/{z}/{x}/{y}.png", terrainUrl: import.meta.env.VITE_APP_OL_URL + "/terrain", fullscreenButton: true, sceneModePicker: true, homeButton: false, maximumLevel: 9, }); |
552
+