# Cesium Sensor

**URL:** <https://community.cesium.com/t/cesium-sensor/3648>\
**Category:** CesiumJS\
**Created:** [January 27, 2016, 2:36pm UTC](https://community.cesium.com/t/cesium-sensor/3648 "2016-01-27T14:36:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Umar\_Sharif](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@Umar\_Sharif](https://community.cesium.com/u/Umar_Sharif)\
**Post date:** [January 27, 2016, 2:36pm UTC](https://community.cesium.com/t/cesium-sensor/3648/1 "2016-01-27T14:36:25Z")

</div>

I am trying to run cesium sensor in cesium-1.17.  
I get error “Length” attribute is not defined.

How can it be fixed

---

<div class="post-metadata">

**Author:** ![abdou](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/abdou/32/2012_2.png) [@abdou](https://community.cesium.com/u/abdou)\
**Post date:** [January 28, 2016, 5:53am UTC](https://community.cesium.com/t/cesium-sensor/3648/2 "2016-01-28T05:53:31Z")

</div>

Hello did you check [https://github.com/kaktus40/cesium-sensors](https://github.com/kaktus40/cesium-sensors)

---

<div class="post-metadata">

**Author:** ![Umar\_Sharif](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@Umar\_Sharif](https://community.cesium.com/u/Umar_Sharif)\
**Post date:** [January 28, 2016, 2:52pm UTC](https://community.cesium.com/t/cesium-sensor/3648/3 "2016-01-28T14:52:36Z")

</div>

Great. It works. Thanks

---

<div class="post-metadata">

**Author:** ![Umar\_Sharif](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@Umar\_Sharif](https://community.cesium.com/u/Umar_Sharif)\
**Post date:** [February 2, 2016, 8:05am UTC](https://community.cesium.com/t/cesium-sensor/3648/4 "2016-02-02T08:05:25Z")

</div>

> How can we edit a sensor. I created a rectangular sensor and now want to change its radius and x y angles.  
> I created sensor using this example [https://github.com/AnalyticalGraphicsInc/cesium-sensors/tree/master/Examples/[api.html](https://github.com/AnalyticalGraphicsInc/cesium-sensors/blob/master/Examples/api.html)](https://github.com/AnalyticalGraphicsInc/cesium-sensors/tree/master/Examples/%5Bapi.html%5D(https://github.com/AnalyticalGraphicsInc/cesium-sensors/blob/master/Examples/api.html))

---

<div class="post-metadata">

**Author:** ![abdou](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/abdou/32/2012_2.png) [@abdou](https://community.cesium.com/u/abdou)\
**Post date:** [February 2, 2016, 11:06am UTC](https://community.cesium.com/t/cesium-sensor/3648/5 "2016-02-02T11:06:05Z")

</div>

> How can we edit a sensor. I created a rectangular sensor and now want to change its radius and x y angles.
> 
> I created sensor using this example [https://github.com/AnalyticalGraphicsInc/cesium-sensors/tree/master/Examples/api.html](https://github.com/AnalyticalGraphicsInc/cesium-sensors/tree/master/Examples/api.html)

Hello my sample :

\<!DOCTYPE html\>  
\<html lang="en"\>  
\<head\>  
&nbsp;&nbsp;\<!-- Use correct character set. --\>  
&nbsp;&nbsp;\<meta charset="utf-8"\>  
&nbsp;&nbsp;\<!-- Tell IE to use the latest, best version (or Chrome Frame if pre-IE11). --\>  
&nbsp;&nbsp;\<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"\>  
&nbsp;&nbsp;\<!-- Make the application on mobile take up the full browser screen and disable user scaling. --\>  
&nbsp;&nbsp;\<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"\>  
&nbsp;&nbsp;\<title\>Cesium Sensors simple\</title\>

&nbsp;&nbsp;\<link rel="stylesheet" href="//cesiumjs.org/releases/1.16/Build/Cesium/Widgets/widgets.css" /\>  
&nbsp;&nbsp;\<script src="//cesiumjs.org/releases/1.16/Build/Cesium/Cesium.js"\>\</script\>  
&nbsp;&nbsp;\<script src="CesiumSensors.js"\>\</script\>

&nbsp;&nbsp;\<style\>  
&nbsp;&nbsp;&nbsp;&nbsp;#cesiumContainer {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: absolute;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 80%;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 100%;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;overflow: hidden;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;html {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 100%;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;body {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;overflow: hidden;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 100%;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background-color: black;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color:white;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;font-family: sans-serif;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;#toolbar {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: absolute;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bottom: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 20%;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 100%;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;overflow:auto;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 0;  
&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;#toolbar\>div{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-left: 30px;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;table {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 80%;  
&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;tbody{  
&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;th, td {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 7px;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-align: left;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;\>img {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max-width: 30px;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max-height: 30px;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;\</style\>  
\</head\>  
\<body\>  
&nbsp;&nbsp;\<div id="cesiumContainer"\>\</div\>  
&nbsp;&nbsp;\<div id="toolbar"\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<div\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<span\>coordonnées de la pointe \</span\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="latOrigine"\>latitude (en °):\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="30" min="-90" max="90" step="0.1" id="latOrigine" name="latOrigine"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="longOrigine"\>longitude (en °):\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="-90" min="-180" max="180" step="0.1" id="longOrigine" name="longOrigine"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="hauteurOrigine"\>hauteur (en m):\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="3000000" min="0" max="10000000" step="100" id="hauteurOrigine" name="hauteurOrigine"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="couleurLat" style="margin-left: 30px;"\>couleur latérale:\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="color" value="#FFFFFF" id="couleurLat" name="couleurLat"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="couleurInter" style="margin-left: 10px;"\>couleur intersection:\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="color" value="#FFFFFF" id="couleurInter" name="couleurInter"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="rayon" style="margin-left: 10px;"\>rayon (en m):\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="10000000" min="1" max="100000000" step="10" id="rayon" name="rayon"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="epaisseur" style="margin-left: 10px;"\>epaisseur intersection: \</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="1" min="1" max="15" step="1" id="epaisseur" name="epaisseur"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;\</div\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<div\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<span\>orientation du senseur (référentiel local: 1er axe=\>vers le nord, 2ème axe vers l'est, 3ème axe vers le centre de la Terre) \</span\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="heading"\>heading (en °):\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="0" min="0" max="359.9" step="0.1" id="heading" name="heading"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="pitch"\>pitch (en °):\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="0" min="-90" max="90" step="0.1" id="pitch" name="pitch"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<label for="roll"\>roll (en °):\</label\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<input type="number" value="0" min="-90" max="90" step="0.1" id="roll" name="roll"/\>  
&nbsp;&nbsp;&nbsp;&nbsp;\</div\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<div\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<table id="table"\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<thead\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<tr\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<td\>azimut en (°)\</td\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<td\>elevation en (°)\</td\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<td\>action\</td\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</tr\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</thead\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<tbody\>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</tbody\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<tfoot\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<tr\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<input type="number" value="0" min="0" max="359.9" step="1" id="azimut"/\> \</td\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<input type="number" value="0" min="-90" max="90" step="1" id="elevation"/\> \</td\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<td\>\<image src="ajouter.png"/\>\</td\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</tr\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</tfoot\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\</table\>  
&nbsp;&nbsp;&nbsp;&nbsp;\</div\>  
&nbsp;&nbsp;\</div\>  
&nbsp;&nbsp;\<script\>  
&nbsp;&nbsp;&nbsp;&nbsp;const toRad=Math.PI/180;

&nbsp;&nbsp;&nbsp;&nbsp;var scratchHPRQuaternion = new Cesium.Quaternion();  
&nbsp;&nbsp;&nbsp;&nbsp;var scratchScale = new Cesium.Cartesian3(1.0, 1.0, 1.0);  
&nbsp;&nbsp;&nbsp;&nbsp;var scratchHPRMatrix4 = new Cesium.Matrix4();

&nbsp;&nbsp;&nbsp;&nbsp;headingPitchRollToFixedFrame = function(origin, heading, pitch, roll, ellipsoid, result) {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var hprQuaternion = Cesium.Quaternion.fromHeadingPitchRoll(heading, pitch, roll, scratchHPRQuaternion);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var hprMatrix = Cesium.Matrix4.fromTranslationQuaternionRotationScale(Cesium.Cartesian3.ZERO, hprQuaternion, scratchScale, scratchHPRMatrix4);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result = Cesium.Transforms.northEastDownToFixedFrame(origin, ellipsoid, result);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return Cesium.Matrix4.multiply(result, hprMatrix, result);  
&nbsp;&nbsp;&nbsp;&nbsp;};

&nbsp;&nbsp;&nbsp;&nbsp;var viewer = new Cesium.Viewer('cesiumContainer', {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sceneModePicker : false,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// globe: false  
&nbsp;&nbsp;&nbsp;});  
&nbsp;&nbsp;&nbsp;&nbsp;var customSensor = new CesiumSensors.CustomSensorVolume();  
viewer.scene.primitives.add(customSensor);  
&nbsp;&nbsp;&nbsp;&nbsp;var listDirections=;  
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i \< 3; ++i) {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var clock = Cesium.Math.toRadians(120.0 \* i);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var cone = Cesium.Math.toRadians(25.0);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listDirections.push(new Cesium.Spherical(clock, cone));  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;function getValueNumber(id){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var element=document.getElementById(id);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var value= parseFloat(element.value);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var min =parseFloat(element.min);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var max =parseFloat(element.max);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(isNaN(value)){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value=0;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(value\<min){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value=min;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(value\>max){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value=max;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return value;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;function getValue(id){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return document.getElementById(id).value;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;function updateViewer(){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// viewer.scene.primitives.removeAll();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var origineLat=getValueNumber("latOrigine")\*toRad;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var origineLong=getValueNumber("longOrigine")\*toRad;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var origineHauteur=getValueNumber("hauteurOrigine");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var origine=Cesium.Cartesian3.fromDegrees(origineLong, origineLat, origineHauteur);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var heading=getValueNumber("heading")\*toRad;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var pitch=getValueNumber("pitch")\*toRad;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var roll=getValueNumber("roll")\*toRad;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var modelMatrix=headingPitchRollToFixedFrame(origine,heading,pitch,roll);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customSensor.modelMatrix = modelMatrix;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customSensor.radius=getValueNumber("rayon");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customSensor.intersectionWidth=getValueNumber("epaisseur");

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customSensor.lateralSurfaceMaterial= Cesium.Material.fromType('Color', {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color:Cesium.Color.fromCssColorString(getValue('couleurLat'))  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customSensor.intersectionColor=Cesium.Color.fromCssColorString(getValue('couleurInter'));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customSensor.directions = listDirections;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;function updateTable(){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var tBody=document.querySelector('#table\>tbody');  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var content='';  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listDirections.forEach(function(spherical,index){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var elevation=(spherical.cone/toRad).toFixed(1);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var azimut=(spherical.clock/toRad).toFixed(1);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content+='\<tr\>\<td\>'+azimut+'\</td\>\<td\>'+elevation+'\</td\>\<td\>\<image src="supprimer.png" data-id="'+index+'"/\>\</td\>\</tr\>';  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tBody.innerHTML=content;  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;function addSpherical(){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var clock=getValueNumber("azimut")\*toRad;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var cone=getValueNumber("elevation")\*toRad;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listDirections.push(new Cesium.Spherical(clock, cone));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;updateTable();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;updateViewer();  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;function removeSpherical(index){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listDirections.splice(index,1);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;updateTable();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;updateViewer();  
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById('table').addEventListener('click',function(evt){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var element = evt.target;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (element.tagName.toLowerCase() === 'img') {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var identification = parseInt(element.getAttribute("data-id"), 10);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(isNaN(identification)){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addSpherical();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removeSpherical(identification);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;});

&nbsp;&nbsp;&nbsp;&nbsp;var listInput=document.querySelectorAll("div\>input");  
&nbsp;&nbsp;&nbsp;&nbsp;for(var i=0;i\<listInput.length;i++){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listInput[i].addEventListener('input',function(){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;updateViewer();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});  
&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;updateTable();  
&nbsp;&nbsp;&nbsp;&nbsp;updateViewer();  
&nbsp;&nbsp;\</script\>  
\</body\>  
\</html\>

---

<div class="post-metadata">

**Author:** ![Umar\_Sharif](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@Umar\_Sharif](https://community.cesium.com/u/Umar_Sharif)\
**Post date:** [February 9, 2016, 6:05am UTC](https://community.cesium.com/t/cesium-sensor/3648/6 "2016-02-09T06:05:04Z")

</div>

Thanks it works.  
Now I want sensor not to bypass if I place any gltf or shape object in place. How can this be achieved!

---

<div class="post-metadata">

**Author:** ![irving23](https://avatars.discourse-cdn.com/v4/letter/i/e68b1a/32.png) [@irving23](https://community.cesium.com/u/irving23)\
**Post date:** [December 25, 2017, 1:18pm UTC](https://community.cesium.com/t/cesium-sensor/3648/7 "2017-12-25T13:18:03Z")

</div>

[https://github.com/kaktus40/cesium-sensors](https://github.com/kaktus40/cesium-sensors)  
[dist](https://github.com/kaktus40/cesium-sensors/blob/master/dist) directory can not find…

also,it has no cesium.js file,what should it makes it work? thanks.  
在 2016年1月28日星期四 UTC+8下午1:53:32，farouk abdou写道：

---

<div class="post-metadata">

**Author:** ![san](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/san/32/2011_2.png) [@san](https://community.cesium.com/u/san)\
**Post date:** [August 29, 2018, 4:58am UTC](https://community.cesium.com/t/cesium-sensor/3648/8 "2018-08-29T04:58:02Z")

</div>

how can i show the intersection of the sensor with gltf models or objects and stop the sensor passing through the object,  
i used showIntersection = true, but it is not working.

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [August 29, 2018, 8:53pm UTC](https://community.cesium.com/t/cesium-sensor/3648/9 "2018-08-29T20:53:01Z")

</div>

Hi sankin,

The cesium-senor plugin has been deprecated for a while, so we won’t be providing support or fixing bugs. Sorry!

Thanks,

Gabby
