I tried to find how to get the altitude above the mean sea level. At this time, it returns altitude from the ellipsoid. So, anyone knows the formula or calculation to change the altitude value from ellipsoid to the altitude value from mean sea level.
Thank you for all help
As you mentioned, GPS returns the altitude as an offset from the WGS84 reference ellipsoid, but most people want to see mean sea level (MSL), and the two frequently don't agree. The way this is most frequently done is by looking up the delta in a table and using that to compute MSL based on the height from GPS and the delta in the table.
There's some java code here: http://worldwind31.arc.nasa.gov/svn/trunk/WorldWind/src/gov/nasa/worldwind/util/EGM96.java. The other functions that it uses from Worldwind aren't that complicated, so you could probably use most of the code unmodified, and the rest you could adapt if you're working in Java and their license meets your needs.
It uses information from the EGM 96 data set (link here if you're interested -- not strictly necessary though), which you can download here: http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/binary/binarygeoid.html. You will want the WW15MGH.DAC file. It's a binary file full of 16-bit signed integers. You can use the Java example to show you how to access the data in the file. They also provide a Fortran example if that's your thing. :-)
Here's the information on the file from their readme.