Convert WGS84 to MSL and Vice Versa – Methods and Tools

altitudecesiumelevationgeoidwgs84

I am using CesiumJS to create point in a map using World Terrain to get the elevation of my points.

The point in Cesium are using WSG84. When I calculate the altitude using sampleTerrain I retrieve an height above the reference ellipsoid

To convert that height to MSL, I have seen on Internet Here or Here that require a geoid to compute the conversion from WGS84 point to MSL.

The geoid height above the ellipsoid (N) is the difference between the
ellipsoidal height and orthometric (geoid) height.

N = He − Ho

Where:

N = geoid height above the ellipsoid
He = ellipsoidal height
Ho = orthometric (geoid) height

I am using a package that calculate a geoid using EGM2008 for a given long/lat.

So I dispose of :

  • A Point A in WSG84 with an height above the ellipsoid
  • A Point B in EGM2008 with a geoid height

I tried to do MSL = A - B but my value are always wrong.

I used those two calculator :

unavco
daftlogic

When using those two tools, when I do GPS - GEOID = MSL it does work, but the value I get from Cesium are not the same (Isn't GPS using WSG84 ? )

 GPS  |  CESIUM       | GEOID      |  DIFF (GPS / CESIUM)

669   | 705           | 49.421     | +36
52    | 88            | 37.162     | +36
51    | 36            | -15.992    | -15
0     | -86           | -98        | +86 

So my question is : Using Cesium World Terrain and apparently WSG84 altitude above an ellipsoid, how do I retrieve the altitude of the point in MSL?

Best Answer

I think there is a problem with the way you are thinking about the whole thing.

To sum up: You use Cesium points which are from a Digital Elevation Model. Those points are expressed in WGS84 and the height representation is ellipsoidal height

GPS gives you height which is ellipsoidal height

You have geoid height from the EGM2008 model

So when you compare CESIUM points with GPS points measured near the ground surface, you should have the same height. This is not the case and your GPS data seems to look like altitude. So you should look at your GPS computation (according to the software you use, it might give you coordinates height in altitude if it's compute its background) and at the ellipsoid you choose for you "Cartographic" object in Cesium, it might not be WGS84

From one of those two data, you can get the geoid height (which is an altitude) with the formula Ho = He - N where N is the geoid height above ellipsoid given by EGM2008 for example

One other thing, you use data with a lot of accuracy difference and resolution difference:

  • The accuracy of the EGM2008 is at 5 centimeters on the sea and 50 centimeters on the grounds and it has a bad spatial resolution (near 10km).

  • For CESIUM, the spatial resolution goes from 2 to 30 meters. I didn't find any information about the accuracy but according to the data source of the DEM, I would say that the accuracy is near 1 meter.

  • The accuracy of your GPS data can vary from a few centimeters to a few meters according to your computation mode (Basic, differential, PPP, etc...)