# Any function can get heading, pitch and roll based on the coordinates of the vertices of a polygon

**URL:** <https://community.cesium.com/t/any-function-can-get-heading-pitch-and-roll-based-on-the-coordinates-of-the-vertices-of-a-polygon/3598>\
**Category:** CesiumJS\
**Created:** [January 19, 2016, 4:44pm UTC](https://community.cesium.com/t/any-function-can-get-heading-pitch-and-roll-based-on-the-coordinates-of-the-vertices-of-a-polygon/3598 "2016-01-19T16:44:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wei](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Wei](https://community.cesium.com/u/Wei)\
**Post date:** [January 19, 2016, 4:44pm UTC](https://community.cesium.com/t/any-function-can-get-heading-pitch-and-roll-based-on-the-coordinates-of-the-vertices-of-a-polygon/3598/1 "2016-01-19T16:44:48Z")

</div>

Hello All,

I need to get heading, pitch, and roll for an specific polygon. I have the coordinates in Cartesian of the vertices of a polygon, is there any function can do that?

I did a calculation by myself, but the result seems not right when I test it in Cesium.

Many thanks in advance!

Wei

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [January 21, 2016, 10:07pm UTC](https://community.cesium.com/t/any-function-can-get-heading-pitch-and-roll-based-on-the-coordinates-of-the-vertices-of-a-polygon/3598/2 "2016-01-21T22:07:45Z")

</div>

Hello,

I don’t believe there is any function like that built into Cesium. Make sure in your calculation that everything is computed using meters and radians. Those are the units Cesium uses.

Best,

Hannah
