# CustomSensorCone time-varying outer half angle issue

**URL:** <https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69>\
**Category:** CesiumJS\
**Created:** [August 8, 2012, 3:02pm UTC](https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69 "2012-08-08T15:02:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Miller](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@Eric\_Miller](https://community.cesium.com/u/Eric_Miller)\
**Post date:** [August 8, 2012, 3:02pm UTC](https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69/1 "2012-08-08T15:02:59Z")

</div>

Try plugging in the CZML below into the Cesium Viewer (sorry, my proxy won’t let me attach files.) I’m doing something similar on my project and every machine I’ve tested it on, I get a flickering effect at one of the clock angle slices. I’m assuming it’s either the first or last slice. Does anyone else see this issue? It goes away if I set the outerHalfAngle property to a single value instead of being time-varying.

{

“id”:“cone”,

“availability”:“2012-05-22T19:22:02Z/2012-05-22T19:24:02Z”,

“cone”:{

“minimumClockAngle”:0.0,

“maximumClockAngle”:6.283185307179586,

“show”:true,

“showIntersection”:true,

“innerHalfAngle”:0.0,

“outerHalfAngle”:{

“epoch”:“2012-05-22T19:22:02Z”,

“number”:[

0.0,0.09034602912017678,

60.0,0.09034819716130152,

120.0,0.0903503813944031

]

},

“radius”:6.263947203246858E7

},

“position”:{

“cartesian”:[

-1592611.894963102,4.215996588670453E7,-16865.102873710017

]

},

“orientation”:{

“unitQuaternion”:[

-0.682951222618297,0.07886654195625965,0.0833065496966768,0.7213998300953987

]

}

}

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [August 8, 2012, 3:17pm UTC](https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69/2 "2012-08-08T15:17:10Z")

</div>

Hey Eric,

I'll definitely check this out today, if it's a CZML processing issue,  
it should be an easy fix.

Matt

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [August 8, 2012, 7:26pm UTC](https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69/3 "2012-08-08T19:26:52Z")

</div>

Eric,

I can reproduce this easily with your czml, thanks. I see what the  
problem is (it's not always rendering the last triangle), but I don't  
know why.

The good news is that I have a workaround in the mean time.

Change line 33 of DynamicConeVisualizerUsingCustomSensor.js from

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var angleStep = CesiumMath.toRadians(2.0);  
to  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var angleStep = CesiumMath.toRadians(3.0);

And the problem goes away. This leads me to believe it is some sort  
of precision or sampling error, but I can't be for sure. I opened a  
new GitHub issue to keep track of it:

> <https://github.com/CesiumGS/cesium/issues/148>
>
> Copy and paste the below code into a czml file and bring it up in viewer. You'll see the last section...

---

<div class="post-metadata">

**Author:** ![Eric\_Miller](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@Eric\_Miller](https://community.cesium.com/u/Eric_Miller)\
**Post date:** [August 9, 2012, 2:22am UTC](https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69/4 "2012-08-09T02:22:33Z")

</div>

Thanks for looking into that so quickly Matt, I’ll plug that in. Just in time for the demo on Monday 🙂

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [August 11, 2012, 1:17am UTC](https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69/5 "2012-08-11T01:17:22Z")

</div>

Eric, just an FYI that this has been fixed in pull request 152. It  
should be in master by Monday, if not sooner.

[https://github.com/AnalyticalGraphicsInc/cesium/pull/152](https://github.com/AnalyticalGraphicsInc/cesium/pull/152)

---

<div class="post-metadata">

**Author:** ![patrick](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/patrick/32/2045_2.png) [@patrick](https://community.cesium.com/u/patrick)\
**Post date:** [August 11, 2012, 2:07pm UTC](https://community.cesium.com/t/customsensorcone-time-varying-outer-half-angle-issue/69/6 "2012-08-11T14:07:18Z")

</div>

Kevin’s fix is in master now.

Patrick
