# Bug in the javadocs for VerticalTransform and ModifiedEarthGravitationalModel

## Description

The javadocs for VerticalTransform and ModifiedEarthGravitationalModel heightOffset state this:

Returns the value to add to a &lt;cite&gt;height above the ellipsoid&lt;/cite&gt; in order to get a &lt;cite&gt;height above the geoid&lt;/cite&gt; for the specified geographic coordinate.

I believe this is exactly the opposite. As you can see here:

WGS 84 Ellipsoid height = Orthometric height + EGM96 Geoid height

In other words, the javadocs should probably read this:

"Returns the value to add to a &lt;cite&gt;height above the geoid&lt;/cite&gt; in order to get a &lt;cite&gt;height above the ellipsoid&lt;/cite&gt; for the specified geographic coordinate."

Or this:

"Returns the value to subtract from a &lt;cite&gt;height above the ellipsoid&lt;/cite&gt; in order to get a &lt;cite&gt;height above the geoid&lt;/cite&gt; for the specified geographic coordinate."

But if I follow the javadocs's suggestion, I get a value that is very wrong.

Example:
Here is: 38.883,-77.106
The DTED0 HAE for here is: 56 meters
The DTED0 Height above Geoid for here is: 89 meters
The heightOffset is returning: -33 meters

So, I can take the HAE and subtract the heightOffset to get the height above Geoid.
Or, I can take the height above geoid and add the heightOffset to get the HAE.
But I CANNOT take the HAE and ADD the heightOffset to get the height above Geoid.

Also affects:

• The rest of the VerticalTransform class (I see addition being used to convert from HAE to Height above Geoid)

Thank you for your attention!

None

Unassigned

codehaus

None

Medium
Configure