Get Heights in meters from PickPosition approach

When using scene.pickPosition, I got this:

(3922757.951194788, -75887.60464556298, 4861188.030801863)

and when converting them into degrees and height (meters) using

ellipsoid.cartesianToCartographic(cartesian),

I got this:

(-1.108276, 51.284312, -6770473.032675)

So, the height is wrong -6770473.032675?

How can I fix it?

I got it,

cartographic = Cesium.Cartographic.fromCartesian(cartesian);
longitude= Cesium.Math.toDegrees(cartographic.longitude);
latitude= Cesium.Math.toDegrees(cartographic.latitude);
height= cartographic.height;

But you have to use a valid terrain (i.e. Cesium World Terrain), or your heights will be based on large negative values.

1 Like

Thanks for posting your solution Jose!