# Heading, pitch and roll using CZML

**URL:** <https://community.cesium.com/t/heading-pitch-and-roll-using-czml/5372>\
**Category:** CesiumJS\
**Created:** [April 5, 2017, 1:51pm UTC](https://community.cesium.com/t/heading-pitch-and-roll-using-czml/5372 "2017-04-05T13:51:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fidel\_Perez-Smith](https://avatars.discourse-cdn.com/v4/letter/f/278dde/32.png) [@Fidel\_Perez-Smith](https://community.cesium.com/u/Fidel_Perez-Smith)\
**Post date:** [April 5, 2017, 1:51pm UTC](https://community.cesium.com/t/heading-pitch-and-roll-using-czml/5372/1 "2017-04-05T13:51:40Z")

</div>

Hi,

Is it possible to supply heading, pitch and roll values over CZML? The [documentation](https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/Orientation)seems to suggest that only Quaternions are accepted.

If that’s the case, how can I calculate the quaternion from heading, pitch and roll?

Thank you,

Fidel

---

<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:** [April 5, 2017, 5:21pm UTC](https://community.cesium.com/t/heading-pitch-and-roll-using-czml/5372/2 "2017-04-05T17:21:23Z")

</div>

Hello Fidel,

It looks like we don’t have support for heading/pitch/roll orientation from CZML. I wrote up an issue for us to look into adding it here: [https://github.com/AnalyticalGraphicsInc/cesium/issues/5184](https://github.com/AnalyticalGraphicsInc/cesium/issues/5184)

Meanwhile, you can use the function [Quaternion.fromHeadingPitchRoll](http://cesiumjs.org/Cesium/Build/Documentation/Quaternion.html#.fromHeadingPitchRoll) to compute the quaternion value.

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![Fidel\_Perez-Smith](https://avatars.discourse-cdn.com/v4/letter/f/278dde/32.png) [@Fidel\_Perez-Smith](https://community.cesium.com/u/Fidel_Perez-Smith)\
**Post date:** [April 5, 2017, 8:22pm UTC](https://community.cesium.com/t/heading-pitch-and-roll-using-czml/5372/3 "2017-04-05T20:22:35Z")

</div>

Thank you so much Hannah, much appreciated.

Fidel

---

<div class="post-metadata">

**Author:** ![HughN](https://avatars.discourse-cdn.com/v4/letter/h/a88e57/32.png) [@HughN](https://community.cesium.com/u/HughN)\
**Post date:** [April 25, 2017, 6:56am UTC](https://community.cesium.com/t/heading-pitch-and-roll-using-czml/5372/4 "2017-04-25T06:56:03Z")

</div>

Hello Hannah,

I’m having the same problem as Fidel but am having a problem getting the [Quaternion.fromHeadingPitchRoll](http://www.google.com/url?q=http%3A%2F%2Fcesiumjs.org%2FCesium%2FBuild%2FDocumentation%2FQuaternion.html%23.fromHeadingPitchRoll&sa=D&sntz=1&usg=AFQjCNEFiHbcfkQDXfY5wngxKfpS5YUd5Q) function into my CZML. Could I be really cheeky and ask you for some more clues or, if possible, a short example?

I only need to crack this and I’m away!

Thanks

Hugh

---

<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:** [April 26, 2017, 2:38pm UTC](https://community.cesium.com/t/heading-pitch-and-roll-using-czml/5372/5 "2017-04-26T14:38:51Z")

</div>

Hello Hugh,

This function isn’t available in CZML, but you can use that function in a script to generate the values for your czml.

Best,

Hannah
