npm package: @snowemperor/cesium-core
Description: Cesium initialization and common utilities
Latest version: 0.2.6

## Classes

<dl>
<dt><a href="#Measure">Measure</a></dt>
<dd><p>测量工具 - 距离、面积、高度测量</p>
</dd>
<dt><a href="#CreateCustomSensor">CreateCustomSensor</a></dt>
<dd><p>载荷创建类 —— 创建各种卫星载荷工具（SAR、六边形、多波束等）</p>
</dd>
</dl>

## Functions

<dl>
<dt><a href="#InitCesium">InitCesium()</a></dt>
<dd><p>初始化Cesium Viewer</p>
</dd>
</dl>

## Typedefs

<dl>
<dt><a href="#InitCesiumConfig">InitCesiumConfig</a> : <code>Object</code></dt>
<dd><p>Cesium 初始化配置</p>
</dd>
</dl>

<a name="Measure"></a>

## Measure
测量工具 - 距离、面积、高度测量

**Kind**: global class  

* [Measure](#Measure)
    * [new Measure()](#new_Measure_new)
    * [.transformWGS84ToCartographic(position)](#Measure+transformWGS84ToCartographic) ⇒ <code>Object</code>
    * [.getCatesian3FromPX(px)](#Measure+getCatesian3FromPX) ⇒ <code>Object</code>
    * [.getPositionDistance(positions)](#Measure+getPositionDistance)
    * [.getPositionsArea(positions)](#Measure+getPositionsArea)
    * [.drawLineMeasureGraphics(options)](#Measure+drawLineMeasureGraphics)
    * [.drawAreaMeasureGraphics(options)](#Measure+drawAreaMeasureGraphics)
    * [.drawTrianglesMeasureGraphics(options)](#Measure+drawTrianglesMeasureGraphics)
    * [.destroy()](#Measure+destroy)
    * [.clear()](#Measure+clear)

<a name="new_Measure_new"></a>

### new Measure()
测量计算

**Example**  
```js
import { Measure } from "cesium-core";
const measure = new Measure(viewer);
measure.drawLineMeasureGraphics(); // 测量距离
measure.drawAreaMeasureGraphics(); // 测量面积
measure.drawTrianglesMeasureGraphics(); // 三角测量高度
measure.destroy(); // 销毁
measure.clear(); // 清除
```
<a name="Measure+transformWGS84ToCartographic"></a>

### measure.transformWGS84ToCartographic(position) ⇒ <code>Object</code>
84坐标转弧度坐标

**Kind**: instance method of [<code>Measure</code>](#Measure)  
**Returns**: <code>Object</code> - Cartographic 弧度坐标  

| Param | Type | Description |
| --- | --- | --- |
| position | <code>Object</code> | wgs84 |

<a name="Measure+getCatesian3FromPX"></a>

### measure.getCatesian3FromPX(px) ⇒ <code>Object</code>
拾取位置点

**Kind**: instance method of [<code>Measure</code>](#Measure)  
**Returns**: <code>Object</code> - Cartesian3 三维坐标  

| Param | Type | Description |
| --- | --- | --- |
| px | <code>Object</code> | 屏幕坐标 |

<a name="Measure+getPositionDistance"></a>

### measure.getPositionDistance(positions)
获取84坐标的距离

**Kind**: instance method of [<code>Measure</code>](#Measure)  

| Param | Type |
| --- | --- |
| positions | <code>\*</code> | 

<a name="Measure+getPositionsArea"></a>

### measure.getPositionsArea(positions)
计算一组坐标组成多边形的面积

**Kind**: instance method of [<code>Measure</code>](#Measure)  

| Param | Type |
| --- | --- |
| positions | <code>\*</code> | 

<a name="Measure+drawLineMeasureGraphics"></a>

### measure.drawLineMeasureGraphics(options)
测距

**Kind**: instance method of [<code>Measure</code>](#Measure)  

| Param | Type | Description |
| --- | --- | --- |
| options | <code>\*</code> | 默认即可暂时可以不传递 |
| options.width | <code>\*</code> | 线宽 |
| options.material | <code>\*</code> | 线颜色 |
| options.clampToGround | <code>\*</code> | 是否贴地 |
| options.callback | <code>\*</code> | 回调函数 |

<a name="Measure+drawAreaMeasureGraphics"></a>

### measure.drawAreaMeasureGraphics(options)
测面积

**Kind**: instance method of [<code>Measure</code>](#Measure)  

| Param | Type |
| --- | --- |
| options | <code>\*</code> | 

<a name="Measure+drawTrianglesMeasureGraphics"></a>

### measure.drawTrianglesMeasureGraphics(options)
画三角量测

**Kind**: instance method of [<code>Measure</code>](#Measure)  

| Param | Type |
| --- | --- |
| options | <code>\*</code> | 

<a name="Measure+destroy"></a>

### measure.destroy()
销毁

**Kind**: instance method of [<code>Measure</code>](#Measure)  
<a name="Measure+clear"></a>

### measure.clear()
清除

**Kind**: instance method of [<code>Measure</code>](#Measure)  
<a name="CreateCustomSensor"></a>

## CreateCustomSensor
载荷创建类 —— 创建各种卫星载荷工具（SAR、六边形、多波束等）

**Kind**: global class  

* [CreateCustomSensor](#CreateCustomSensor)
    * [new CreateCustomSensor()](#new_CreateCustomSensor_new)
    * _instance_
        * [.removeSensorFromSatellite(id, isCzml, czmlIndex)](#CreateCustomSensor+removeSensorFromSatellite)
        * [.InitCreateSarOrCurtomSensor(isSar, isConicCustom, isHexagonal)](#CreateCustomSensor+InitCreateSarOrCurtomSensor)
        * [.createSARSensor(id, oHalfAngle, iHalfAngle, maxRoll, radius, isMount, isRadians, isCzml, czmlIndex, orienMark)](#CreateCustomSensor+createSARSensor)
        * [.createConicSensorByCustom(id, isClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallBeamAngle, radius, isMount, orienMark)](#CreateCustomSensor+createConicSensorByCustom)
        * [.createHexagonalSensorByCustom(id, isHexagonalClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallHalfAngleDeg, radius, isMount, orienMark)](#CreateCustomSensor+createHexagonalSensorByCustom)
        * [.createConicSensor(id, halfAngle, radius, isCzml, czmlIndex, isMount, orienMark)](#CreateCustomSensor+createConicSensor) ⇒ <code>\*</code>
        * [.createRectSensor(id, yHalfAngle, xHalfAngle, radius, isCzml, czmlIndex, isMount, orienMark)](#CreateCustomSensor+createRectSensor) ⇒ <code>\*</code>
        * [.constrollOrientationOnlyRoll(id, rollAngle, isCzml, czmlIndex)](#CreateCustomSensor+constrollOrientationOnlyRoll)
        * [.constrollOrientationByHeadingPitchRoll(id, rotationValues, isCzml, czmlIndex)](#CreateCustomSensor+constrollOrientationByHeadingPitchRoll)
        * [.constrollOrientationByFromRotation(id, rotationValues, isCzml, czmlIndex)](#CreateCustomSensor+constrollOrientationByFromRotation)
        * [.initSlerpControl(id, rollAngle, durationSeconds, isCzml, czmlIndex)](#CreateCustomSensor+initSlerpControl)
        * [.toggleSatelliteSideLook(id)](#CreateCustomSensor+toggleSatelliteSideLook)
    * _static_
        * [.autobind(instance)](#CreateCustomSensor.autobind)
        * [.judgeEntityHasOrientation(satelliteEntity, orienMark)](#CreateCustomSensor.judgeEntityHasOrientation)
        * [.createDependenceSARSensor(id, satelliteEntity, oHalfAngle, iHalfAngle, maxRoll, radius, isRadians)](#CreateCustomSensor.createDependenceSARSensor)
        * [.createIndependentSARSensor(id, satelliteEntity, oHalfAngle, iHalfAngle, maxRoll, radius, isRadians)](#CreateCustomSensor.createIndependentSARSensor)
        * [.createDependenceConicCustom(id, satelliteEntity, beams, radius)](#CreateCustomSensor.createDependenceConicCustom)
        * [.createIndependentConicCustom(id, satelliteEntity, beams, radius)](#CreateCustomSensor.createIndependentConicCustom)
        * [.createDependenceHexagonalCustom(id, satelliteEntity, beams, radius)](#CreateCustomSensor.createDependenceHexagonalCustom)
        * [.createIndependentHexagonalCustom(id, satelliteEntity, beams, radius)](#CreateCustomSensor.createIndependentHexagonalCustom)
        * [.createDependenceConicSensor(id, satelliteEntity, halfAngle, radius)](#CreateCustomSensor.createDependenceConicSensor)
        * [.createIndependentConicSensor(id, satelliteEntity, halfAngle, radius)](#CreateCustomSensor.createIndependentConicSensor)
        * [.createDependenceRectSensor(id, satelliteEntity, yHalfAngle, xHalfAngle, radius)](#CreateCustomSensor.createDependenceRectSensor)
        * [.createIndependentRectSensor(id, satelliteEntity, yHalfAngle, xHalfAngle, radius)](#CreateCustomSensor.createIndependentRectSensor)
        * [.generateClusterBeams(bigHalfAngleDeg, smallHalfAngleDeg)](#CreateCustomSensor.generateClusterBeams) ⇒ <code>Array</code>
        * [.generateHexagonalClusterBeams(bigHalfAngleDeg, smallHexHalfAngleDeg)](#CreateCustomSensor.generateHexagonalClusterBeams)
        * [.convertStkSarToCesiumParams(stkEleMin, stkEleMax, stkExclForward, stkExclAft)](#CreateCustomSensor.convertStkSarToCesiumParams) ⇒ <code>Object</code>

<a name="new_CreateCustomSensor_new"></a>

### new CreateCustomSensor()
载荷创建类 —— 创建各种卫星载荷工具（SAR、六边形、多波束等）

**Example**  
```js
import { CreateCustomSensor } from "cesium-core";
let customSensor = new CreateCustomSensor();
customSensor.InitCreateSarOrCurtomSensor(true, true, false);
initCesium(viewer)初始化完毕后，调用以下方法

customSensor.setViewer(viewer);
创建自定义SAR传感器
customSensor.createSARSensor('Satellite/Satellite3',10,72,2,2e7,true,false,true,0,'HPR');
普通圆形载荷
var cone = customSensor.createConicSensor('Satellite/Satellite3',10,2e7,false,0,true,'HPR')
普通矩形载荷
var rect = customSensor.createRectSensor('Satellite/Satellite3',2,4,2e7,false,0,true,'HPR')
自定义圆形载荷（不覆盖圆形范围）
customSensor.createConicSensorByCustom('Satellite/Satellite3',false,[
          { pitch: 0, roll: 0, halfAngle: Cesium.Math.toRadians(10) },

          {
            pitch: 0,
            roll: Cesium.Math.toRadians(20),
            halfAngle: Cesium.Math.toRadians(5),
          },

          {
            pitch: 0,
            roll: Cesium.Math.toRadians(-20),
            halfAngle: Cesium.Math.toRadians(5),
          },

          {
            pitch: Cesium.Math.toRadians(20),
            roll: 0,
            halfAngle: Cesium.Math.toRadians(5),
          },

          {
            pitch: Cesium.Math.toRadians(-20),
            roll: 0,
            halfAngle: Cesium.Math.toRadians(5),
          },
        ],false,0,10,2.5,2e7,true,'HPR')
自定义圆形载荷（覆盖圆形范围）
  customSensor.createConicSensorByCustom('Satellite/Satellite3',true,[],false,0,10,2.5,2e7,true,'HPR')
自定义矩形载荷（不覆盖圆形范围）
  customSensor.createHexagonalSensorByCustom('Satellite/Satellite3',false,[
          { pitch: 0, roll: 0, halfAngle: Cesium.Math.toRadians(10) },

          {
            pitch: 0,
            roll: Cesium.Math.toRadians(20),
            halfAngle: Cesium.Math.toRadians(5),
          },

          {
            pitch: 0,
            roll: Cesium.Math.toRadians(-20),
            halfAngle: Cesium.Math.toRadians(5),
          },

          {
            pitch: Cesium.Math.toRadians(20),
            roll: 0,
            halfAngle: Cesium.Math.toRadians(5),
          },

          {
            pitch: Cesium.Math.toRadians(-20),
            roll: 0,
            halfAngle: Cesium.Math.toRadians(5),
          },
        ],false,0,20,2,2e7,true,'HPR')
      自定义矩形载荷（覆盖圆形范围）
      customSensor.createHexagonalSensorByCustom('Satellite/Satellite3',true,[],false,0,20,2,2e7,true,'HPR')
```
<a name="CreateCustomSensor+removeSensorFromSatellite"></a>

### createCustomSensor.removeSensorFromSatellite(id, isCzml, czmlIndex)
从卫星上移除传感器载荷

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>String</code> |  | 卫星实体的 ID |
| isCzml | <code>Boolean</code> | <code>false</code> | 是否为 CZML 数据源中的实体 |
| czmlIndex | <code>Number</code> \| <code>String</code> | <code>0</code> | CZML 数据源的索引或名称 |

<a name="CreateCustomSensor+InitCreateSarOrCurtomSensor"></a>

### createCustomSensor.InitCreateSarOrCurtomSensor(isSar, isConicCustom, isHexagonal)
创建自定义sensor初始化函数

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| isSar | <code>\*</code> | <code>false</code> | 是否初始化SAR |
| isConicCustom | <code>\*</code> | <code>false</code> | 是否初始化自定义圆锥 |
| isHexagonal | <code>\*</code> | <code>false</code> | 是否初始化自定义六边形 |

<a name="CreateCustomSensor+createSARSensor"></a>

### createCustomSensor.createSARSensor(id, oHalfAngle, iHalfAngle, maxRoll, radius, isMount, isRadians, isCzml, czmlIndex, orienMark)
创建自定义SAR载荷

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>\*</code> |  | 卫星ID |
| oHalfAngle | <code>\*</code> |  | 内角  度 |
| iHalfAngle | <code>\*</code> |  | 外角  度 |
| maxRoll | <code>\*</code> | <code>2</code> | 厚度  度 |
| radius | <code>\*</code> | <code>20000000</code> | 半径 米 |
| isMount | <code>\*</code> | <code>true</code> | 是否挂载到卫星实体 |
| isRadians | <code>\*</code> | <code>false</code> | 弧度单位标志 |
| isCzml | <code>\*</code> | <code>false</code> | 是否是CZML实体 |
| czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
| orienMark | <code>\*</code> | <code>HPR</code> | 姿态标志位  NONE Velocity HPR |

<a name="CreateCustomSensor+createConicSensorByCustom"></a>

### createCustomSensor.createConicSensorByCustom(id, isClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallBeamAngle, radius, isMount, orienMark)
自定义多波束载荷

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>\*</code> |  | 卫星ID |
| isClusterBeams | <code>\*</code> | <code>false</code> | 是否是聚类模式，true 则生成聚类模式的多波束载荷，false 则生成自定义多波束载荷 |
| beamsArr | <code>\*</code> |  | 圆形集合  包含pitch  roll  halfAngle   pitch 俯仰  roll偏航角  单位 弧度 |
| isCzml | <code>\*</code> | <code>false</code> | 是否是CZML实体 |
| czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
| bigCircleAngle | <code>\*</code> | <code>10</code> | 大圆形的半径角度  度 (需要覆盖的区域角度) |
| smallBeamAngle | <code>\*</code> | <code>2.5</code> | 小圆形的半径角度  度 |
| radius | <code>\*</code> | <code>20000000</code> | 半径 米 |
| isMount | <code>\*</code> | <code>true</code> | 是否挂载到卫星实体 |
| orienMark | <code>\*</code> | <code>HPR</code> | 姿态标志位  NONE Velocity HPR |

<a name="CreateCustomSensor+createHexagonalSensorByCustom"></a>

### createCustomSensor.createHexagonalSensorByCustom(id, isHexagonalClusterBeams, beamsArr, isCzml, czmlIndex, bigCircleAngle, smallHalfAngleDeg, radius, isMount, orienMark)
自定义六边形多波束载荷

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>\*</code> |  | 卫星ID |
| isHexagonalClusterBeams | <code>\*</code> | <code>false</code> | 是否是聚类模式，true 则生成聚类模式的多波束载荷，false 则生成自定义多波束载荷 |
| beamsArr | <code>\*</code> |  | 六边形集合  包含pitch  roll  halfAngle   pitch 俯仰  roll偏航角  单位 弧度 |
| isCzml | <code>\*</code> | <code>false</code> | 是否是CZML实体 |
| czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
| bigCircleAngle | <code>\*</code> | <code>20</code> | 大圆形的半径角度  度 (需要覆盖的区域角度) |
| smallHalfAngleDeg | <code>\*</code> | <code>2</code> | 小六边形的半径角度  度 |
| radius | <code>\*</code> | <code>20000000</code> | 半径 米 |
| isMount | <code>\*</code> | <code>true</code> | 是否挂载到卫星实体 |
| orienMark | <code>\*</code> | <code>HPR</code> | 姿态标志位  NONE Velocity HPR |

<a name="CreateCustomSensor+createConicSensor"></a>

### createCustomSensor.createConicSensor(id, halfAngle, radius, isCzml, czmlIndex, isMount, orienMark) ⇒ <code>\*</code>
创建卫星圆形载荷

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  
**Returns**: <code>\*</code> - 载荷实体  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>\*</code> |  | 卫星ID |
| halfAngle | <code>\*</code> |  | 半角  度 |
| radius | <code>\*</code> | <code>20000000</code> | 半径 米 |
| isCzml | <code>\*</code> | <code>true</code> | 是否是CZML实体 |
| czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
| isMount | <code>\*</code> | <code>false</code> | 是否挂载到卫星实体上，挂在到卫星实体上，后两个参数不用管有默认值 |
| orienMark | <code>\*</code> | <code>HPR</code> | 姿态标志位  NONE Velocity HPR |

<a name="CreateCustomSensor+createRectSensor"></a>

### createCustomSensor.createRectSensor(id, yHalfAngle, xHalfAngle, radius, isCzml, czmlIndex, isMount, orienMark) ⇒ <code>\*</code>
创建卫星矩形载荷

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  
**Returns**: <code>\*</code> - 载荷实体  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>\*</code> |  | 卫星ID |
| yHalfAngle | <code>\*</code> |  | Y轴方向 运行方向 半角  度 |
| xHalfAngle | <code>\*</code> |  | X轴方向 垂直运动方向 半角  度 |
| radius | <code>\*</code> | <code>20000000</code> | 半径 米 |
| isCzml | <code>\*</code> | <code>true</code> | 是否是CZML实体 |
| czmlIndex | <code>\*</code> | <code>0</code> | CZML索引 |
| isMount | <code>\*</code> | <code>false</code> | 是否挂载到卫星实体上 |
| orienMark | <code>\*</code> | <code>HPR</code> | 姿态标志位  NONE Velocity HPR |

<a name="CreateCustomSensor+constrollOrientationOnlyRoll"></a>

### createCustomSensor.constrollOrientationOnlyRoll(id, rollAngle, isCzml, czmlIndex)
constrollOrientation 控制载荷侧摆使用，这个是直接就侧摆了，没有滑动效果

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>\*</code> |  |  |
| rollAngle | <code>\*</code> |  | 侧摆的角度  度  可正可负，正右摆，负左摆 |
| isCzml | <code>\*</code> | <code>false</code> | 是否为CZML数据源 |
| czmlIndex | <code>\*</code> | <code>0</code> | 数据源索引 |

<a name="CreateCustomSensor+constrollOrientationByHeadingPitchRoll"></a>

### createCustomSensor.constrollOrientationByHeadingPitchRoll(id, rotationValues, isCzml, czmlIndex)
控制卫星姿态侧拍（支持三轴旋转叠加）通过heading pitch roll  构造hpr的结构更改

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>String</code> |  | 卫星ID |
| rotationValues | <code>Object</code> |  | 旋转角度(度): { x: 0, y: 0, z: 0 }  其中x对应roll，y对应pitch ,z对应heading |
| isCzml | <code>Boolean</code> | <code>false</code> | 是否为CZML数据源 |
| czmlIndex | <code>Number</code> | <code>0</code> | 数据源索引 |

<a name="CreateCustomSensor+constrollOrientationByFromRotation"></a>

### createCustomSensor.constrollOrientationByFromRotation(id, rotationValues, isCzml, czmlIndex)
控制卫星姿态侧拍（支持三轴旋转叠加）通过fromRotation x/y/z旋转矩阵 构造姿态数据  这个要恢复，必须是输入多少 ，二次输入同样的负值才能回到原位，不然依旧是在原基础上进行相加流入  x：50  x：1  则是 x：51

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| id | <code>\*</code> |  | 卫星id |
| rotationValues | <code>\*</code> |  | 旋转角度(度): { x: 0, y: 0, z: 0 }  其中x对应roll，y对应pitch ,z对应heading |
| isCzml | <code>\*</code> | <code>false</code> | 是否为CZML数据源 |
| czmlIndex | <code>\*</code> | <code>0</code> | 数据源索引 |

<a name="CreateCustomSensor+initSlerpControl"></a>

### createCustomSensor.initSlerpControl(id, rollAngle, durationSeconds, isCzml, czmlIndex)
初始化并获取卫星的侧拍控制开关，
控制载荷侧摆使用，这个是慢慢侧摆过去，带有滑动效果，存在离散值的，其中传递的值为正则为向左侧摆，传递的值为负，则向右侧拍

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星id |
| rollAngle | <code>\*</code> | 侧拍角度 度 |
| durationSeconds | <code>\*</code> | 侧拍持续时间 秒 整秒 |
| isCzml | <code>\*</code> | 是否为CZML数据源 |
| czmlIndex | <code>\*</code> | 数据源索引 |

<a name="CreateCustomSensor+toggleSatelliteSideLook"></a>

### createCustomSensor.toggleSatelliteSideLook(id)
外部调用的接口,控制每颗卫星进行姿态调整

**Kind**: instance method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星id |

<a name="CreateCustomSensor.autobind"></a>

### CreateCustomSensor.autobind(instance)
自动绑定方法

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type |
| --- | --- |
| instance | <code>\*</code> | 

<a name="CreateCustomSensor.judgeEntityHasOrientation"></a>

### CreateCustomSensor.judgeEntityHasOrientation(satelliteEntity, orienMark)
判断实体是否存在载荷属性

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| satelliteEntity | <code>\*</code> | 卫星ID |
| orienMark | <code>\*</code> | 姿态标志位  NONE Velocity HPR |

<a name="CreateCustomSensor.createDependenceSARSensor"></a>

### CreateCustomSensor.createDependenceSARSensor(id, satelliteEntity, oHalfAngle, iHalfAngle, maxRoll, radius, isRadians)
挂载SAR载荷到卫星实体

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| oHalfAngle | <code>\*</code> | 内角  度 |
| iHalfAngle | <code>\*</code> | 外角  度 |
| maxRoll | <code>\*</code> | 厚度  度 |
| radius | <code>\*</code> | 半径 米 |
| isRadians | <code>\*</code> | 弧度单位标志 |

<a name="CreateCustomSensor.createIndependentSARSensor"></a>

### CreateCustomSensor.createIndependentSARSensor(id, satelliteEntity, oHalfAngle, iHalfAngle, maxRoll, radius, isRadians)
创建独立SAR载荷实体

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| oHalfAngle | <code>\*</code> | 内角  度 |
| iHalfAngle | <code>\*</code> | 外角  度 |
| maxRoll | <code>\*</code> | 厚度  度 |
| radius | <code>\*</code> | 半径 米 |
| isRadians | <code>\*</code> | 弧度单位标志 |

<a name="CreateCustomSensor.createDependenceConicCustom"></a>

### CreateCustomSensor.createDependenceConicCustom(id, satelliteEntity, beams, radius)
自定义圆形载荷挂在到卫星上

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| beams | <code>\*</code> | 圆形集合  包含pitch  roll  halfAngle   pitch 俯仰  roll偏航角  单位 弧度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.createIndependentConicCustom"></a>

### CreateCustomSensor.createIndependentConicCustom(id, satelliteEntity, beams, radius)
自定义创建圆形载荷实体

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| beams | <code>\*</code> | 圆形集合  包含pitch  roll  halfAngle   pitch 俯仰  roll偏航角  单位 弧度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.createDependenceHexagonalCustom"></a>

### CreateCustomSensor.createDependenceHexagonalCustom(id, satelliteEntity, beams, radius)
自定义六边形载荷挂在到卫星上

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| beams | <code>\*</code> | 六边形集合  包含pitch  roll  halfAngle   pitch 俯仰  roll偏航角  单位 弧度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.createIndependentHexagonalCustom"></a>

### CreateCustomSensor.createIndependentHexagonalCustom(id, satelliteEntity, beams, radius)
自定义创建六边形载荷实体

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| beams | <code>\*</code> | 六边形集合  包含pitch  roll  halfAngle   pitch 俯仰  roll偏航角  单位 弧度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.createDependenceConicSensor"></a>

### CreateCustomSensor.createDependenceConicSensor(id, satelliteEntity, halfAngle, radius)
挂载圆形载荷到卫星实体

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| halfAngle | <code>\*</code> | 半角  度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.createIndependentConicSensor"></a>

### CreateCustomSensor.createIndependentConicSensor(id, satelliteEntity, halfAngle, radius)
创建独立圆形载荷

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| halfAngle | <code>\*</code> | 半角  度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.createDependenceRectSensor"></a>

### CreateCustomSensor.createDependenceRectSensor(id, satelliteEntity, yHalfAngle, xHalfAngle, radius)
挂载矩形载荷到卫星实体

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| yHalfAngle | <code>\*</code> | Y轴方向 运行方向 半角  度 |
| xHalfAngle | <code>\*</code> | X轴方向 垂直运动方向 半角  度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.createIndependentRectSensor"></a>

### CreateCustomSensor.createIndependentRectSensor(id, satelliteEntity, yHalfAngle, xHalfAngle, radius)
创建独立矩形载荷

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| id | <code>\*</code> | 卫星ID |
| satelliteEntity | <code>\*</code> | 卫星实体 |
| yHalfAngle | <code>\*</code> | Y轴方向 运行方向 半角  度 |
| xHalfAngle | <code>\*</code> | X轴方向 垂直运动方向 半角  度 |
| radius | <code>\*</code> | 半径 米 |

<a name="CreateCustomSensor.generateClusterBeams"></a>

### CreateCustomSensor.generateClusterBeams(bigHalfAngleDeg, smallHalfAngleDeg) ⇒ <code>Array</code>
动态生成蜂窝状覆盖的波束簇

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  
**Returns**: <code>Array</code> - 返回 MultiCircularSensor 需要的 beams 配置数组  

| Param | Type | Description |
| --- | --- | --- |
| bigHalfAngleDeg | <code>Number</code> | 大圆的总覆盖半径（度） |
| smallHalfAngleDeg | <code>Number</code> | 单个小圆形波束的半径（度） |

<a name="CreateCustomSensor.generateHexagonalClusterBeams"></a>

### CreateCustomSensor.generateHexagonalClusterBeams(bigHalfAngleDeg, smallHexHalfAngleDeg)
动态生成完美无缝拼接的【六边形】波束簇

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  

| Param | Type | Description |
| --- | --- | --- |
| bigHalfAngleDeg | <code>Number</code> | 大圆的总覆盖半径（度） |
| smallHexHalfAngleDeg | <code>Number</code> | 单个小六边形外接圆的半径半角（度） |

<a name="CreateCustomSensor.convertStkSarToCesiumParams"></a>

### CreateCustomSensor.convertStkSarToCesiumParams(stkEleMin, stkEleMax, stkExclForward, stkExclAft) ⇒ <code>Object</code>
将 STK 的 SAR 载荷参数转换为 Cesium/newSARSensor.js 的几何参数

**Kind**: static method of [<code>CreateCustomSensor</code>](#CreateCustomSensor)  
**Returns**: <code>Object</code> - 返回供 Cesium 载荷直接使用的弧度值
示例
假设这是从你的接口或配置中读取的 STK 参数  ------这里是测试数据及样例，不能删除
const stkParams = {
    elevationMin: 10,
    elevationMax: 77,
    exclusionForward: 80,
    exclusionAft: 80
};

// 1. 进行参数转换
const cesiumSarParams = convertStkSarToCesiumParams(
    stkParams.elevationMin,
    stkParams.elevationMax,
    stkParams.exclusionForward,
    stkParams.exclusionAft
);  

| Param | Type | Description |
| --- | --- | --- |
| stkEleMin | <code>Number</code> | STK Elevation Min (度) - 例如 10 |
| stkEleMax | <code>Number</code> | STK Elevation Max (度) - 例如 55 |
| stkExclForward | <code>Number</code> | STK Exclusion Forward (度) - 例如 80 |
| stkExclAft | <code>Number</code> | STK Exclusion Aft (度) - 例如 80 (通常与Forward对称) |

<a name="InitCesium"></a>

## InitCesium()
初始化Cesium Viewer

**Kind**: global function  
**Example**  
```js
import { InitCesium } from "cesium-core";let init = InitCesium({
   containerId: "ID",
      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,
 })
```
<a name="InitCesiumConfig"></a>

## InitCesiumConfig : <code>Object</code>
Cesium 初始化配置

**Kind**: global typedef  
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| containerId | <code>string</code> |  |
| [imageryUrl] | <code>string</code> |  |
| [terrainUrl] | <code>string</code> |  |
| [titleUrl] | <code>string</code> |  |
| [fullscreenButton] | <code>boolean</code> |  |
| [sceneModePicker] | <code>boolean</code> |  |
| [homeButton] | <code>boolean</code> |  |
| [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,     }); |