Best practices for obtaining real world lat, long, height, and converting that into UE4 coordinates

Hi @nbaja,

This is a very common problem. When you look up a height on Wikipedia and elsewhere, it’s almost always a height above sea level. “Sea level” is a bit of a fuzzy concept. It’s made concrete (at least a “mean” sea level is) by various geoid models, but geoid models are messy and irregular. Instead, Cesium uses heights above the WGS84 ellipsoid. This is a nice mathematical approximation of the Earth’s shape, used by GPS and many other things. This definitely doesn’t mean Cesium is inaccurate or otherwise compromising here. But, as always with geospatial data, it’s necessary to keep the coordinate system of your data in mind. A height expressed relative to WGS84 will be different by roughly tens of meters from a height expressed relative to mean sea level. I say “roughly tens of meters” because it’s different in different parts of the world.

Long story short, you need to compute the difference between WGS84 and MSL and add that to your height from Wikipedia. You can use an online calculator like this one:
https://www.unavco.org/software/geodetic-utilities/geoid-height-calculator/geoid-height-calculator.html

Put in your latitude and longitude of interest. You can just set the “GPS Elevation” to 0. Hit Submit. Then add the displayed “Geoid Height” value to your height from Wikipedia. The value is -23.765 in this case, so you’ll be subtracting about 24 meters.

I don’t know if this will put your Actor precisely on the peak, but it should be much closer.

Kevin

1 Like