Cartesian to cartographic problem

Hello!

I have this code:

function cartesianToCartographic©{

console.log©;

return ellipsoid.cartesianToCartographic©;

}

var camera = scene.getCamera();

console.log(cartesianToCartographic(camera.position));

console.log(cartesianToCartographic(camera.direction));

console.log(cartesianToCartographic(camera.up));

and I got this out:

(0, -11409558.32144526, 5704779.16072263)
(-1.5707963267948966, 0.4649900805134542, 6382419.669168627)
(0, 0.894427190999916, -0.447213595499958)
(NaN, NaN, NaN)
(0, 0.447213595499958, 0.894427190999916)
(NaN, NaN, NaN)

why can’t I convert (0, 0.894427190999916, -0.447213595499958) or (0, 0.447213595499958, 0.894427190999916)?

Thanks!

Tamy,

This may be addressed in the scaleToGeodeticSurface branch, but the Cartesian positions you are trying to convert to Cartographic are very close to the center of Earth. In fact, they are not positions; they are normalized vectors, that is, directions, so I’m not sure that you intend to convert them to Cartographic.

Patrick