Undulation lookup options?

For a flight visualization simulator I receive height data in mean sea level (MSL). Cesium requires WGS84.

WGS84 = MSL + undulation (https://en.wikipedia.org/wiki/Undulation_of_the_geoid)

Undulation doesn’t vary much over short distances. I periodically look it up on bing services using this code below. This works but it’s only 1 meter precision and it’s complicated by the lack of CORS support.

Has anyone found a better way to get undulation?

Thank, Matt.

You could parse and load the data directly from the EGM96 data file - WW15MGH.DAC

http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html

There’s an EGM96 reader / interpolator in TerriaJS that you’re welcome to use.
https://github.com/TerriaJS/terriajs/blob/master/lib/Map/EarthGravityModel1996.js

Kevin