New to cesium here so sorry if this is a dumb question. I'm trying to convert lat, lon, alt, heading, pitch, roll into a quaternion for orientation of a flight, and for some reason the heading is around 80 degrees out of whack.
Here's the relevant code:
var curloc = Cesium.Cartesian3.fromDegrees(curlon, curlat, (curalt * 0.3048), Cesium.Ellipsoid.WGS84);
var quat = Cesium.Transforms.headingPitchRollQuaternion(curloc, curhead, curpitch, curroll, Cesium.Ellipsoid.WGS84);
Indeed, for an entity, the frame used to apply a rotation is EastNorthUp frame which is local to the position. So the abscissa axis is West-> East and the ordered axis is South->North. As a trigonometric an angle is defined from abscissa axis (here West->West), you must remove 90 degrees or PI/2 radians to convert from a flight angle.
Finally the direction of trigonometric angle and flight angle are opposites.