Hi, I’m trying to convert Quaternion angle to Euler angle by converting x,y,z,w to HeadingPitchRoll but not getting correct Euler value. I’m not sure if HeadingPitchRoll is Euler or not.
However, I’m getting correct Euler values but these are in Radians and I need to convert them to Degrees. I’m doing that by multiplying HPR values with 57.2958.
But is there any inbuilt function to convert Radians to Degrees?
you can use Cesium.Math.toDegrees(value) or Cesium.Math.toRadians(value) for conversion.
Basicly it’s just multiplying/dividing your value with 180/Pi.
Be aware that those angles are relative to earth center, not the “local” HPR (orientation of a Model relative to the earth surface).