N = geoidheight(latitude, longitude, 'Custom', datafile, action)
geoidheight(latitude,longitude) calculates the geoid height using the EGM96 Geopotential Model.
For this model, it calculates these geoid heights to an accuracy of 0.01 m.
It interpolates an array of m geoid heights at m geocentric latitudes, latitude, and m geocentric longitudes, longitude.
Geoidheigh函数是计算大地水准面差距的标准函数。大地水准面差距即是从大地水准面上的点沿地球椭球法线到地球椭球的距离。因此该函数计算的值为EGM96(或者EGM2008)大地水准面与WGS84椭球体的差值。而大地水准面与平均海水面之前还存在垂直偏差如下图所示。