WGS84.cartesianToCartographic always produces lat, lon between -2 and 2

Hi everyone,
I’m just starting to play with cesiumjs, and it’s been fun to work with so far. I’m hitting a bit of a snag with the cartesianToCartographic function. It seems that no matter what Cartesian3 object I use, it always comes back with a coordinate in a limited range:

var position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);

var cartographicPosition = Cesium.Ellipsoid.WGS84.cartesianToCartographic(position);


-> longitude: 1.359747201727748, latitude: 1.4822411860089668, height: -5400810.410905182

I’ve tried a bunch of positions, and they all behave the same way once used in cartesianToCartographic:

var position = new Cesium.Cartesian3(221165.310807555, -4771977.925023912, 4055621.463035146);

-> longitude: -1.2728364047014729, latitude: 0.7209632254076962, height: 0

I’m sure I’m doing something wrong, because just calling Cesium.Ellipsoid.WGS84.cartographicToCartesian(cartographicPosition) brings it back to the exact numbers I had before.

Am I misunderstanding the purpose of this function?

Hi Ryan,
The cartographic latitude and longitude values are in radians.


Oh, now I just feel silly. Thanks a ton!