Cesium Moon Height Data Reading

Hello, I am trying to read out height data from the Cesium Moon terrain wherever a raycast intersects the terrain. I am using the CenteredFixedToLongitudeLatitudeHeight, and I know that the height reading it gives is height from the ellipsoid. However, when I compare these height readings from Cesium to the LOLA 1024ppd Elevation (which also uses height from the ellipsoid), the Cesium readings seem to be offset by a large amount, around 2500m. I am trying to troubleshoot where in our project this discrepancy is coming from, but I’m having trouble. Is there something I could be missing that is causing this?
For reference, I am working in Unity 2021.3.22f1 with Cesium for Unity v1.14.1.

Hi @gbaldassaro ,

Welcome to the Cesium community forum, and thanks for reaching out! I understand how frustrating it can be to encounter unexpected discrepancies in height data, especially when working with precise datasets like the LOLA 1024ppd Elevation data.

You’ve already correctly identified that Cesium height values are relative to the ellipsoid. However, such a large offset (around 2500 meters) could be due to differences in the ellipsoid model used (Cesium defaults to WGS84, which may not match the reference frame of the LOLA data) or other factors such as a mismatch in coordinate systems or alternate vertical reference datums.
To better understand what’s happening, could you provide a bit more detail?

  • What is the specific ellipsoid or reference frame used for the LOLA data in your comparison?
  • Are you applying any custom transformations or scaling to the Cesium height values in your Unity project?
  • Could you share the exact code snippet you’re using for the raycast and the height extraction?

Additionally, double-check that the Cesium for Unity plugin version (v1.14.1) you are using is compatible with Unity 2021.3.22f1. While earlier Unity versions are still supported, we recommend updating to a compatible Unity 2022.3 LTS or Unity 6 version for better stability, as per Cesium for Unity documentation.

Lastly, ensure that you have configured the Cesium Moon asset correctly in your project and that its associated metadata (including offset/scaling, if any) is accurately taken into account. Feel free to reply with further details so we can help you investigate this discrepancy further!

I look forward to your response to help pinpoint the issue.