I am trying to calculate the height of the camera above the surface of the ellipsoid.
I have the following code but it gives negative numbers…
var camera = viewer.camera;
var cameraHeight = ellipsoid.cartesianToCartographic(camera.position).height;
This is the kind of number I am getting -6367317.724965978
I am running it on the clock tick
I cant see where I am going wrong.