Ellipse orientation question (documentation versus reality)

All,

Quick question regarding Ellipse’s – specifically orientation; the documentation does not seem consistent. I am using JavaScript to build a CZML object which is then processed via a data source. Currently using Cesium.Math.toRadians to take a deg. value and convert to proper orientation, for example:

czmlObj.ellipse = { …, orientation: Cesium.Math.toRadians(degreesOrientation), … };

The documentation for EllipseGeometry states:
rotation
Number
0.0
optional

            The angle of rotation counter-clockwise from north.

The documentation for EllipseGeometryOutline orientation states:
rotation
Number
0.0
optional

            The angle from north (clockwise) in radians.

Both examples show setting orientation via Cesium.Math.toRadians(degAngle). As you can see, the orientation description for each of the above differs in units and clockwise versus counter-clockwise.

Is Ellipse orientation truly counter-clockwise or does it depend on the angle in deg.? If I have an ellipse orientation of, say, 15 deg. from 0 deg. North, should ellipse.orientation (in CZML) be set to:

  1. Cesium.Math.toRadians( orientation - 90)?
  2. Cesium.Math.toRadians( orientation )?
  3. just orientation
  4. just orientation - 90

Thank you.

  • Chris

Although I show using ‘orientation’ for the ellipse object; I am indeed using ‘rotation’…that was simply a typo.

Sorry but furthermore, the CZML Content documentation shows this for ellipse.rotation:

ellipse.rotation

The angle from north (clockwise) in radians.

Property Name: rotation

Interpolatable: yes

Hello Chris,

Sorry for the confusion! There is a typo in the documentation for EllipseOutlineGeometry and in the CZML doc. All rotations in Cesium are counter-clockwise and in radians.

I’ll update the doc now.

Best,

Hannah

Thanks for the quick reply; I have more confidence in the results I am seeing now after making the change.

  • Chris