I can answer only a part of your question:
The GPS chip delivers the height above the WGS84 ellipsoid, but still usually this value is inacurate by typically 20-30m. So even the value related to the elliposid is wrong.
For an accurate height you must
Correct the inacurate altitude (WGS84 ellipsoid) to the correct WGS84 height by using a web Service, where you send you lat,lon coordinates to.
Convert the now acccurate height above WGS84 to height above mean Sea-level.
For point 2, I am not sure if there is a service and if you can do it locally.
I recomend that you read this post: How do I convert a geodetic location to an ECF position that works with the terrain model in Cesium
Update:
Every GPS receiver can output height above mean sea level and height above ellipsoid, this means that there is a possibilty to convert without using much memory.
Find out how they do, and please post here. (Add a comment if you found out)
(The GPS NMEA GGA message contains both values)